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

项目:AvoinApotti    文件:TrackingConfigurationImpl.java   
public boolean existTrackingAreaCubiclesForTrackingArea(Integer trackAreaId,DomainFactory factory)
{
    if( trackAreaId == null)
        return false;

    StringBuffer hql = new StringBuffer();
    //List only Emergency Department
    hql.append(" select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackareaid)"); 
    List<?> trackingList = factory.find(hql.toString(), new String[]{"trackareaid"}, new Object[]{trackAreaId});
    if( trackingList != null && trackingList.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(trackingList);
        if( tempColl != null && tempColl.size() > 0)
            return true;
        else
            return false;
    }

    return false;

}
项目:AvoinApotti    文件:CubiclesRoomsBedsCCImpl.java   
public ims.emergency.vo.TrackingAreaCubiclesVo getTrackingAreaCubicle(ims.emergency.configuration.vo.TrackingAreaRefVo trackingAreaRef)
{
    if(trackingAreaRef == null)
        throw new CodingRuntimeException("TrackingAreaRefVo is null.");


    StringBuffer hql = new StringBuffer();
    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 ");
    hql.append("where (t2_1.id = :trackinAreaId) ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"trackinAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if (list!=null && list.size()>0)
    {
        return TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list).get(0);
    }
    return null;
}
项目:openMAXIMS    文件:SendToAreaImpl.java   
public TrackingAreaCubiclesVo getTrackingAreaCubicle(TrackingAreaRefVo trackingAreaRef)
{
    if(trackingAreaRef == null || trackingAreaRef.getID_TrackingArea() == null)
        return null;


    StringBuffer hql = new StringBuffer();
    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 ");
    hql.append("where (t2_1.id = :trackinAreaId) ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"trackinAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if (list!=null && list.size()>0)
    {
        return TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list).get(0);
    }
    return null;
}
项目:openMAXIMS    文件:TrackingConfigurationImpl.java   
public boolean existTrackingAreaCubiclesForTrackingArea(Integer trackAreaId,DomainFactory factory)
{
    if( trackAreaId == null)
        return false;

    StringBuffer hql = new StringBuffer();
    //List only Emergency Department
    hql.append(" select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackareaid)"); 
    List<?> trackingList = factory.find(hql.toString(), new String[]{"trackareaid"}, new Object[]{trackAreaId});
    if( trackingList != null && trackingList.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(trackingList);
        if( tempColl != null && tempColl.size() > 0)
            return true;
        else
            return false;
    }

    return false;

}
项目:openMAXIMS    文件:CubiclesRoomsBedsCCImpl.java   
public ims.emergency.vo.TrackingAreaCubiclesVo getTrackingAreaCubicle(ims.emergency.configuration.vo.TrackingAreaRefVo trackingAreaRef)
{
    if(trackingAreaRef == null)
        throw new CodingRuntimeException("TrackingAreaRefVo is null.");


    StringBuffer hql = new StringBuffer();
    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 ");
    hql.append("where (t2_1.id = :trackinAreaId) ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"trackinAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if (list!=null && list.size()>0)
    {
        return TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list).get(0);
    }
    return null;
}
项目:openMAXIMS    文件:TrackingConfigurationImpl.java   
public boolean existTrackingAreaCubiclesForTrackingArea(Integer trackAreaId,DomainFactory factory)
{
    if( trackAreaId == null)
        return false;

    StringBuffer hql = new StringBuffer();
    //List only Emergency Department
    hql.append(" select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackareaid)"); 
    List<?> trackingList = factory.find(hql.toString(), new String[]{"trackareaid"}, new Object[]{trackAreaId});
    if( trackingList != null && trackingList.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(trackingList);
        if( tempColl != null && tempColl.size() > 0)
            return true;
        else
            return false;
    }

    return false;

}
项目:openMAXIMS    文件:CubiclesRoomsBedsCCImpl.java   
public ims.emergency.vo.TrackingAreaCubiclesVo getTrackingAreaCubicle(ims.emergency.configuration.vo.TrackingAreaRefVo trackingAreaRef)
{
    if(trackingAreaRef == null)
        throw new CodingRuntimeException("TrackingAreaRefVo is null.");


    StringBuffer hql = new StringBuffer();
    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 ");
    hql.append("where (t2_1.id = :trackinAreaId) ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"trackinAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if (list!=null && list.size()>0)
    {
        return TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list).get(0);
    }
    return null;
}
项目:openmaxims-linux    文件:TrackingConfigurationImpl.java   
public boolean existTrackingAreaCubiclesForTrackingArea(Integer trackAreaId,DomainFactory factory)
{
    if( trackAreaId == null)
        return false;

    StringBuffer hql = new StringBuffer();
    //List only Emergency Department
    hql.append(" select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackareaid)"); 
    List<?> trackingList = factory.find(hql.toString(), new String[]{"trackareaid"}, new Object[]{trackAreaId});
    if( trackingList != null && trackingList.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(trackingList);
        if( tempColl != null && tempColl.size() > 0)
            return true;
        else
            return false;
    }

    return false;

}
项目:openmaxims-linux    文件:CubiclesRoomsBedsCCImpl.java   
public ims.emergency.vo.TrackingAreaCubiclesVo getTrackingAreaCubicle(ims.emergency.configuration.vo.TrackingAreaRefVo trackingAreaRef)
{
    if(trackingAreaRef == null)
        throw new CodingRuntimeException("TrackingAreaRefVo is null.");


    StringBuffer hql = new StringBuffer();
    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 ");
    hql.append("where (t2_1.id = :trackinAreaId) ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"trackinAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if (list!=null && list.size()>0)
    {
        return TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list).get(0);
    }
    return null;
}
项目:AvoinApotti    文件:AllocateCubicleImpl.java   
public TrackingAreaCubiclesVo getTrackingAreaCubicles(TrackingAreaRefVo trackingAreaRef)
{
    if( trackingAreaRef == null )
        return null;

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();

    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackingAreaId) ");

    List list = factory.find(hql.toString(), new String[] {"trackingAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if( list != null && list.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list);
        if( tempColl != null )
            return tempColl.get(0);

    }


    return null;


}
项目:AvoinApotti    文件:TrackingConfigurationImpl.java   
public TrackingAreaCubiclesVo saveTrackingAreaCubicle(TrackingAreaCubiclesVo trackingAreaCubicle) throws StaleObjectException, UniqueKeyViolationException
{
    if( trackingAreaCubicle == null)
        throw new CodingRuntimeException("TrackingAreaCubiclesVo is null");

    DomainFactory factory = getDomainFactory();

    if( trackingAreaCubicle != null && trackingAreaCubicle.getID_TrackingAreaCubicles() == null )
    {
        if( existTrackingAreaCubiclesForTrackingArea(trackingAreaCubicle.getTrackingArea().getID_TrackingArea(),factory) == true)
        {
            throw new StaleObjectException(null);

        }
    }

    TrackingAreaCubicles trackingAreaCub = TrackingAreaCubiclesVoAssembler.extractTrackingAreaCubicles(factory, trackingAreaCubicle);

    factory.save(trackingAreaCub);


    return TrackingAreaCubiclesVoAssembler.create(trackingAreaCub);

}
项目:openMAXIMS    文件:AllocateCubicleImpl.java   
public TrackingAreaCubiclesVo getTrackingAreaCubicles(TrackingAreaRefVo trackingAreaRef)
{
    if( trackingAreaRef == null )
        return null;

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();

    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackingAreaId) ");

    List list = factory.find(hql.toString(), new String[] {"trackingAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if( list != null && list.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list);
        if( tempColl != null )
            return tempColl.get(0);

    }


    return null;


}
项目:openMAXIMS    文件:TrackingConfigurationImpl.java   
public TrackingAreaCubiclesVo saveTrackingAreaCubicle(TrackingAreaCubiclesVo trackingAreaCubicle) throws StaleObjectException, UniqueKeyViolationException
{
    if( trackingAreaCubicle == null)
        throw new CodingRuntimeException("TrackingAreaCubiclesVo is null");

    DomainFactory factory = getDomainFactory();

    if( trackingAreaCubicle != null && trackingAreaCubicle.getID_TrackingAreaCubicles() == null )
    {
        if( existTrackingAreaCubiclesForTrackingArea(trackingAreaCubicle.getTrackingArea().getID_TrackingArea(),factory) == true)
        {
            throw new StaleObjectException(null);

        }
    }

    TrackingAreaCubicles trackingAreaCub = TrackingAreaCubiclesVoAssembler.extractTrackingAreaCubicles(factory, trackingAreaCubicle);

    factory.save(trackingAreaCub);


    return TrackingAreaCubiclesVoAssembler.create(trackingAreaCub);

}
项目:openMAXIMS    文件:AllocateCubicleImpl.java   
public TrackingAreaCubiclesVo getTrackingAreaCubicles(TrackingAreaRefVo trackingAreaRef)
{
    if( trackingAreaRef == null )
        return null;

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();

    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackingAreaId) ");

    List list = factory.find(hql.toString(), new String[] {"trackingAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if( list != null && list.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list);
        if( tempColl != null )
            return tempColl.get(0);

    }


    return null;


}
项目:openMAXIMS    文件:TrackingConfigurationImpl.java   
public TrackingAreaCubiclesVo saveTrackingAreaCubicle(TrackingAreaCubiclesVo trackingAreaCubicle) throws StaleObjectException, UniqueKeyViolationException
{
    if( trackingAreaCubicle == null)
        throw new CodingRuntimeException("TrackingAreaCubiclesVo is null");

    DomainFactory factory = getDomainFactory();

    if( trackingAreaCubicle != null && trackingAreaCubicle.getID_TrackingAreaCubicles() == null )
    {
        if( existTrackingAreaCubiclesForTrackingArea(trackingAreaCubicle.getTrackingArea().getID_TrackingArea(),factory) == true)
        {
            throw new StaleObjectException(null);

        }
    }

    TrackingAreaCubicles trackingAreaCub = TrackingAreaCubiclesVoAssembler.extractTrackingAreaCubicles(factory, trackingAreaCubicle);

    factory.save(trackingAreaCub);


    return TrackingAreaCubiclesVoAssembler.create(trackingAreaCub);

}
项目:openmaxims-linux    文件:AllocateCubicleImpl.java   
public TrackingAreaCubiclesVo getTrackingAreaCubicles(TrackingAreaRefVo trackingAreaRef)
{
    if( trackingAreaRef == null )
        return null;

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();

    hql.append("select t1_1 from TrackingAreaCubicles as t1_1 left join t1_1.trackingArea as t2_1 where (t2_1.id = :trackingAreaId) ");

    List list = factory.find(hql.toString(), new String[] {"trackingAreaId"}, new Object[] {trackingAreaRef.getID_TrackingArea()});

    if( list != null && list.size() > 0)
    {
        TrackingAreaCubiclesVoCollection tempColl = TrackingAreaCubiclesVoAssembler.createTrackingAreaCubiclesVoCollectionFromTrackingAreaCubicles(list);
        if( tempColl != null )
            return tempColl.get(0);

    }


    return null;


}
项目:openmaxims-linux    文件:TrackingConfigurationImpl.java   
public TrackingAreaCubiclesVo saveTrackingAreaCubicle(TrackingAreaCubiclesVo trackingAreaCubicle) throws StaleObjectException, UniqueKeyViolationException
{
    if( trackingAreaCubicle == null)
        throw new CodingRuntimeException("TrackingAreaCubiclesVo is null");

    DomainFactory factory = getDomainFactory();

    if( trackingAreaCubicle != null && trackingAreaCubicle.getID_TrackingAreaCubicles() == null )
    {
        if( existTrackingAreaCubiclesForTrackingArea(trackingAreaCubicle.getTrackingArea().getID_TrackingArea(),factory) == true)
        {
            throw new StaleObjectException(null);

        }
    }

    TrackingAreaCubicles trackingAreaCub = TrackingAreaCubiclesVoAssembler.extractTrackingAreaCubicles(factory, trackingAreaCubicle);

    factory.save(trackingAreaCub);


    return TrackingAreaCubiclesVoAssembler.create(trackingAreaCub);

}