Java 类ims.nursing.vo.CarePlanForCopyCarePlansVoCollection 实例源码

项目:AvoinApotti    文件:CopyCarePlansImpl.java   
public void saveCarePlans(CarePlanForCopyCarePlansVoCollection collCarePlansToSave) throws StaleObjectException
{
    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        throw new CodingRuntimeException("Cannot copy Care Plans");
    }

    DomainFactory factory = getDomainFactory();

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        CarePlan domainCarePlan = CarePlanForCopyCarePlansVoAssembler.extractCarePlan(factory, collCarePlansToSave.get(i));
        factory.save(domainCarePlan);
    }
}
项目:openMAXIMS    文件:CopyCarePlansImpl.java   
public void saveCarePlans(CarePlanForCopyCarePlansVoCollection collCarePlansToSave) throws StaleObjectException
{
    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        throw new CodingRuntimeException("Cannot copy Care Plans");
    }

    DomainFactory factory = getDomainFactory();

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        CarePlan domainCarePlan = CarePlanForCopyCarePlansVoAssembler.extractCarePlan(factory, collCarePlansToSave.get(i));
        factory.save(domainCarePlan);
    }
}
项目:openMAXIMS    文件:CopyCarePlansImpl.java   
public void saveCarePlans(CarePlanForCopyCarePlansVoCollection collCarePlansToSave) throws StaleObjectException
{
    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        throw new CodingRuntimeException("Cannot copy Care Plans");
    }

    DomainFactory factory = getDomainFactory();

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        CarePlan domainCarePlan = CarePlanForCopyCarePlansVoAssembler.extractCarePlan(factory, collCarePlansToSave.get(i));
        factory.save(domainCarePlan);
    }
}
项目:openmaxims-linux    文件:CopyCarePlansImpl.java   
public void saveCarePlans(CarePlanForCopyCarePlansVoCollection collCarePlansToSave) throws StaleObjectException
{
    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        throw new CodingRuntimeException("Cannot copy Care Plans");
    }

    DomainFactory factory = getDomainFactory();

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        CarePlan domainCarePlan = CarePlanForCopyCarePlansVoAssembler.extractCarePlan(factory, collCarePlansToSave.get(i));
        factory.save(domainCarePlan);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean save()
{
    CarePlanForCopyCarePlansVoCollection collCarePlansToSave = new CarePlanForCopyCarePlansVoCollection();
    for (int i = 0; i < form.grdCarePlans().getRows().size(); i++)
    {
        if (form.grdCarePlans().getRows().get(i).getcolSelect())
        {
            collCarePlansToSave.add(populateCarePlanDataFromScreen(form.grdCarePlans().getRows().get(i).getValue()));
        }
    }

    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        engine.showMessage("At least one Care Plan should be selected to be able to copy!");
        return false;
    }

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        String[] errors = collCarePlansToSave.get(i).validate();
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
    }

    if (currentEpisodeHaveCarePlans())
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    try
    {
        domain.saveCarePlans(collCarePlansToSave);
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    CarePlanForCopyCarePlansVoCollection collCarePlansToSave = new CarePlanForCopyCarePlansVoCollection();
    for (int i = 0; i < form.grdCarePlans().getRows().size(); i++)
    {
        if (form.grdCarePlans().getRows().get(i).getcolSelect())
        {
            collCarePlansToSave.add(populateCarePlanDataFromScreen(form.grdCarePlans().getRows().get(i).getValue()));
        }
    }

    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        engine.showMessage("At least one Care Plan should be selected to be able to copy!");
        return false;
    }

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        String[] errors = collCarePlansToSave.get(i).validate();
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
    }

    if (currentEpisodeHaveCarePlans())
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    try
    {
        domain.saveCarePlans(collCarePlansToSave);
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    CarePlanForCopyCarePlansVoCollection collCarePlansToSave = new CarePlanForCopyCarePlansVoCollection();
    for (int i = 0; i < form.grdCarePlans().getRows().size(); i++)
    {
        if (form.grdCarePlans().getRows().get(i).getcolSelect())
        {
            collCarePlansToSave.add(populateCarePlanDataFromScreen(form.grdCarePlans().getRows().get(i).getValue()));
        }
    }

    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        engine.showMessage("At least one Care Plan should be selected to be able to copy!");
        return false;
    }

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        String[] errors = collCarePlansToSave.get(i).validate();
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
    }

    if (currentEpisodeHaveCarePlans())
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    try
    {
        domain.saveCarePlans(collCarePlansToSave);
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save()
{
    CarePlanForCopyCarePlansVoCollection collCarePlansToSave = new CarePlanForCopyCarePlansVoCollection();
    for (int i = 0; i < form.grdCarePlans().getRows().size(); i++)
    {
        if (form.grdCarePlans().getRows().get(i).getcolSelect())
        {
            collCarePlansToSave.add(populateCarePlanDataFromScreen(form.grdCarePlans().getRows().get(i).getValue()));
        }
    }

    if (collCarePlansToSave == null || collCarePlansToSave.size() == 0)
    {
        engine.showMessage("At least one Care Plan should be selected to be able to copy!");
        return false;
    }

    for (int i = 0; i < collCarePlansToSave.size(); i++)
    {
        String[] errors = collCarePlansToSave.get(i).validate();
        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }
    }

    if (currentEpisodeHaveCarePlans())
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    try
    {
        domain.saveCarePlans(collCarePlansToSave);
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.ABORT);
        return false;
    }

    return true;
}