Java 类ims.core.vo.FloorBedSpaceLayoutVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void open()
{
    if (form.getGlobalContext().Core.BedFloorLayout.getSelection() != null)
    {
        FloorBedSpaceLayoutVo value = domain.get(form.getGlobalContext().Core.BedFloorLayout.getSelection());

        if (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))
        {
            FloorBedSpaceLayoutVo record = new FloorBedSpaceLayoutVo();
            record.setBedSpaces(value.getBedSpaces());
            record.setFloorLayout(value.getFloorLayout());
            record.setName(null);
            record.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
            record.setIsTemplate(true);
            populateScreenFromData(record);
        }
        else
        {
            populateScreenFromData(value);
            form.chkIsTemplate().setEnabled(false);
        }
    }
    else
        form.chkIsTemplate().setValue(true);
}
项目:AvoinApotti    文件:WardViewImpl.java   
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation location)
{
        if(location == null )
        throw new DomainRuntimeException("Invalid ILocation");

    String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() +  " and  bay.id = " + location.getID();
    List layout = getDomainFactory().find(hql);

    FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout);

    if (voColl != null &&
            voColl.size() > 0)
        return voColl.get(voColl.size()-1);     

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    if (form.getGlobalContext().Core.BedFloorLayout.getSelection() != null)
    {
        FloorBedSpaceLayoutVo value = domain.get(form.getGlobalContext().Core.BedFloorLayout.getSelection());

        if (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))
        {
            FloorBedSpaceLayoutVo record = new FloorBedSpaceLayoutVo();
            record.setBedSpaces(value.getBedSpaces());
            record.setFloorLayout(value.getFloorLayout());
            record.setName(null);
            record.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
            record.setIsTemplate(true);
            populateScreenFromData(record);
        }
        else
        {
            populateScreenFromData(value);
            if (FormMode.EDIT.equals(form.getMode()))
                form.chkIsTemplate().setEnabled(false);
        }
    }
    else
        form.chkIsTemplate().setValue(true);
}
项目:openMAXIMS    文件:AllocateBedsPriorAdmissionImpl.java   
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation selectedBay)
{
    if(selectedBay == null )
        throw new DomainRuntimeException("Invalid ILocation");

    String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() +  " and  bay.id = " + selectedBay.getID();
    List layout = getDomainFactory().find(hql);

    FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout);

    if (voColl != null &&
            voColl.size() > 0)
        return voColl.get(voColl.size()-1);     

    return null;
}
项目:openMAXIMS    文件:WardViewImpl.java   
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation location)
{
        if(location == null )
        throw new DomainRuntimeException("Invalid ILocation");

    String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() +  " and  bay.id = " + location.getID();
    List<?> layout = getDomainFactory().find(hql);

    FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout);

    if (voColl != null &&
            voColl.size() > 0)
        return voColl.get(voColl.size()-1);     

    return null;
}
项目:openMAXIMS    文件:WardViewImpl.java   
private int getNumberOfOccupiedBedsInBay(LocationRefVo bay)
{
    int occupiedBeds = 0;

    FloorBedSpaceLayoutVo layout = listLayoutForCurrentBay((ILocation) bay);

    if (layout != null && layout.getFloorLayout() != null && layout.getBedSpaces() != null)
    {

        for (int x = 0; x < layout.getBedSpaces().size(); x++)
        {
            BedSpaceVo bedVo = layout.getBedSpaces().get(x);

            BedSpaceStateLiteVo state = getBedSpaceState(bedVo);

            if (state != null && state.getCurrentBedStatus() != null && BedStatus.OCCUPIED.equals(state.getCurrentBedStatus().getBedStatus()))
            {
                occupiedBeds += 1;
            }
        }
    }

    return occupiedBeds;
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    if (form.getGlobalContext().Core.BedFloorLayout.getSelection() != null)
    {
        FloorBedSpaceLayoutVo value = domain.get(form.getGlobalContext().Core.BedFloorLayout.getSelection());

        if (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))
        {
            FloorBedSpaceLayoutVo record = new FloorBedSpaceLayoutVo();
            record.setBedSpaces(value.getBedSpaces());
            record.setFloorLayout(value.getFloorLayout());
            record.setName(null);
            record.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
            record.setIsTemplate(true);
            populateScreenFromData(record);
        }
        else
        {
            populateScreenFromData(value);
            form.chkIsTemplate().setEnabled(false);
        }
    }
    else
        form.chkIsTemplate().setValue(true);
}
项目:openMAXIMS    文件:WardViewImpl.java   
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation location)
{
        if(location == null )
        throw new DomainRuntimeException("Invalid ILocation");

    String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() +  " and  bay.id = " + location.getID();
    List layout = getDomainFactory().find(hql);

    FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout);

    if (voColl != null &&
            voColl.size() > 0)
        return voColl.get(voColl.size()-1);     

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void open()
{
    if (form.getGlobalContext().Core.BedFloorLayout.getSelection() != null)
    {
        FloorBedSpaceLayoutVo value = domain.get(form.getGlobalContext().Core.BedFloorLayout.getSelection());

        if (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))
        {
            FloorBedSpaceLayoutVo record = new FloorBedSpaceLayoutVo();
            record.setBedSpaces(value.getBedSpaces());
            record.setFloorLayout(value.getFloorLayout());
            record.setName(null);
            record.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
            record.setIsTemplate(true);
            populateScreenFromData(record);
        }
        else
        {
            populateScreenFromData(value);
            form.chkIsTemplate().setEnabled(false);
        }
    }
    else
        form.chkIsTemplate().setValue(true);
}
项目:openmaxims-linux    文件:WardViewImpl.java   
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation location)
{
        if(location == null )
        throw new DomainRuntimeException("Invalid ILocation");

    String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() +  " and  bay.id = " + location.getID();
    List layout = getDomainFactory().find(hql);

    FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout);

    if (voColl != null &&
            voColl.size() > 0)
        return voColl.get(voColl.size()-1);     

    return null;
}
项目:AvoinApotti    文件:WardViewImpl.java   
public ims.core.vo.FloorBedSpaceLayoutVo get(ims.core.layout.vo.FloorBedSpaceLayoutRefVo id)
{
    if(id == null)
        throw new DomainRuntimeException("Invalid Floor Bed Layout");

    return FloorBedSpaceLayoutVoAssembler.create((FloorBedSpaceLayout)getDomainFactory().getDomainObject(id));
}
项目:openMAXIMS    文件:WardViewImpl.java   
public ims.core.vo.FloorBedSpaceLayoutVo get(ims.core.layout.vo.FloorBedSpaceLayoutRefVo id)
{
    if(id == null)
        throw new DomainRuntimeException("Invalid Floor Bed Layout");

    return FloorBedSpaceLayoutVoAssembler.create((FloorBedSpaceLayout)getDomainFactory().getDomainObject(id));
}
项目:openMAXIMS    文件:WardViewImpl.java   
public ims.core.vo.FloorBedSpaceLayoutVo get(ims.core.layout.vo.FloorBedSpaceLayoutRefVo id)
{
    if(id == null)
        throw new DomainRuntimeException("Invalid Floor Bed Layout");

    return FloorBedSpaceLayoutVoAssembler.create((FloorBedSpaceLayout)getDomainFactory().getDomainObject(id));
}
项目:openmaxims-linux    文件:WardViewImpl.java   
public ims.core.vo.FloorBedSpaceLayoutVo get(ims.core.layout.vo.FloorBedSpaceLayoutRefVo id)
{
    if(id == null)
        throw new DomainRuntimeException("Invalid Floor Bed Layout");

    return FloorBedSpaceLayoutVoAssembler.create((FloorBedSpaceLayout)getDomainFactory().getDomainObject(id));
}