Java 类ims.nursing.vo.domain.StoolScaleVoAssembler 实例源码

项目:AvoinApotti    文件:StoolScaleImpl.java   
/**
 * Function used to list stool scale assessments for given care context
 */
public StoolScaleVoCollection listStoolScaleAssessments(CareContextRefVo careContext)
{
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        return null;
    List ss = getDomainFactory().find("from StoolScale stool where stool.careContext.id = " + careContext.getID_CareContext().toString());
    return StoolScaleVoAssembler.createStoolScaleVoCollectionFromStoolScale(ss);
}
项目:AvoinApotti    文件:StoolScaleImpl.java   
public StoolScaleVo saveStoolScaleAssessment(StoolScaleVo voStoolScale) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Ensure the Value Object was validated
    if (!voStoolScale.isValidated())
        throw new DomainRuntimeException("This Stool Scale has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.assessmenttools.domain.objects.StoolScale domStoolScale = StoolScaleVoAssembler.extractStoolScale(factory, voStoolScale);

    factory.save(domStoolScale);
    return StoolScaleVoAssembler.create(domStoolScale);
}
项目:openMAXIMS    文件:StoolScaleImpl.java   
/**
 * Function used to list stool scale assessments for given care context
 */
public StoolScaleVoCollection listStoolScaleAssessments(CareContextRefVo careContext)
{
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        return null;
    List ss = getDomainFactory().find("from StoolScale stool where stool.careContext.id = " + careContext.getID_CareContext().toString());
    return StoolScaleVoAssembler.createStoolScaleVoCollectionFromStoolScale(ss);
}
项目:openMAXIMS    文件:StoolScaleImpl.java   
public StoolScaleVo saveStoolScaleAssessment(StoolScaleVo voStoolScale) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Ensure the Value Object was validated
    if (!voStoolScale.isValidated())
        throw new DomainRuntimeException("This Stool Scale has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.assessmenttools.domain.objects.StoolScale domStoolScale = StoolScaleVoAssembler.extractStoolScale(factory, voStoolScale);

    factory.save(domStoolScale);
    return StoolScaleVoAssembler.create(domStoolScale);
}
项目:openMAXIMS    文件:StoolScaleImpl.java   
/**
 * Function used to list stool scale assessments for given care context
 */
public StoolScaleVoCollection listStoolScaleAssessments(CareContextRefVo careContext)
{
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        return null;
    List ss = getDomainFactory().find("from StoolScale stool where stool.careContext.id = " + careContext.getID_CareContext().toString());
    return StoolScaleVoAssembler.createStoolScaleVoCollectionFromStoolScale(ss);
}
项目:openMAXIMS    文件:StoolScaleImpl.java   
public StoolScaleVo saveStoolScaleAssessment(StoolScaleVo voStoolScale) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Ensure the Value Object was validated
    if (!voStoolScale.isValidated())
        throw new DomainRuntimeException("This Stool Scale has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.assessmenttools.domain.objects.StoolScale domStoolScale = StoolScaleVoAssembler.extractStoolScale(factory, voStoolScale);

    factory.save(domStoolScale);
    return StoolScaleVoAssembler.create(domStoolScale);
}
项目:openmaxims-linux    文件:StoolScaleImpl.java   
/**
 * Function used to list stool scale assessments for given care context
 */
public StoolScaleVoCollection listStoolScaleAssessments(CareContextRefVo careContext)
{
    if (careContext == null || !careContext.getID_CareContextIsNotNull())
        return null;
    List ss = getDomainFactory().find("from StoolScale stool where stool.careContext.id = " + careContext.getID_CareContext().toString());
    return StoolScaleVoAssembler.createStoolScaleVoCollectionFromStoolScale(ss);
}
项目:openmaxims-linux    文件:StoolScaleImpl.java   
public StoolScaleVo saveStoolScaleAssessment(StoolScaleVo voStoolScale) throws StaleObjectException, ForeignKeyViolationException, UniqueKeyViolationException
{
    // Ensure the Value Object was validated
    if (!voStoolScale.isValidated())
        throw new DomainRuntimeException("This Stool Scale has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.nursing.assessmenttools.domain.objects.StoolScale domStoolScale = StoolScaleVoAssembler.extractStoolScale(factory, voStoolScale);

    factory.save(domStoolScale);
    return StoolScaleVoAssembler.create(domStoolScale);
}