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

项目:AvoinApotti    文件:ComplementaryTherapyImpl.java   
public ComplementaryTherapyTreatmentVo save(ComplementaryTherapyTreatmentVo voComplementaryTherapyTreat) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voComplementaryTherapyTreat.isValidated())
        throw new DomainRuntimeException("This Complementary Therapy Treatment has not been validated");

    if (voComplementaryTherapyTreat.getID_ComplementaryTherapyTreatment() == null && getComplementaryTherapyByClinicalContact(voComplementaryTherapyTreat.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    ComplementaryTherapyTreatment doComplementary = ComplementaryTherapyTreatmentVoAssembler.extractComplementaryTherapyTreatment(factory, voComplementaryTherapyTreat);
    factory.save(doComplementary);
    return ComplementaryTherapyTreatmentVoAssembler.create(doComplementary);
}
项目:AvoinApotti    文件:ComplementaryTherapyImpl.java   
private ComplementaryTherapyTreatmentVo getComplementaryTherapyByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get Complementary Therapy for null Clinical Contact");

    StringBuffer query = new StringBuffer("from ComplementaryTherapyTreatment ctt where ctt.clinicalContact.id = :CCID and ctt.isRIE is null");

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().findFirst(query.toString(), "CCID", voClinicalContactRef.getID_ClinicalContact()));
}
项目:AvoinApotti    文件:ComplementaryTherapyImpl.java   
/**
 *  WDEV-13581
 *  Function used to retrieve the Complementary Therapy Treatment record by ID
 */
public ComplementaryTherapyTreatmentVo getComplementaryTherapy(ComplementaryTherapyTreatmentRefVo complementaryTherapy)
{
    // For null parameter or not saved record return null
    if (complementaryTherapy == null || !complementaryTherapy.getID_ComplementaryTherapyTreatmentIsNotNull())
        return null;

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().getDomainObject(ComplementaryTherapyTreatment.class, complementaryTherapy.getID_ComplementaryTherapyTreatment()));
}
项目:openMAXIMS    文件:ComplementaryTherapyImpl.java   
public ComplementaryTherapyTreatmentVo save(ComplementaryTherapyTreatmentVo voComplementaryTherapyTreat) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voComplementaryTherapyTreat.isValidated())
        throw new DomainRuntimeException("This Complementary Therapy Treatment has not been validated");

    if (voComplementaryTherapyTreat.getID_ComplementaryTherapyTreatment() == null && getComplementaryTherapyByClinicalContact(voComplementaryTherapyTreat.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    ComplementaryTherapyTreatment doComplementary = ComplementaryTherapyTreatmentVoAssembler.extractComplementaryTherapyTreatment(factory, voComplementaryTherapyTreat);
    factory.save(doComplementary);
    return ComplementaryTherapyTreatmentVoAssembler.create(doComplementary);
}
项目:openMAXIMS    文件:ComplementaryTherapyImpl.java   
private ComplementaryTherapyTreatmentVo getComplementaryTherapyByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get Complementary Therapy for null Clinical Contact");

    StringBuffer query = new StringBuffer("from ComplementaryTherapyTreatment ctt where ctt.clinicalContact.id = :CCID and ctt.isRIE is null");

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().findFirst(query.toString(), "CCID", voClinicalContactRef.getID_ClinicalContact()));
}
项目:openMAXIMS    文件:ComplementaryTherapyImpl.java   
/**
 *  WDEV-13581
 *  Function used to retrieve the Complementary Therapy Treatment record by ID
 */
public ComplementaryTherapyTreatmentVo getComplementaryTherapy(ComplementaryTherapyTreatmentRefVo complementaryTherapy)
{
    // For null parameter or not saved record return null
    if (complementaryTherapy == null || !complementaryTherapy.getID_ComplementaryTherapyTreatmentIsNotNull())
        return null;

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().getDomainObject(ComplementaryTherapyTreatment.class, complementaryTherapy.getID_ComplementaryTherapyTreatment()));
}
项目:openMAXIMS    文件:ComplementaryTherapyImpl.java   
public ComplementaryTherapyTreatmentVo save(ComplementaryTherapyTreatmentVo voComplementaryTherapyTreat) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voComplementaryTherapyTreat.isValidated())
        throw new DomainRuntimeException("This Complementary Therapy Treatment has not been validated");

    if (voComplementaryTherapyTreat.getID_ComplementaryTherapyTreatment() == null && getComplementaryTherapyByClinicalContact(voComplementaryTherapyTreat.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    ComplementaryTherapyTreatment doComplementary = ComplementaryTherapyTreatmentVoAssembler.extractComplementaryTherapyTreatment(factory, voComplementaryTherapyTreat);
    factory.save(doComplementary);
    return ComplementaryTherapyTreatmentVoAssembler.create(doComplementary);
}
项目:openMAXIMS    文件:ComplementaryTherapyImpl.java   
private ComplementaryTherapyTreatmentVo getComplementaryTherapyByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get Complementary Therapy for null Clinical Contact");

    StringBuffer query = new StringBuffer("from ComplementaryTherapyTreatment ctt where ctt.clinicalContact.id = :CCID and ctt.isRIE is null");

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().findFirst(query.toString(), "CCID", voClinicalContactRef.getID_ClinicalContact()));
}
项目:openMAXIMS    文件:ComplementaryTherapyImpl.java   
/**
 *  WDEV-13581
 *  Function used to retrieve the Complementary Therapy Treatment record by ID
 */
public ComplementaryTherapyTreatmentVo getComplementaryTherapy(ComplementaryTherapyTreatmentRefVo complementaryTherapy)
{
    // For null parameter or not saved record return null
    if (complementaryTherapy == null || !complementaryTherapy.getID_ComplementaryTherapyTreatmentIsNotNull())
        return null;

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().getDomainObject(ComplementaryTherapyTreatment.class, complementaryTherapy.getID_ComplementaryTherapyTreatment()));
}
项目:openmaxims-linux    文件:ComplementaryTherapyImpl.java   
public ComplementaryTherapyTreatmentVo save(ComplementaryTherapyTreatmentVo voComplementaryTherapyTreat) throws StaleObjectException, UniqueKeyViolationException
{
    if(!voComplementaryTherapyTreat.isValidated())
        throw new DomainRuntimeException("This Complementary Therapy Treatment has not been validated");

    if (voComplementaryTherapyTreat.getID_ComplementaryTherapyTreatment() == null && getComplementaryTherapyByClinicalContact(voComplementaryTherapyTreat.getClinicalContact()) != null)
        throw new UniqueKeyViolationException("The screen will be refreshed.");

    DomainFactory factory = getDomainFactory();
    ComplementaryTherapyTreatment doComplementary = ComplementaryTherapyTreatmentVoAssembler.extractComplementaryTherapyTreatment(factory, voComplementaryTherapyTreat);
    factory.save(doComplementary);
    return ComplementaryTherapyTreatmentVoAssembler.create(doComplementary);
}
项目:openmaxims-linux    文件:ComplementaryTherapyImpl.java   
private ComplementaryTherapyTreatmentVo getComplementaryTherapyByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get Complementary Therapy for null Clinical Contact");

    StringBuffer query = new StringBuffer("from ComplementaryTherapyTreatment ctt where ctt.clinicalContact.id = :CCID and ctt.isRIE is null");

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().findFirst(query.toString(), "CCID", voClinicalContactRef.getID_ClinicalContact()));
}
项目:openmaxims-linux    文件:ComplementaryTherapyImpl.java   
/**
 *  WDEV-13581
 *  Function used to retrieve the Complementary Therapy Treatment record by ID
 */
public ComplementaryTherapyTreatmentVo getComplementaryTherapy(ComplementaryTherapyTreatmentRefVo complementaryTherapy)
{
    // For null parameter or not saved record return null
    if (complementaryTherapy == null || !complementaryTherapy.getID_ComplementaryTherapyTreatmentIsNotNull())
        return null;

    return ComplementaryTherapyTreatmentVoAssembler.create((ComplementaryTherapyTreatment) getDomainFactory().getDomainObject(ComplementaryTherapyTreatment.class, complementaryTherapy.getID_ComplementaryTherapyTreatment()));
}