Java 类ims.admin.vo.domain.DementiaConfigurationVoAssembler 实例源码

项目: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);
}
项目: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    文件: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    文件: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    文件: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));
}