Java 类ims.admin.vo.DementiaConfigurationVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(DementiaConfigurationVo dementiaConfigurationVo)
{
    clearScreen();
    if (dementiaConfigurationVo == null)
        return;

    form.intAge().setValue(dementiaConfigurationVo.getAge());
    form.intExcludeFAIRPeriod().setValue(dementiaConfigurationVo.getExcludeFAIRPeriod());
    form.intStepOnePeriod().setValue(dementiaConfigurationVo.getStepOnePeriod());
    form.intRemoveTimePeriod().setValue(dementiaConfigurationVo.getRemoveTimePeriod());
    form.intAMTSThresholdScore().setValue(dementiaConfigurationVo.getAMTSThresholdScore());

    populateAdmissionType(dementiaConfigurationVo.getAdmissionTypes());

    DementiaColourConfigVoCollection collColourConfigVo = dementiaConfigurationVo.getColourConfig();
    collColourConfigVo.sort(SortOrder.ASCENDING);

    populateColourConfigDynamicGrid(collColourConfigVo.sort(SortOrder.ASCENDING));

}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DementiaConfigurationVo dementiaConfigurationVo)
{
    clearScreen();
    if (dementiaConfigurationVo == null)
        return;

    form.intAge().setValue(dementiaConfigurationVo.getAge());
    form.intExcludeFAIRPeriod().setValue(dementiaConfigurationVo.getExcludeFAIRPeriod());
    form.intStepOnePeriod().setValue(dementiaConfigurationVo.getStepOnePeriod());
    form.intRemoveTimePeriod().setValue(dementiaConfigurationVo.getRemoveTimePeriod());
    form.intAMTSThresholdScore().setValue(dementiaConfigurationVo.getAMTSThresholdScore());

    populateAdmissionType(dementiaConfigurationVo.getAdmissionTypes());

    DementiaColourConfigVoCollection collColourConfigVo = dementiaConfigurationVo.getColourConfig();
    collColourConfigVo.sort(SortOrder.ASCENDING);

    form.cmbRecentlyAssessedColour().setValue(dementiaConfigurationVo.getRecentlyAssessed());//WDEV-18700
    populateColourConfigDynamicGrid(collColourConfigVo.sort(SortOrder.ASCENDING));

}
项目:openMAXIMS    文件:DementiaConfigurationImpl.java   
public DementiaConfigurationVo save(DementiaConfigurationVo dementiaConfigToSave) throws StaleObjectException, UniqueKeyViolationException
{
    if (dementiaConfigToSave == null)
        throw new CodingRuntimeException("Cannot save null DementiaConfiguration ");

    if (!dementiaConfigToSave.isValidated())
        throw new DomainRuntimeException("DementiaConfiguration Not Validated.");

    if (isDementiaConfigurationRecorded(dementiaConfigToSave)) //WDEV-18743
        throw new UniqueKeyViolationException("A dementia configuration record has already been saved. The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    DementiaConfiguration domainDementiaConfig = DementiaConfigurationVoAssembler.extractDementiaConfiguration(factory, dementiaConfigToSave);

    factory.save(domainDementiaConfig);

    return DementiaConfigurationVoAssembler.create(domainDementiaConfig);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DementiaConfigurationVo dementiaConfigurationVo)
{
    clearScreen();
    if (dementiaConfigurationVo == null)
        return;

    form.intAge().setValue(dementiaConfigurationVo.getAge());
    form.intExcludeFAIRPeriod().setValue(dementiaConfigurationVo.getExcludeFAIRPeriod());
    form.intStepOnePeriod().setValue(dementiaConfigurationVo.getStepOnePeriod());
    form.intRemoveTimePeriod().setValue(dementiaConfigurationVo.getRemoveTimePeriod());
    form.intAMTSThresholdScore().setValue(dementiaConfigurationVo.getAMTSThresholdScore());

    populateAdmissionType(dementiaConfigurationVo.getAdmissionTypes());

    DementiaColourConfigVoCollection collColourConfigVo = dementiaConfigurationVo.getColourConfig();
    collColourConfigVo.sort(SortOrder.ASCENDING);

    populateColourConfigDynamicGrid(collColourConfigVo.sort(SortOrder.ASCENDING));

}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(DementiaConfigurationVo dementiaConfigurationVo)
{
    clearScreen();
    if (dementiaConfigurationVo == null)
        return;

    form.intAge().setValue(dementiaConfigurationVo.getAge());
    form.intExcludeFAIRPeriod().setValue(dementiaConfigurationVo.getExcludeFAIRPeriod());
    form.intStepOnePeriod().setValue(dementiaConfigurationVo.getStepOnePeriod());
    form.intRemoveTimePeriod().setValue(dementiaConfigurationVo.getRemoveTimePeriod());
    form.intAMTSThresholdScore().setValue(dementiaConfigurationVo.getAMTSThresholdScore());

    populateAdmissionType(dementiaConfigurationVo.getAdmissionTypes());

    DementiaColourConfigVoCollection collColourConfigVo = dementiaConfigurationVo.getColourConfig();
    collColourConfigVo.sort(SortOrder.ASCENDING);

    populateColourConfigDynamicGrid(collColourConfigVo.sort(SortOrder.ASCENDING));

}
项目:AvoinApotti    文件:Logic.java   
private boolean save()
{
    DementiaConfigurationVo dementiaConfigToSave = populateDataFromScreen(form.getLocalContext().getcurrentDementiaConfig());

    if (dementiaConfigToSave==null)
    {
        engine.showMessage("Please use the script to introduce the record in DB!");
        open();
        return false;
    }

    String[] errors = dementiaConfigToSave.validate(validateColourConfigHours(dementiaConfigToSave.getColourConfig()));

    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        form.getLocalContext().setcurrentDementiaConfig(domain.save(dementiaConfigToSave));
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:AvoinApotti    文件:DementiaConfigurationImpl.java   
public DementiaConfigurationVo save(DementiaConfigurationVo dementiaConfigToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (dementiaConfigToSave == null)
        throw new CodingRuntimeException("Cannot save null DementiaConfiguration ");

    if (!dementiaConfigToSave.isValidated())
        throw new DomainRuntimeException("DementiaConfiguration Not Validated.");

    DomainFactory factory = getDomainFactory();
    DementiaConfiguration domainDementiaConfig = DementiaConfigurationVoAssembler.extractDementiaConfiguration(factory, dementiaConfigToSave);

    factory.save(domainDementiaConfig);

    return DementiaConfigurationVoAssembler.create(domainDementiaConfig);
}
项目:AvoinApotti    文件:DementiaConfigurationImpl.java   
public ims.admin.vo.DementiaConfigurationVo getDementiaConfig()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DementiaConfiguration as dementiaConfig");

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

    if (list == null || list.size() == 0)
        return null;

    return DementiaConfigurationVoAssembler.create((DementiaConfiguration) list.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    DementiaConfigurationVo dementiaConfigToSave = populateDataFromScreen(form.getLocalContext().getcurrentDementiaConfig());

    String[] errors = dementiaConfigToSave.validate(validateColourConfigHours(dementiaConfigToSave.getColourConfig()));

    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        form.getLocalContext().setcurrentDementiaConfig(domain.save(dementiaConfigToSave));
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
    catch (UniqueKeyViolationException ex)//WDEV-18743
    {
        engine.showMessage(ex.getMessage());
        open();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:DementiaConfigurationImpl.java   
private boolean isDementiaConfigurationRecorded(DementiaConfigurationVo dementiaConfigToSave)
{
    String hql = "select dcfg from DementiaConfiguration as dcfg where dcfg.id <> " + dementiaConfigToSave.getID_DementiaConfiguration();

    List<?> results = getDomainFactory().find(hql);

    if (results != null && results.size() > 0)
    {
        return true;
    }   
    return false;
}
项目:openMAXIMS    文件:DementiaConfigurationImpl.java   
public ims.admin.vo.DementiaConfigurationVo getDementiaConfig()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DementiaConfiguration as dementiaConfig");

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

    if (list == null || list.size() == 0)
        return null;

    return DementiaConfigurationVoAssembler.create((DementiaConfiguration) list.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    DementiaConfigurationVo dementiaConfigToSave = populateDataFromScreen(form.getLocalContext().getcurrentDementiaConfig());

    if (dementiaConfigToSave==null)
    {
        engine.showMessage("Please use the script to introduce the record in DB!");
        open();
        return false;
    }

    String[] errors = dementiaConfigToSave.validate(validateColourConfigHours(dementiaConfigToSave.getColourConfig()));

    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        form.getLocalContext().setcurrentDementiaConfig(domain.save(dementiaConfigToSave));
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:DementiaConfigurationImpl.java   
public DementiaConfigurationVo save(DementiaConfigurationVo dementiaConfigToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (dementiaConfigToSave == null)
        throw new CodingRuntimeException("Cannot save null DementiaConfiguration ");

    if (!dementiaConfigToSave.isValidated())
        throw new DomainRuntimeException("DementiaConfiguration Not Validated.");

    DomainFactory factory = getDomainFactory();
    DementiaConfiguration domainDementiaConfig = DementiaConfigurationVoAssembler.extractDementiaConfiguration(factory, dementiaConfigToSave);

    factory.save(domainDementiaConfig);

    return DementiaConfigurationVoAssembler.create(domainDementiaConfig);
}
项目:openMAXIMS    文件:DementiaConfigurationImpl.java   
public ims.admin.vo.DementiaConfigurationVo getDementiaConfig()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DementiaConfiguration as dementiaConfig");

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

    if (list == null || list.size() == 0)
        return null;

    return DementiaConfigurationVoAssembler.create((DementiaConfiguration) list.get(0));
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save()
{
    DementiaConfigurationVo dementiaConfigToSave = populateDataFromScreen(form.getLocalContext().getcurrentDementiaConfig());

    if (dementiaConfigToSave==null)
    {
        engine.showMessage("Please use the script to introduce the record in DB!");
        open();
        return false;
    }

    String[] errors = dementiaConfigToSave.validate(validateColourConfigHours(dementiaConfigToSave.getColourConfig()));

    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try
    {
        form.getLocalContext().setcurrentDementiaConfig(domain.save(dementiaConfigToSave));
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:DementiaConfigurationImpl.java   
public DementiaConfigurationVo save(DementiaConfigurationVo dementiaConfigToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (dementiaConfigToSave == null)
        throw new CodingRuntimeException("Cannot save null DementiaConfiguration ");

    if (!dementiaConfigToSave.isValidated())
        throw new DomainRuntimeException("DementiaConfiguration Not Validated.");

    DomainFactory factory = getDomainFactory();
    DementiaConfiguration domainDementiaConfig = DementiaConfigurationVoAssembler.extractDementiaConfiguration(factory, dementiaConfigToSave);

    factory.save(domainDementiaConfig);

    return DementiaConfigurationVoAssembler.create(domainDementiaConfig);
}
项目:openmaxims-linux    文件:DementiaConfigurationImpl.java   
public ims.admin.vo.DementiaConfigurationVo getDementiaConfig()
{
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DementiaConfiguration as dementiaConfig");

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

    if (list == null || list.size() == 0)
        return null;

    return DementiaConfigurationVoAssembler.create((DementiaConfiguration) list.get(0));
}
项目:AvoinApotti    文件:DementiaWorklistImpl.java   
public DementiaConfigurationVo getDementiaConfiguration()
{
    DementiaConfiguration implDementia = (DementiaConfiguration) getDomainImpl(DementiaConfigurationImpl.class);
    return implDementia.getDementiaConfig();
}
项目:openMAXIMS    文件:DementiaWorklistImpl.java   
public DementiaConfigurationVo getDementiaConfiguration()
{
    DementiaConfiguration implDementia = (DementiaConfiguration) getDomainImpl(DementiaConfigurationImpl.class);
    return implDementia.getDementiaConfig();
}
项目:openMAXIMS    文件:DementiaWorklistImpl.java   
public DementiaConfigurationVo getDementiaConfiguration()
{
    DementiaConfiguration implDementia = (DementiaConfiguration) getDomainImpl(DementiaConfigurationImpl.class);
    return implDementia.getDementiaConfig();
}
项目:openmaxims-linux    文件:DementiaWorklistImpl.java   
public DementiaConfigurationVo getDementiaConfiguration()
{
    DementiaConfiguration implDementia = (DementiaConfiguration) getDomainImpl(DementiaConfigurationImpl.class);
    return implDementia.getDementiaConfig();
}