Java 类ims.admin.vo.domain.AppointmentOutcomeConfigVoAssembler 实例源码

项目:openMAXIMS    文件:AppointmentOutcomeDialogImpl.java   
public AppointmentOutcomeConfigVoCollection listAppointmentOutcomeByAppointmentStatus(Status_Reason status)
{
    if (status == null || !(Status_Reason.DNA.equals(status) || Status_Reason.NOT_SEEN.equals(status) || Status_Reason.SEEN.equals(status)))
        return null;

    StringBuilder query = new StringBuilder("SELECT outcomeConfig FROM AppointmentOutcomeConfig AS outcomeConfig ");

    if (Status_Reason.DNA.equals(status))
        query.append("WHERE outcomeConfig.usedForDNA = 1");
    else if (Status_Reason.NOT_SEEN.equals(status))
        query.append("WHERE outcomeConfig.usedForNotSeen = 1");
    else if (Status_Reason.SEEN.equals(status))
        query.append("WHERE outcomeConfig.usedForSeen = 1");

    return AppointmentOutcomeConfigVoAssembler.createAppointmentOutcomeConfigVoCollectionFromAppointmentOutcomeConfig(getDomainFactory().find(query.toString()));
}
项目:AvoinApotti    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfig(AppointmentOutcomeConfigRefVo appOutcomeConfigRef)
{
    if (appOutcomeConfigRef==null ||appOutcomeConfigRef.getID_AppointmentOutcomeConfig()==null)
    {
        throw new CodingRuntimeException("Cannot get AppointmentOutcomeConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = (ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig) factory.getDomainObject(ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig.class,appOutcomeConfigRef.getID_AppointmentOutcomeConfig());

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:AvoinApotti    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo save(AppointmentOutcomeConfigVo appOutcomeConfigToSave) throws StaleObjectException
{
    if (appOutcomeConfigToSave == null)
    {
        throw new CodingRuntimeException("Cannot save null AppointmentOutcomeConfig");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = AppointmentOutcomeConfigVoAssembler.extractAppointmentOutcomeConfig(factory, appOutcomeConfigToSave);
    factory.save(domainApptOutcomeConfig);

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:AvoinApotti    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVoCollection listAppointmentsOutcomeConfig(Boolean active)
{
    StringBuilder hqlBuilder = new StringBuilder("from AppointmentOutcomeConfig as appOutcomeConfig ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString());

    return AppointmentOutcomeConfigVoAssembler.createAppointmentOutcomeConfigVoCollectionFromAppointmentOutcomeConfig(list);
}
项目:AvoinApotti    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfigByApptOutcomeLookup(ApptOutcome apptOutcomeLookup)
{
    StringBuilder hqlBuilder = new StringBuilder("select appOutcomeConfig from AppointmentOutcomeConfig as appOutcomeConfig left join appOutcomeConfig.appointmentOutcome as appOutcome where appOutcome.id= :AppOutcomeID ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString(),new String[] {"AppOutcomeID"},new Object[] {apptOutcomeLookup.getID()});

    if (list == null || list.size() == 0)
        return null;

    return AppointmentOutcomeConfigVoAssembler.create((AppointmentOutcomeConfig) list.get(0));
}
项目:openMAXIMS    文件:AppointmentOutcomeDialogImpl.java   
/**
 * WDEV-20332
 * List Appointment Outcomes based on current appointment status and current RTT status
 */
public AppointmentOutcomeConfigVoCollection listAppointmentOutcomeByAppointmentStatusAndRTTSTatus(Status_Reason status, RTTStatusPointRefVo rttStatusPoint)
{
    if (status == null || !(Status_Reason.DNA.equals(status) || Status_Reason.NOT_SEEN.equals(status) || Status_Reason.SEEN.equals(status)))
        return null;

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    StringBuilder query = new StringBuilder("SELECT outcomeConfig FROM AppointmentOutcomeConfig AS outcomeConfig ");
    query.append(" LEFT JOIN outcomeConfig.appointmentOutcome AS appointmentOutcome ");

    if (Status_Reason.DNA.equals(status))
        query.append("WHERE outcomeConfig.usedForDNA = 1");
    else if (Status_Reason.NOT_SEEN.equals(status))
        query.append("WHERE outcomeConfig.usedForNotSeen = 1");
    else if (Status_Reason.SEEN.equals(status))
        query.append("WHERE outcomeConfig.usedForSeen = 1");

    query.append(" AND appointmentOutcome.active = 1 "); //WDEV-23584

    if (rttStatusPoint != null && rttStatusPoint.getID_RTTStatusPoint() != null)
    {
        query.append(" AND appointmentOutcome.id IN (");
        query.append("SELECT outcome.id ");
        query.append(" FROM RTTStatusPoint AS rtt ");
        query.append(" LEFT JOIN rtt.appointmentOutcomes AS outcomeRef ");
        query.append(" LEFT JOIN outcomeRef.instance AS outcome ");
        query.append(" WHERE rtt.id = :RTT_STATUS_POINT");
        query.append(")");

        paramNames.add("RTT_STATUS_POINT");
        paramValues.add(rttStatusPoint.getID_RTTStatusPoint());
    }

    return AppointmentOutcomeConfigVoAssembler.createAppointmentOutcomeConfigVoCollectionFromAppointmentOutcomeConfig(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfig(AppointmentOutcomeConfigRefVo appOutcomeConfigRef)
{
    if (appOutcomeConfigRef==null ||appOutcomeConfigRef.getID_AppointmentOutcomeConfig()==null)
    {
        throw new CodingRuntimeException("Cannot get AppointmentOutcomeConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = (ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig) factory.getDomainObject(ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig.class,appOutcomeConfigRef.getID_AppointmentOutcomeConfig());

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo save(AppointmentOutcomeConfigVo appOutcomeConfigToSave) throws StaleObjectException
{
    if (appOutcomeConfigToSave == null)
    {
        throw new CodingRuntimeException("Cannot save null AppointmentOutcomeConfig");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = AppointmentOutcomeConfigVoAssembler.extractAppointmentOutcomeConfig(factory, appOutcomeConfigToSave);
    factory.save(domainApptOutcomeConfig);

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVoCollection listAppointmentsOutcomeConfig(Boolean active)
{
    StringBuilder hqlBuilder = new StringBuilder("from AppointmentOutcomeConfig as appOutcomeConfig ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString());

    return AppointmentOutcomeConfigVoAssembler.createAppointmentOutcomeConfigVoCollectionFromAppointmentOutcomeConfig(list);
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfigByApptOutcomeLookup(ApptOutcome apptOutcomeLookup)
{
    StringBuilder hqlBuilder = new StringBuilder("select appOutcomeConfig from AppointmentOutcomeConfig as appOutcomeConfig left join appOutcomeConfig.appointmentOutcome as appOutcome where appOutcome.id= :AppOutcomeID ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString(),new String[] {"AppOutcomeID"},new Object[] {apptOutcomeLookup.getID()});

    if (list == null || list.size() == 0)
        return null;

    return AppointmentOutcomeConfigVoAssembler.create((AppointmentOutcomeConfig) list.get(0));
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfig(AppointmentOutcomeConfigRefVo appOutcomeConfigRef)
{
    if (appOutcomeConfigRef==null ||appOutcomeConfigRef.getID_AppointmentOutcomeConfig()==null)
    {
        throw new CodingRuntimeException("Cannot get AppointmentOutcomeConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = (ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig) factory.getDomainObject(ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig.class,appOutcomeConfigRef.getID_AppointmentOutcomeConfig());

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo save(AppointmentOutcomeConfigVo appOutcomeConfigToSave) throws StaleObjectException
{
    if (appOutcomeConfigToSave == null)
    {
        throw new CodingRuntimeException("Cannot save null AppointmentOutcomeConfig");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = AppointmentOutcomeConfigVoAssembler.extractAppointmentOutcomeConfig(factory, appOutcomeConfigToSave);
    factory.save(domainApptOutcomeConfig);

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVoCollection listAppointmentsOutcomeConfig(Boolean active)
{
    StringBuilder hqlBuilder = new StringBuilder("from AppointmentOutcomeConfig as appOutcomeConfig ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString());

    return AppointmentOutcomeConfigVoAssembler.createAppointmentOutcomeConfigVoCollectionFromAppointmentOutcomeConfig(list);
}
项目:openMAXIMS    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfigByApptOutcomeLookup(ApptOutcome apptOutcomeLookup)
{
    StringBuilder hqlBuilder = new StringBuilder("select appOutcomeConfig from AppointmentOutcomeConfig as appOutcomeConfig left join appOutcomeConfig.appointmentOutcome as appOutcome where appOutcome.id= :AppOutcomeID ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString(),new String[] {"AppOutcomeID"},new Object[] {apptOutcomeLookup.getID()});

    if (list == null || list.size() == 0)
        return null;

    return AppointmentOutcomeConfigVoAssembler.create((AppointmentOutcomeConfig) list.get(0));
}
项目:openmaxims-linux    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfig(AppointmentOutcomeConfigRefVo appOutcomeConfigRef)
{
    if (appOutcomeConfigRef==null ||appOutcomeConfigRef.getID_AppointmentOutcomeConfig()==null)
    {
        throw new CodingRuntimeException("Cannot get AppointmentOutcomeConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = (ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig) factory.getDomainObject(ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig.class,appOutcomeConfigRef.getID_AppointmentOutcomeConfig());

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:openmaxims-linux    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo save(AppointmentOutcomeConfigVo appOutcomeConfigToSave) throws StaleObjectException
{
    if (appOutcomeConfigToSave == null)
    {
        throw new CodingRuntimeException("Cannot save null AppointmentOutcomeConfig");
    }

    DomainFactory factory = getDomainFactory();

    ims.pathways.configuration.domain.objects.AppointmentOutcomeConfig domainApptOutcomeConfig = AppointmentOutcomeConfigVoAssembler.extractAppointmentOutcomeConfig(factory, appOutcomeConfigToSave);
    factory.save(domainApptOutcomeConfig);

    return AppointmentOutcomeConfigVoAssembler.create(domainApptOutcomeConfig);
}
项目:openmaxims-linux    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVoCollection listAppointmentsOutcomeConfig(Boolean active)
{
    StringBuilder hqlBuilder = new StringBuilder("from AppointmentOutcomeConfig as appOutcomeConfig ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString());

    return AppointmentOutcomeConfigVoAssembler.createAppointmentOutcomeConfigVoCollectionFromAppointmentOutcomeConfig(list);
}
项目:openmaxims-linux    文件:AppointmentOutcomeConfigImpl.java   
public AppointmentOutcomeConfigVo getAppointmentOutcomeConfigByApptOutcomeLookup(ApptOutcome apptOutcomeLookup)
{
    StringBuilder hqlBuilder = new StringBuilder("select appOutcomeConfig from AppointmentOutcomeConfig as appOutcomeConfig left join appOutcomeConfig.appointmentOutcome as appOutcome where appOutcome.id= :AppOutcomeID ");

    List <?> list = getDomainFactory().find(hqlBuilder.toString(),new String[] {"AppOutcomeID"},new Object[] {apptOutcomeLookup.getID()});

    if (list == null || list.size() == 0)
        return null;

    return AppointmentOutcomeConfigVoAssembler.create((AppointmentOutcomeConfig) list.get(0));
}