Java 类ims.core.vo.domain.CommunityServiceVoAssembler 实例源码

项目:AvoinApotti    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVoCollection listCommunityServicesByCareContext(ims.core.admin.vo.CareContextRefVo voCareContextRef, Boolean activeOnly)
{
    if (voCareContextRef == null)
        throw new CodingRuntimeException("Care Context was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hqlQuery = " from CommunityServices cs ";
    StringBuffer condStr = new StringBuffer();
    ArrayList<String> markerNames = new ArrayList<String>();
    ArrayList<Object> markerValues = new ArrayList<Object>();

    condStr.append(" where ");

    if(voCareContextRef != null)
    {
        condStr.append(" cs.careContext.id = :careContext and cs.isCurrentlyActive = :active");
        markerNames.add("careContext");
        markerValues.add(voCareContextRef.getID_CareContext());
        markerNames.add("active");
        markerValues.add(activeOnly);           
    }

    hqlQuery += condStr.toString();
    hqlQuery += " order by systemInformation.creationDateTime asc";

    java.util.List<?> lst = factory.find(hqlQuery,markerNames,markerValues);    

    return CommunityServiceVoAssembler.createCommunityServiceVoCollectionFromCommunityServices(lst).sort();

}
项目:openMAXIMS    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVoCollection listCommunityServicesByCareContext(ims.core.admin.vo.CareContextRefVo voCareContextRef, Boolean activeOnly)
{
    if (voCareContextRef == null)
        throw new CodingRuntimeException("Care Context was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hqlQuery = " from CommunityServices cs ";
    StringBuffer condStr = new StringBuffer();
    ArrayList<String> markerNames = new ArrayList<String>();
    ArrayList<Object> markerValues = new ArrayList<Object>();

    condStr.append(" where ");

    if(voCareContextRef != null)
    {
        condStr.append(" cs.careContext.id = :careContext and cs.isCurrentlyActive = :active");
        markerNames.add("careContext");
        markerValues.add(voCareContextRef.getID_CareContext());
        markerNames.add("active");
        markerValues.add(activeOnly);           
    }

    hqlQuery += condStr.toString();
    hqlQuery += " order by systemInformation.creationDateTime asc";

    java.util.List<?> lst = factory.find(hqlQuery,markerNames,markerValues);    

    return CommunityServiceVoAssembler.createCommunityServiceVoCollectionFromCommunityServices(lst).sort();

}
项目:openMAXIMS    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVoCollection listCommunityServicesByCareContext(ims.core.admin.vo.CareContextRefVo voCareContextRef, Boolean activeOnly)
{
    if (voCareContextRef == null)
        throw new CodingRuntimeException("Care Context was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hqlQuery = " from CommunityServices cs ";
    StringBuffer condStr = new StringBuffer();
    ArrayList<String> markerNames = new ArrayList<String>();
    ArrayList<Object> markerValues = new ArrayList<Object>();

    condStr.append(" where ");

    if(voCareContextRef != null)
    {
        condStr.append(" cs.careContext.id = :careContext and cs.isCurrentlyActive = :active");
        markerNames.add("careContext");
        markerValues.add(voCareContextRef.getID_CareContext());
        markerNames.add("active");
        markerValues.add(activeOnly);           
    }

    hqlQuery += condStr.toString();
    hqlQuery += " order by systemInformation.creationDateTime asc";

    java.util.List<?> lst = factory.find(hqlQuery,markerNames,markerValues);    

    return CommunityServiceVoAssembler.createCommunityServiceVoCollectionFromCommunityServices(lst).sort();

}
项目:openmaxims-linux    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVoCollection listCommunityServicesByCareContext(ims.core.admin.vo.CareContextRefVo voCareContextRef, Boolean activeOnly)
{
    if (voCareContextRef == null)
        throw new CodingRuntimeException("Care Context was not supplied. Mandatory argument");

    DomainFactory factory = getDomainFactory();

    String hqlQuery = " from CommunityServices cs ";
    StringBuffer condStr = new StringBuffer();
    ArrayList<String> markerNames = new ArrayList<String>();
    ArrayList<Object> markerValues = new ArrayList<Object>();

    condStr.append(" where ");

    if(voCareContextRef != null)
    {
        condStr.append(" cs.careContext.id = :careContext and cs.isCurrentlyActive = :active");
        markerNames.add("careContext");
        markerValues.add(voCareContextRef.getID_CareContext());
        markerNames.add("active");
        markerValues.add(activeOnly);           
    }

    hqlQuery += condStr.toString();
    hqlQuery += " order by systemInformation.creationDateTime asc";

    java.util.List<?> lst = factory.find(hqlQuery,markerNames,markerValues);    

    return CommunityServiceVoAssembler.createCommunityServiceVoCollectionFromCommunityServices(lst).sort();

}
项目:AvoinApotti    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVo saveCommunitService(ims.core.vo.CommunityServiceVo communityService) throws ims.domain.exceptions.StaleObjectException
{
    if(!communityService.isValidated())
        throw new DomainRuntimeException("communityService Value Object has not been validated");

    DomainFactory factory = getDomainFactory();

    CommunityServices doComService = CommunityServiceVoAssembler.extractCommunityServices(factory, communityService);

    factory.save(doComService);

    return CommunityServiceVoAssembler.create(doComService);
}
项目:openMAXIMS    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVo saveCommunitService(ims.core.vo.CommunityServiceVo communityService) throws ims.domain.exceptions.StaleObjectException
{
    if(!communityService.isValidated())
        throw new DomainRuntimeException("communityService Value Object has not been validated");

    DomainFactory factory = getDomainFactory();

    CommunityServices doComService = CommunityServiceVoAssembler.extractCommunityServices(factory, communityService);

    factory.save(doComService);

    return CommunityServiceVoAssembler.create(doComService);
}
项目:openMAXIMS    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVo saveCommunitService(ims.core.vo.CommunityServiceVo communityService) throws ims.domain.exceptions.StaleObjectException
{
    if(!communityService.isValidated())
        throw new DomainRuntimeException("communityService Value Object has not been validated");

    DomainFactory factory = getDomainFactory();

    CommunityServices doComService = CommunityServiceVoAssembler.extractCommunityServices(factory, communityService);

    factory.save(doComService);

    return CommunityServiceVoAssembler.create(doComService);
}
项目:openmaxims-linux    文件:SupportNetworkCommunityServicesImpl.java   
public ims.core.vo.CommunityServiceVo saveCommunitService(ims.core.vo.CommunityServiceVo communityService) throws ims.domain.exceptions.StaleObjectException
{
    if(!communityService.isValidated())
        throw new DomainRuntimeException("communityService Value Object has not been validated");

    DomainFactory factory = getDomainFactory();

    CommunityServices doComService = CommunityServiceVoAssembler.extractCommunityServices(factory, communityService);

    factory.save(doComService);

    return CommunityServiceVoAssembler.create(doComService);
}