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

项目:AvoinApotti    文件:ReferralDetailsComponentImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service)
{
    if (service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service is null or id not provided for method listServiceFunctionsLite");

    ServiceFunctionLiteVoCollection services = new ServiceFunctionLiteVoCollection();
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc = new IMSCriteria(ims.core.clinical.domain.objects.ServiceFunction.class, factory);
    imsc.equal("this.service.id", service.getID_Service());
    imsc.equal("this.isActive", true);
    List serviceFunctions = imsc.find();
    for (int i = 0; i < serviceFunctions.size(); i++)
    {
        services.add(ServiceFunctionLiteVoAssembler.create((ims.core.clinical.domain.objects.ServiceFunction) serviceFunctions.get(i)));
    }
    if (services.size() > 0)
        return services;
    return null;

}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service)
{
    if (service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service is null or id not provided for method listServiceFunctionsLite");

    ServiceFunctionLiteVoCollection services = new ServiceFunctionLiteVoCollection();
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc = new IMSCriteria(ims.core.clinical.domain.objects.ServiceFunction.class, factory);
    imsc.equal("this.service.id", service.getID_Service());
    imsc.equal("this.isActive", true);
    List serviceFunctions = imsc.find();
    for (int i = 0; i < serviceFunctions.size(); i++)
    {
        services.add(ServiceFunctionLiteVoAssembler.create((ims.core.clinical.domain.objects.ServiceFunction) serviceFunctions.get(i)));
    }
    if (services.size() > 0)
        return services;
    return null;

}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service)
{
    if (service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service is null or id not provided for method listServiceFunctionsLite");

    ServiceFunctionLiteVoCollection services = new ServiceFunctionLiteVoCollection();
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc = new IMSCriteria(ims.core.clinical.domain.objects.ServiceFunction.class, factory);
    imsc.equal("this.service.id", service.getID_Service());
    imsc.equal("this.isActive", true);
    List serviceFunctions = imsc.find();
    for (int i = 0; i < serviceFunctions.size(); i++)
    {
        services.add(ServiceFunctionLiteVoAssembler.create((ims.core.clinical.domain.objects.ServiceFunction) serviceFunctions.get(i)));
    }
    if (services.size() > 0)
        return services;
    return null;

}
项目:AvoinApotti    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByDOSs(DirectoryofServiceRefVoCollection dosColl)
{
    if(dosColl == null)
        throw new CodingRuntimeException("dosColl parameter is null in method listServiceFunctionByDOSs");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("select dos.functions from DirectoryofService as dos where dos.id in (" + getIdString(dosColl) + ")");
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:AvoinApotti    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService",new String[]{"idService"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:AvoinApotti    文件:ReferralStatusListImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service) 
{
    DomainFactory factory = getDomainFactory();

    if (service != null && service.getID_ServiceIsNotNull())
    {
        java.util.List<?> servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = :isAct", new String[]{"serviceid", "isAct"}, new Object[]{service.getID_Service(), Boolean.TRUE});
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:FutureAppointmentWorklistImpl.java   
public ims.core.vo.ServiceFunctionLiteVoCollection getFunctionsForService(ServiceRefVo service)
{
    if (service == null || service.getID_Service() == null)
        return null; 

    List list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv where servFunct.isActive = 1 and serv.id = :serviceID", 
            new String[] {"serviceID"}, new Object[] {service.getID_Service()});

    if (list != null && list.size() > 0)
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list);

    return null;
}
项目:openMAXIMS    文件:FutureAppointmentWorklistImpl.java   
public ServiceFunctionLiteVo getServiceFunction(ServiceRefVo service, ServiceFunction function)
{
    if (service == null || service.getID_Service() == null || function == null)
        return null;

    List list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv left join servFunct.function as func where servFunct.isActive = 1 and serv.id = :serviceID and func.id = :functionID", 
            new String[] {"serviceID", "functionID"}, new Object[] {service.getID_Service(), function.getID()});

    if (list != null && list.size() > 0)
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list).get(0);

    return null;
}
项目:openMAXIMS    文件:FutureAppointmentDetailsImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctions(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = "select servfunc from ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = 1 order by UPPER(servfunc.function.text) asc";

    List servFuncList = factory.find(hql, new String[]{"serviceid"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncList);
}
项目:openMAXIMS    文件:FutureAppointmentDetailsImpl.java   
public ServiceAndFunctionForFutureApptsVo getServiceAndFunctionForAppt(Booking_AppointmentRefVo appointment)
{
    if(appointment == null || appointment.getID_Booking_Appointment() == null)
        return null;

    ServiceAndFunctionForFutureApptsVo voServiceAndSlot = null;

    String hql = "select serviceFunc, session.service from Booking_Appointment as appt left join appt.session as session left join appt.serviceFunction as serviceFunc where (appt.id = :idAppt)";
    List items = getDomainFactory().find(hql, new String[]{"idAppt"}, new Object[]{appointment.getID_Booking_Appointment()});

    if(items != null && items.size() > 0)
    {
        Iterator it = items.iterator(); 

        if(it.hasNext())
        {
            Object[] item = (Object[]) it.next();
            ServiceFunction doServiceFunction = (ServiceFunction) item[0];
            Service doService = (Service) item[1];

            ServiceLiteVo service = ServiceLiteVoAssembler.create(doService);
            ServiceFunctionLiteVo serviceFunct = ServiceFunctionLiteVoAssembler.create(doServiceFunction);

            voServiceAndSlot = new ServiceAndFunctionForFutureApptsVo();
            voServiceAndSlot.setService(service);
            voServiceAndSlot.setFunction(serviceFunct);
        }
    }

    return voServiceAndSlot;
}
项目:openMAXIMS    文件:FutureAppointmentDetailsImpl.java   
public ServiceAndFunctionForFutureApptsVo getCatsReferralServiceAndfunction (CatsReferralRefVo catsReferralRef)
{
    if(catsReferralRef == null || catsReferralRef.getID_CatsReferral() == null)
        return null;

    ServiceAndFunctionForFutureApptsVo voServiceAndSlot = null;

    String hql = "select srv, func from CatsReferral as cats left join cats.referralDetails as det left join det.service as srv left join det.function as func where (cats.id = :idRef)";
    List<?> items = getDomainFactory().find(hql, new String[]{"idRef"}, new Object[]{catsReferralRef.getID_CatsReferral()});

    if(items != null && items.size() > 0)
    {
        Iterator it = items.iterator(); 

        if(it.hasNext())
        {
            Object[] item = (Object[]) it.next();
            Service doService = (Service) item[0];
            ServiceFunction doServiceFunction = (ServiceFunction) item[1];

            ServiceLiteVo service = ServiceLiteVoAssembler.create(doService);
            ServiceFunctionLiteVo serviceFunct = ServiceFunctionLiteVoAssembler.create(doServiceFunction);

            voServiceAndSlot = new ServiceAndFunctionForFutureApptsVo();
            voServiceAndSlot.setService(service);
            voServiceAndSlot.setFunction(serviceFunct);
        }           
    }
    return voServiceAndSlot;
}
项目:openMAXIMS    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByDOSs(DirectoryofServiceRefVoCollection dosColl)
{
    if(dosColl == null)
        throw new CodingRuntimeException("dosColl parameter is null in method listServiceFunctionByDOSs");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("select dos.functions from DirectoryofService as dos where dos.id in (" + getIdString(dosColl) + ")");
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService",new String[]{"idService"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:LinkedAppointmentDetailsComponentImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctions(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String hql = "select servfunc from ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = 1 order by UPPER(servfunc.function.text) asc";

    List servFuncList = factory.find(hql, new String[]{"serviceid"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncList);
}
项目:openMAXIMS    文件:InactivateProfileSlotsImpl.java   
public ims.core.vo.ServiceFunctionLiteVo getServiceFunction(ims.core.clinical.vo.ServiceFunctionRefVo serviceFunctionRef)
{
    DomainFactory factory = getDomainFactory();

    ServiceFunction domServiceFunction = (ServiceFunction)factory.getDomainObject(ServiceFunction.class, serviceFunctionRef.getID_ServiceFunction());
    return ServiceFunctionLiteVoAssembler.create(domServiceFunction);
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService and servFunc.isActive = 1",new String[]{"idService"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public ServiceFunctionLiteVo getServiceFunction(ServiceFunctionRefVo serviceFunctionRef)
{
    DomainFactory factory = getDomainFactory();

    ServiceFunction domServiceFunction = (ServiceFunction)factory.getDomainObject(ServiceFunction.class, serviceFunctionRef.getID_ServiceFunction());
    ServiceFunctionLiteVo voServiceFunct = ServiceFunctionLiteVoAssembler.create(domServiceFunction);

    return voServiceFunct;
}
项目:openMAXIMS    文件:ReferralTriageAcceptedImpl.java   
public ims.core.vo.ServiceFunctionLiteVoCollection listServiceFunctions(ims.core.clinical.vo.ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        return null;

    String query = "select sf from ServiceFunction as sf left join sf.service as s left join sf.function as f where s.id = :ServiceId and f.id is not null and sf.isActive = 1";

    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(getDomainFactory().find(query, new String[] {"ServiceId"}, new Object[] {service.getID_Service()}));
}
项目:openMAXIMS    文件:BookAppointmentImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service)
{
    if (service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service is null or id not provided for method listServiceFunctionsLite");

    List<?> list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv where servFunct.isActive = 1 and serv.id = :serviceID", 
            new String[] {"serviceID"}, new Object[] {service.getID_Service()});

    if (list != null && list.size() > 0)
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list);

    return null;
}
项目:openMAXIMS    文件:ReferralDetailsComponentImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService and servFunc.isActive = 1",new String[]{"idService"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:ReferralAppointmentDetailsComponentImpl.java   
public ServiceFunctionLiteVo getServiceFunction(ServiceRefVo service, ServiceFunction function)
{
    if (service == null || service.getID_Service() == null || function == null)
        return null;

    List list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv left join servFunct.function as func where servFunct.isActive = 1 and serv.id = :serviceID and func.id = :functionID", 
            new String[] {"serviceID", "functionID"}, new Object[] {service.getID_Service(), function.getID()});

    if (list != null && list.size() > 0)
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list).get(0);

    return null;
}
项目:openMAXIMS    文件:ReferralStatusListImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service) 
{
    DomainFactory factory = getDomainFactory();

    if (service != null && service.getID_ServiceIsNotNull())
    {
        java.util.List<?> servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = :isAct", new String[]{"serviceid", "isAct"}, new Object[]{service.getID_Service(), Boolean.TRUE});
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}
项目:openMAXIMS    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByDOSs(DirectoryofServiceRefVoCollection dosColl)
{
    if(dosColl == null)
        throw new CodingRuntimeException("dosColl parameter is null in method listServiceFunctionByDOSs");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("select dos.functions from DirectoryofService as dos where dos.id in (" + getIdString(dosColl) + ")");
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService",new String[]{"idService"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openMAXIMS    文件:ReferralStatusListImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service) 
{
    DomainFactory factory = getDomainFactory();

    if (service != null && service.getID_ServiceIsNotNull())
    {
        java.util.List<?> servfuncList = factory.find("from  ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = :isAct", new String[]{"serviceid", "isAct"}, new Object[]{service.getID_Service(), Boolean.TRUE});
        return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servfuncList).sort();
    }

    return null;
}
项目:openmaxims-linux    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByDOSs(DirectoryofServiceRefVoCollection dosColl)
{
    if(dosColl == null)
        throw new CodingRuntimeException("dosColl parameter is null in method listServiceFunctionByDOSs");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("select dos.functions from DirectoryofService as dos where dos.id in (" + getIdString(dosColl) + ")");
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}
项目:openmaxims-linux    文件:ProfilesSlotGenericImpl.java   
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service)
{
    if(service == null || service.getID_Service() == null)
        throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService");

    DomainFactory factory = getDomainFactory();
    List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService",new String[]{"idService"}, new Object[]{service.getID_Service()});
    return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs);
}