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

项目:AvoinApotti    文件:BobathImpl.java   
/**
* save a Bobath record
 * @throws UniqueKeyViolationException 
*/
public BobathVo saveBoBath(BobathVo voBobath) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(!voBobath.isValidated())
        throw new DomainRuntimeException("BoBath Value Object has not been validated");

    if (voBobath.getID_Bobath() == null && getBoBath(voBobath.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();     
    Bobath doBobath = BobathVoAssembler.extractBobath(factory,voBobath);

    factory.save(doBobath);

    return BobathVoAssembler.create(doBobath);      
}
项目:openMAXIMS    文件:BobathImpl.java   
/**
* save a Bobath record
 * @throws UniqueKeyViolationException 
*/
public BobathVo saveBoBath(BobathVo voBobath) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(!voBobath.isValidated())
        throw new DomainRuntimeException("BoBath Value Object has not been validated");

    if (voBobath.getID_Bobath() == null && getBoBath(voBobath.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();     
    Bobath doBobath = BobathVoAssembler.extractBobath(factory,voBobath);

    factory.save(doBobath);

    return BobathVoAssembler.create(doBobath);      
}
项目:openMAXIMS    文件:BobathImpl.java   
/**
* save a Bobath record
 * @throws UniqueKeyViolationException 
*/
public BobathVo saveBoBath(BobathVo voBobath) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(!voBobath.isValidated())
        throw new DomainRuntimeException("BoBath Value Object has not been validated");

    if (voBobath.getID_Bobath() == null && getBoBath(voBobath.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();     
    Bobath doBobath = BobathVoAssembler.extractBobath(factory,voBobath);

    factory.save(doBobath);

    return BobathVoAssembler.create(doBobath);      
}
项目:openmaxims-linux    文件:BobathImpl.java   
/**
* save a Bobath record
 * @throws UniqueKeyViolationException 
*/
public BobathVo saveBoBath(BobathVo voBobath) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException
{
    if(!voBobath.isValidated())
        throw new DomainRuntimeException("BoBath Value Object has not been validated");

    if (voBobath.getID_Bobath() == null && getBoBath(voBobath.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();     
    Bobath doBobath = BobathVoAssembler.extractBobath(factory,voBobath);

    factory.save(doBobath);

    return BobathVoAssembler.create(doBobath);      
}
项目:AvoinApotti    文件:BobathImpl.java   
/**
* get Bobath record for a clinical contact
*/
public BobathVo getBoBath(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("Bobath Filter not provided for get call. ");

    String hql = new String("from Bobath b where b.clinicalContact.id = :CLINICAL_CONTACT_ID");

    BobathVoCollection bobaths = BobathVoAssembler.createBobathVoCollectionFromBobath(getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));

    if (bobaths.size() > 0)
        return bobaths.get(0);

    return null;
}
项目:AvoinApotti    文件:BobathImpl.java   
public BobathVo getBoBathById(BobathRefVo recordID) 
{
    if( recordID == null)
        return null;

    Bobath doBobath = (Bobath)getDomainFactory().getDomainObject(Bobath.class, recordID.getID_Bobath());
    return BobathVoAssembler.create(doBobath);
}
项目:openMAXIMS    文件:BobathImpl.java   
/**
* get Bobath record for a clinical contact
*/
public BobathVo getBoBath(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("Bobath Filter not provided for get call. ");

    String hql = new String("from Bobath b where b.clinicalContact.id = :CLINICAL_CONTACT_ID");

    BobathVoCollection bobaths = BobathVoAssembler.createBobathVoCollectionFromBobath(getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));

    if (bobaths.size() > 0)
        return bobaths.get(0);

    return null;
}
项目:openMAXIMS    文件:BobathImpl.java   
public BobathVo getBoBathById(BobathRefVo recordID) 
{
    if( recordID == null)
        return null;

    Bobath doBobath = (Bobath)getDomainFactory().getDomainObject(Bobath.class, recordID.getID_Bobath());
    return BobathVoAssembler.create(doBobath);
}
项目:openMAXIMS    文件:BobathImpl.java   
/**
* get Bobath record for a clinical contact
*/
public BobathVo getBoBath(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("Bobath Filter not provided for get call. ");

    String hql = new String("from Bobath b where b.clinicalContact.id = :CLINICAL_CONTACT_ID");

    BobathVoCollection bobaths = BobathVoAssembler.createBobathVoCollectionFromBobath(getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));

    if (bobaths.size() > 0)
        return bobaths.get(0);

    return null;
}
项目:openMAXIMS    文件:BobathImpl.java   
public BobathVo getBoBathById(BobathRefVo recordID) 
{
    if( recordID == null)
        return null;

    Bobath doBobath = (Bobath)getDomainFactory().getDomainObject(Bobath.class, recordID.getID_Bobath());
    return BobathVoAssembler.create(doBobath);
}
项目:openmaxims-linux    文件:BobathImpl.java   
/**
* get Bobath record for a clinical contact
*/
public BobathVo getBoBath(ims.core.vo.ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("Bobath Filter not provided for get call. ");

    String hql = new String("from Bobath b where b.clinicalContact.id = :CLINICAL_CONTACT_ID");

    BobathVoCollection bobaths = BobathVoAssembler.createBobathVoCollectionFromBobath(getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));

    if (bobaths.size() > 0)
        return bobaths.get(0);

    return null;
}
项目:openmaxims-linux    文件:BobathImpl.java   
public BobathVo getBoBathById(BobathRefVo recordID) 
{
    if( recordID == null)
        return null;

    Bobath doBobath = (Bobath)getDomainFactory().getDomainObject(Bobath.class, recordID.getID_Bobath());
    return BobathVoAssembler.create(doBobath);
}