Java 类ims.emergency.vo.domain.EmergencyAttendanceForEventHistoryVoAssembler 实例源码

项目:AvoinApotti    文件:EventHistoryImpl.java   
public EmergencyAttendanceForEventHistoryVo getEmergencyAttendance(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get EmergencyAttendanceForEventHistoryVo on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" select Emergency from EmergencyAttendance as Emergency left join Emergency.careContext as contextID where contextID.id = :contextID");
    markers.add("contextID");
    values.add(careContextRef.getID_CareContext());

    EmergencyAttendanceForEventHistoryVoCollection emergencyAttendance = EmergencyAttendanceForEventHistoryVoAssembler.createEmergencyAttendanceForEventHistoryVoCollectionFromEmergencyAttendance(factory.find(hql.toString(), markers, values));

    if (emergencyAttendance != null && emergencyAttendance.size() > 0)
    {
        return emergencyAttendance.get(0);
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:EventHistoryImpl.java   
public EmergencyAttendanceForEventHistoryVo getEmergencyAttendance(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get EmergencyAttendanceForEventHistoryVo on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" select Emergency from EmergencyAttendance as Emergency left join Emergency.careContext as contextID where contextID.id = :contextID");
    markers.add("contextID");
    values.add(careContextRef.getID_CareContext());

    EmergencyAttendanceForEventHistoryVoCollection emergencyAttendance = EmergencyAttendanceForEventHistoryVoAssembler.createEmergencyAttendanceForEventHistoryVoCollectionFromEmergencyAttendance(factory.find(hql.toString(), markers, values));

    if (emergencyAttendance != null && emergencyAttendance.size() > 0)
    {
        return emergencyAttendance.get(0);
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:EventHistoryImpl.java   
public EmergencyAttendanceForEventHistoryVo getEmergencyAttendance(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get EmergencyAttendanceForEventHistoryVo on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" select Emergency from EmergencyAttendance as Emergency left join Emergency.careContext as contextID where contextID.id = :contextID");
    markers.add("contextID");
    values.add(careContextRef.getID_CareContext());

    EmergencyAttendanceForEventHistoryVoCollection emergencyAttendance = EmergencyAttendanceForEventHistoryVoAssembler.createEmergencyAttendanceForEventHistoryVoCollectionFromEmergencyAttendance(factory.find(hql.toString(), markers, values));

    if (emergencyAttendance != null && emergencyAttendance.size() > 0)
    {
        return emergencyAttendance.get(0);
    }
    else
    {
        return null;
    }
}
项目:openmaxims-linux    文件:EventHistoryImpl.java   
public EmergencyAttendanceForEventHistoryVo getEmergencyAttendance(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get EmergencyAttendanceForEventHistoryVo on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" select Emergency from EmergencyAttendance as Emergency left join Emergency.careContext as contextID where contextID.id = :contextID");
    markers.add("contextID");
    values.add(careContextRef.getID_CareContext());

    EmergencyAttendanceForEventHistoryVoCollection emergencyAttendance = EmergencyAttendanceForEventHistoryVoAssembler.createEmergencyAttendanceForEventHistoryVoCollectionFromEmergencyAttendance(factory.find(hql.toString(), markers, values));

    if (emergencyAttendance != null && emergencyAttendance.size() > 0)
    {
        return emergencyAttendance.get(0);
    }
    else
    {
        return null;
    }
}