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

项目:AvoinApotti    文件:EmergencyAttendanceDetailsCcImpl.java   
public EmergencyDeptType getEDDeptType(LocationRefVo locationRef)
{
    if(locationRef == null || locationRef.getID_Location() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "from DefaultEDLocationDeptType as defaultEdDeptType where defaultEdDeptType.location.id = :EmergencyLocation";
    List<?> edDeptType = factory.find(query, new String[] {"EmergencyLocation"}, new Object[] {locationRef.getID_Location()});

    if(edDeptType != null && edDeptType.size() > 0 && edDeptType.get(0)!=null)
    {
         return (DefaultEDLocationDeptTypeVoAssembler.create((DefaultEDLocationDeptType) edDeptType.get(0))).getDefaultDeptType();
    }

    return null;
}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public EmergencyDeptType getEDDeptType(LocationRefVo locationRef)
{
    if(locationRef == null || locationRef.getID_Location() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "from DefaultEDLocationDeptType as defaultEdDeptType where defaultEdDeptType.location.id = :EmergencyLocation";
    List<?> edDeptType = factory.find(query, new String[] {"EmergencyLocation"}, new Object[] {locationRef.getID_Location()});

    if(edDeptType != null && edDeptType.size() > 0 && edDeptType.get(0)!=null)
    {
         return (DefaultEDLocationDeptTypeVoAssembler.create((DefaultEDLocationDeptType) edDeptType.get(0))).getDefaultDeptType();
    }

    return null;
}
项目:openMAXIMS    文件:EDDepartmentTypeConfigImpl.java   
public void saveDefaultEDLocationDeptType(DefaultEDLocationDeptTypeVoCollection records) throws StaleObjectException
{
    if (records == null)
        throw new CodingRuntimeException("Cannot save null DefaultEDLocationDeptTypeVoCollection");

    DomainFactory factory = getDomainFactory();
    for( DefaultEDLocationDeptTypeVo record: records)
    {
        //wdev-19431
        if( record != null && !record.getID_DefaultEDLocationDeptTypeIsNotNull() && record.getLocationIsNotNull())
        {
            StringBuffer hql = new StringBuffer();
            hql.append("select d1_1 from DefaultEDLocationDeptType as d1_1 left join d1_1.location as l1_1 where (l1_1.id = :loc and (d1_1.isRIE = null or d1_1.isRIE = 0))");
            java.util.List list = getDomainFactory().find(hql.toString(), "loc",record.getLocation().getID_Location());
            if (list != null && list.size() > 0)
                throw new StaleObjectException(null);
        }
        //-----------
        DefaultEDLocationDeptType doDefaultEDLocationDeptType = DefaultEDLocationDeptTypeVoAssembler.extractDefaultEDLocationDeptType(factory, record);
        factory.save(doDefaultEDLocationDeptType);
    }

}
项目:openMAXIMS    文件:EmergencyAttendanceDetailsCcImpl.java   
public EmergencyDeptType getEDDeptType(LocationRefVo locationRef)
{
    if(locationRef == null || locationRef.getID_Location() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "from DefaultEDLocationDeptType as defaultEdDeptType where defaultEdDeptType.location.id = :EmergencyLocation";
    List<?> edDeptType = factory.find(query, new String[] {"EmergencyLocation"}, new Object[] {locationRef.getID_Location()});

    if(edDeptType != null && edDeptType.size() > 0 && edDeptType.get(0)!=null)
    {
         return (DefaultEDLocationDeptTypeVoAssembler.create((DefaultEDLocationDeptType) edDeptType.get(0))).getDefaultDeptType();
    }

    return null;
}
项目:openmaxims-linux    文件:EmergencyAttendanceDetailsCcImpl.java   
public EmergencyDeptType getEDDeptType(LocationRefVo locationRef)
{
    if(locationRef == null || locationRef.getID_Location() == null)
        return null;

    DomainFactory factory = getDomainFactory();
    String query = "from DefaultEDLocationDeptType as defaultEdDeptType where defaultEdDeptType.location.id = :EmergencyLocation";
    List<?> edDeptType = factory.find(query, new String[] {"EmergencyLocation"}, new Object[] {locationRef.getID_Location()});

    if(edDeptType != null && edDeptType.size() > 0 && edDeptType.get(0)!=null)
    {
         return (DefaultEDLocationDeptTypeVoAssembler.create((DefaultEDLocationDeptType) edDeptType.get(0))).getDefaultDeptType();
    }

    return null;
}
项目:AvoinApotti    文件:EDDepartmentTypeConfigImpl.java   
public void saveDefaultEDLocationDeptType(DefaultEDLocationDeptTypeVoCollection records) throws StaleObjectException
{
    if (records == null)
        throw new CodingRuntimeException("Cannot save null DefaultEDLocationDeptTypeVoCollection");

    DomainFactory factory = getDomainFactory();
    for( DefaultEDLocationDeptTypeVo record: records)
    {
        DefaultEDLocationDeptType doDefaultEDLocationDeptType = DefaultEDLocationDeptTypeVoAssembler.extractDefaultEDLocationDeptType(factory, record);
        factory.save(doDefaultEDLocationDeptType);
    }

}
项目:openMAXIMS    文件:EDDepartmentTypeConfigImpl.java   
public void saveDefaultEDLocationDeptType(DefaultEDLocationDeptTypeVoCollection records) throws StaleObjectException
{
    if (records == null)
        throw new CodingRuntimeException("Cannot save null DefaultEDLocationDeptTypeVoCollection");

    DomainFactory factory = getDomainFactory();
    for( DefaultEDLocationDeptTypeVo record: records)
    {
        DefaultEDLocationDeptType doDefaultEDLocationDeptType = DefaultEDLocationDeptTypeVoAssembler.extractDefaultEDLocationDeptType(factory, record);
        factory.save(doDefaultEDLocationDeptType);
    }

}
项目:openmaxims-linux    文件:EDDepartmentTypeConfigImpl.java   
public void saveDefaultEDLocationDeptType(DefaultEDLocationDeptTypeVoCollection records) throws StaleObjectException
{
    if (records == null)
        throw new CodingRuntimeException("Cannot save null DefaultEDLocationDeptTypeVoCollection");

    DomainFactory factory = getDomainFactory();
    for( DefaultEDLocationDeptTypeVo record: records)
    {
        DefaultEDLocationDeptType doDefaultEDLocationDeptType = DefaultEDLocationDeptTypeVoAssembler.extractDefaultEDLocationDeptType(factory, record);
        factory.save(doDefaultEDLocationDeptType);
    }

}
项目:AvoinApotti    文件:EDDepartmentTypeConfigImpl.java   
public ims.emergency.vo.DefaultEDLocationDeptTypeVoCollection getDefaultEDLocationDeptTypes()
{

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();

    hql.append("select d1_1 from DefaultEDLocationDeptType as d1_1  order by d1_1.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString());

    if ( list != null && list.size() > 0)
    {
        DefaultEDLocationDeptTypeVoCollection tempColl = DefaultEDLocationDeptTypeVoAssembler.createDefaultEDLocationDeptTypeVoCollectionFromDefaultEDLocationDeptType(list);
        return tempColl;
    }
    return null;



}
项目:openMAXIMS    文件:EDDepartmentTypeConfigImpl.java   
public ims.emergency.vo.DefaultEDLocationDeptTypeVoCollection getDefaultEDLocationDeptTypes()
{

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();

    hql.append("select d1_1 from DefaultEDLocationDeptType as d1_1  order by d1_1.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString());

    if ( list != null && list.size() > 0)
    {
        DefaultEDLocationDeptTypeVoCollection tempColl = DefaultEDLocationDeptTypeVoAssembler.createDefaultEDLocationDeptTypeVoCollectionFromDefaultEDLocationDeptType(list);
        return tempColl;
    }
    return null;



}
项目:openMAXIMS    文件:EDDepartmentTypeConfigImpl.java   
public ims.emergency.vo.DefaultEDLocationDeptTypeVoCollection getDefaultEDLocationDeptTypes()
{

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();

    hql.append("select d1_1 from DefaultEDLocationDeptType as d1_1  order by d1_1.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString());

    if ( list != null && list.size() > 0)
    {
        DefaultEDLocationDeptTypeVoCollection tempColl = DefaultEDLocationDeptTypeVoAssembler.createDefaultEDLocationDeptTypeVoCollectionFromDefaultEDLocationDeptType(list);
        return tempColl;
    }
    return null;



}
项目:openmaxims-linux    文件:EDDepartmentTypeConfigImpl.java   
public ims.emergency.vo.DefaultEDLocationDeptTypeVoCollection getDefaultEDLocationDeptTypes()
{

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();

    hql.append("select d1_1 from DefaultEDLocationDeptType as d1_1  order by d1_1.systemInformation.creationDateTime desc");

    List<?> list = factory.find(hql.toString());

    if ( list != null && list.size() > 0)
    {
        DefaultEDLocationDeptTypeVoCollection tempColl = DefaultEDLocationDeptTypeVoAssembler.createDefaultEDLocationDeptTypeVoCollectionFromDefaultEDLocationDeptType(list);
        return tempColl;
    }
    return null;



}