Java 类ims.therapies.vo.domain.GaitVoAssembler 实例源码

项目:AvoinApotti    文件:GaitImpl.java   
/**
* get gait
*/
public ims.therapies.vo.GaitVo getGait(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get GaitVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from Gait as g1_1 where g1_1.clinicalContact.id = :CCID and g1_1.isRIE is null");

    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

    if (list == null || list.size() == 0)
        return null;
    else if (list.size() > 1)
        throw new RuntimeException("More than one Gait Treatment found for the current Clinical Contact");

    GaitVoCollection voColl = GaitVoAssembler.createGaitVoCollectionFromGait(list);
    if (voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:openMAXIMS    文件:GaitImpl.java   
/**
* get gait
*/
public ims.therapies.vo.GaitVo getGait(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get GaitVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from Gait as g1_1 where g1_1.clinicalContact.id = :CCID and g1_1.isRIE is null");

    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

    if (list == null || list.size() == 0)
        return null;
    else if (list.size() > 1)
        throw new RuntimeException("More than one Gait Treatment found for the current Clinical Contact");

    GaitVoCollection voColl = GaitVoAssembler.createGaitVoCollectionFromGait(list);
    if (voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:openMAXIMS    文件:GaitImpl.java   
/**
* get gait
*/
public ims.therapies.vo.GaitVo getGait(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get GaitVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from Gait as g1_1 where g1_1.clinicalContact.id = :CCID and g1_1.isRIE is null");

    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

    if (list == null || list.size() == 0)
        return null;
    else if (list.size() > 1)
        throw new RuntimeException("More than one Gait Treatment found for the current Clinical Contact");

    GaitVoCollection voColl = GaitVoAssembler.createGaitVoCollectionFromGait(list);
    if (voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:openmaxims-linux    文件:GaitImpl.java   
/**
* get gait
*/
public ims.therapies.vo.GaitVo getGait(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if (voClinicalContact == null)
        throw new RuntimeException("Cannot get GaitVo for null ClinicalContactShortVo");

    StringBuffer hql = new StringBuffer("from Gait as g1_1 where g1_1.clinicalContact.id = :CCID and g1_1.isRIE is null");

    List list = getDomainFactory().find(hql.toString(), "CCID", voClinicalContact.getID_ClinicalContact());

    if (list == null || list.size() == 0)
        return null;
    else if (list.size() > 1)
        throw new RuntimeException("More than one Gait Treatment found for the current Clinical Contact");

    GaitVoCollection voColl = GaitVoAssembler.createGaitVoCollectionFromGait(list);
    if (voColl.size() > 0)
        return voColl.get(0);

    return null;
}
项目:AvoinApotti    文件:GaitImpl.java   
/**
* save Gait
*/
public ims.therapies.vo.GaitVo save(ims.therapies.vo.GaitVo voGait) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voGait.isValidated())
        throw new DomainRuntimeException("This Gait record has not been validated");

    DomainFactory factory = getDomainFactory();
    Gait doGait = GaitVoAssembler.extractGait(factory, voGait);
    factory.save(doGait);

    return GaitVoAssembler.create(doGait);
}
项目:openMAXIMS    文件:GaitImpl.java   
/**
* save Gait
*/
public ims.therapies.vo.GaitVo save(ims.therapies.vo.GaitVo voGait) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voGait.isValidated())
        throw new DomainRuntimeException("This Gait record has not been validated");

    DomainFactory factory = getDomainFactory();
    Gait doGait = GaitVoAssembler.extractGait(factory, voGait);
    factory.save(doGait);

    return GaitVoAssembler.create(doGait);
}
项目:openMAXIMS    文件:GaitImpl.java   
/**
* save Gait
*/
public ims.therapies.vo.GaitVo save(ims.therapies.vo.GaitVo voGait) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voGait.isValidated())
        throw new DomainRuntimeException("This Gait record has not been validated");

    DomainFactory factory = getDomainFactory();
    Gait doGait = GaitVoAssembler.extractGait(factory, voGait);
    factory.save(doGait);

    return GaitVoAssembler.create(doGait);
}
项目:openmaxims-linux    文件:GaitImpl.java   
/**
* save Gait
*/
public ims.therapies.vo.GaitVo save(ims.therapies.vo.GaitVo voGait) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if(!voGait.isValidated())
        throw new DomainRuntimeException("This Gait record has not been validated");

    DomainFactory factory = getDomainFactory();
    Gait doGait = GaitVoAssembler.extractGait(factory, voGait);
    factory.save(doGait);

    return GaitVoAssembler.create(doGait);
}