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

项目:AvoinApotti    文件:EDReferralToSpecialtyDialogImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() });

    if (list!=null && list.size()>0)
    {
        return TrackingForReferalToSpecialtyVoAssembler.create((Tracking) list.get(0));
    }

    return null;

}
项目:AvoinApotti    文件:ReferralToSpecialtyImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(Integer trackingID)
{
    DomainFactory factory = getDomainFactory();

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

    if (trackingID == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingForReferral on null TrackingId ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Tracking from Tracking as Tracking where Tracking.id = :trackingID");
    markers.add("trackingID");
    values.add(trackingID);

    return TrackingForReferalToSpecialtyVoAssembler.createTrackingForReferalToSpecialtyVoCollectionFromTracking(factory.find(hql.toString(), markers, values)).get(0);

}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() });

    if (list!=null && list.size()>0)
    {
        return TrackingForReferalToSpecialtyVoAssembler.create((Tracking) list.get(0));
    }

    return null;

}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(Integer trackingID)
{
    DomainFactory factory = getDomainFactory();

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

    if (trackingID == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingForReferral on null TrackingId ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Tracking from Tracking as Tracking where Tracking.id = :trackingID");
    markers.add("trackingID");
    values.add(trackingID);

    return TrackingForReferalToSpecialtyVoAssembler.createTrackingForReferalToSpecialtyVoCollectionFromTracking(factory.find(hql.toString(), markers, values)).get(0);

}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() });

    if (list!=null && list.size()>0)
    {
        return TrackingForReferalToSpecialtyVoAssembler.create((Tracking) list.get(0));
    }

    return null;

}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(Integer trackingID)
{
    DomainFactory factory = getDomainFactory();

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

    if (trackingID == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingForReferral on null TrackingId ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Tracking from Tracking as Tracking where Tracking.id = :trackingID");
    markers.add("trackingID");
    values.add(trackingID);

    return TrackingForReferalToSpecialtyVoAssembler.createTrackingForReferalToSpecialtyVoCollectionFromTracking(factory.find(hql.toString(), markers, values)).get(0);

}
项目:openmaxims-linux    文件:EDReferralToSpecialtyDialogImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] { "trackingID" }, new Object[] { trackingRef.getID_Tracking() });

    if (list!=null && list.size()>0)
    {
        return TrackingForReferalToSpecialtyVoAssembler.create((Tracking) list.get(0));
    }

    return null;

}
项目:openmaxims-linux    文件:ReferralToSpecialtyImpl.java   
public TrackingForReferalToSpecialtyVo getTrackingForReferral(Integer trackingID)
{
    DomainFactory factory = getDomainFactory();

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

    if (trackingID == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingForReferral on null TrackingId ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Tracking from Tracking as Tracking where Tracking.id = :trackingID");
    markers.add("trackingID");
    values.add(trackingID);

    return TrackingForReferalToSpecialtyVoAssembler.createTrackingForReferalToSpecialtyVoCollectionFromTracking(factory.find(hql.toString(), markers, values)).get(0);

}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public EDPartialAdmissionVo cancelCurrentPartialAdmission(EDPartialAdmissionVo edPartialAdmissionVo, TrackingForReferalToSpecialtyVo trackingRecord) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();
    if( edPartialAdmissionVo != null )
    {
        edPartialAdmissionVo.setAllocatedStatus(AllocationStatus.CANCELLED_ADMISSION);
        EDPartialAdmission  doEDPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, edPartialAdmissionVo);
        factory.save(doEDPartialAdmission);

        if (trackingRecord != null)
        {
            Tracking dotrackingRecord = TrackingForReferalToSpecialtyVoAssembler.extractTracking(factory, trackingRecord);
            dotrackingRecord.setBedAvailability(null);
            dotrackingRecord.setCurrentPartialAdmission(null);
            factory.save(dotrackingRecord);

            EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
            try
            {
                dom.triggerCancelPartialAdmission(trackingRecord.getAttendance(), edPartialAdmissionVo);
            }
            catch (DomainInterfaceException e)
            {
                e.printStackTrace();
            }
        }

        return EDPartialAdmissionVoAssembler.create(doEDPartialAdmission);
    }
    return null;
}