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

项目:AvoinApotti    文件:UltrasoundImpl.java   
public ElectrotherapyUltrasoundVo save(ElectrotherapyUltrasoundVo voElectroUltrasound) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!voElectroUltrasound.isValidated())
        throw new DomainRuntimeException("This Ultrasound has not been validated");

    DomainFactory factory = getDomainFactory();

    if (voElectroUltrasound.getID_ElectrotherapyUltrasound() == null)//Inserting a record
    {
        ElectrotherapyUltrasoundVo vo = getUltrasoundByClinicalContact(voElectroUltrasound.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyUltrasound doUltrasound = ElectrotherapyUltrasoundVoAssembler.extractElectrotherapyUltrasound(factory, voElectroUltrasound);
    factory.save(doUltrasound);

    return ElectrotherapyUltrasoundVoAssembler.create(doUltrasound);
}
项目:openMAXIMS    文件:UltrasoundImpl.java   
public ElectrotherapyUltrasoundVo save(ElectrotherapyUltrasoundVo voElectroUltrasound) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!voElectroUltrasound.isValidated())
        throw new DomainRuntimeException("This Ultrasound has not been validated");

    DomainFactory factory = getDomainFactory();

    if (voElectroUltrasound.getID_ElectrotherapyUltrasound() == null)//Inserting a record
    {
        ElectrotherapyUltrasoundVo vo = getUltrasoundByClinicalContact(voElectroUltrasound.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyUltrasound doUltrasound = ElectrotherapyUltrasoundVoAssembler.extractElectrotherapyUltrasound(factory, voElectroUltrasound);
    factory.save(doUltrasound);

    return ElectrotherapyUltrasoundVoAssembler.create(doUltrasound);
}
项目:openMAXIMS    文件:UltrasoundImpl.java   
public ElectrotherapyUltrasoundVo save(ElectrotherapyUltrasoundVo voElectroUltrasound) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!voElectroUltrasound.isValidated())
        throw new DomainRuntimeException("This Ultrasound has not been validated");

    DomainFactory factory = getDomainFactory();

    if (voElectroUltrasound.getID_ElectrotherapyUltrasound() == null)//Inserting a record
    {
        ElectrotherapyUltrasoundVo vo = getUltrasoundByClinicalContact(voElectroUltrasound.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyUltrasound doUltrasound = ElectrotherapyUltrasoundVoAssembler.extractElectrotherapyUltrasound(factory, voElectroUltrasound);
    factory.save(doUltrasound);

    return ElectrotherapyUltrasoundVoAssembler.create(doUltrasound);
}
项目:openmaxims-linux    文件:UltrasoundImpl.java   
public ElectrotherapyUltrasoundVo save(ElectrotherapyUltrasoundVo voElectroUltrasound) throws StaleObjectException, UniqueKeyViolationException 
{
    if(!voElectroUltrasound.isValidated())
        throw new DomainRuntimeException("This Ultrasound has not been validated");

    DomainFactory factory = getDomainFactory();

    if (voElectroUltrasound.getID_ElectrotherapyUltrasound() == null)//Inserting a record
    {
        ElectrotherapyUltrasoundVo vo = getUltrasoundByClinicalContact(voElectroUltrasound.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyUltrasound doUltrasound = ElectrotherapyUltrasoundVoAssembler.extractElectrotherapyUltrasound(factory, voElectroUltrasound);
    factory.save(doUltrasound);

    return ElectrotherapyUltrasoundVoAssembler.create(doUltrasound);
}
项目:AvoinApotti    文件:UltrasoundImpl.java   
/**
 * WDEV-13648
 * Get ElectrotherapyUltrasoundVo record by id
 */
public ElectrotherapyUltrasoundVo getUltrasound(ElectrotherapyUltrasoundRefVo ultrasound)
{
    // Check parameter
    if (ultrasound == null || !ultrasound.getID_ElectrotherapyUltrasoundIsNotNull())
        return null;

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().getDomainObject(ElectrotherapyUltrasound.class, ultrasound.getID_ElectrotherapyUltrasound()));
}
项目:AvoinApotti    文件:UltrasoundImpl.java   
private ElectrotherapyUltrasoundVo getUltrasoundByClinicalContact(ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("ElectrotherapyUltrasound Filter not provided for get call. ");

    String hql = "from ElectrotherapyUltrasound e where e.clinicalContact.id = :CLINICAL_CONTACT_ID and e.isRIE is null";

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().findFirst(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));
}
项目:openMAXIMS    文件:UltrasoundImpl.java   
/**
 * WDEV-13648
 * Get ElectrotherapyUltrasoundVo record by id
 */
public ElectrotherapyUltrasoundVo getUltrasound(ElectrotherapyUltrasoundRefVo ultrasound)
{
    // Check parameter
    if (ultrasound == null || !ultrasound.getID_ElectrotherapyUltrasoundIsNotNull())
        return null;

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().getDomainObject(ElectrotherapyUltrasound.class, ultrasound.getID_ElectrotherapyUltrasound()));
}
项目:openMAXIMS    文件:UltrasoundImpl.java   
private ElectrotherapyUltrasoundVo getUltrasoundByClinicalContact(ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("ElectrotherapyUltrasound Filter not provided for get call. ");

    String hql = "from ElectrotherapyUltrasound e where e.clinicalContact.id = :CLINICAL_CONTACT_ID and e.isRIE is null";

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().findFirst(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));
}
项目:openMAXIMS    文件:UltrasoundImpl.java   
/**
 * WDEV-13648
 * Get ElectrotherapyUltrasoundVo record by id
 */
public ElectrotherapyUltrasoundVo getUltrasound(ElectrotherapyUltrasoundRefVo ultrasound)
{
    // Check parameter
    if (ultrasound == null || !ultrasound.getID_ElectrotherapyUltrasoundIsNotNull())
        return null;

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().getDomainObject(ElectrotherapyUltrasound.class, ultrasound.getID_ElectrotherapyUltrasound()));
}
项目:openMAXIMS    文件:UltrasoundImpl.java   
private ElectrotherapyUltrasoundVo getUltrasoundByClinicalContact(ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("ElectrotherapyUltrasound Filter not provided for get call. ");

    String hql = "from ElectrotherapyUltrasound e where e.clinicalContact.id = :CLINICAL_CONTACT_ID and e.isRIE is null";

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().findFirst(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));
}
项目:openmaxims-linux    文件:UltrasoundImpl.java   
/**
 * WDEV-13648
 * Get ElectrotherapyUltrasoundVo record by id
 */
public ElectrotherapyUltrasoundVo getUltrasound(ElectrotherapyUltrasoundRefVo ultrasound)
{
    // Check parameter
    if (ultrasound == null || !ultrasound.getID_ElectrotherapyUltrasoundIsNotNull())
        return null;

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().getDomainObject(ElectrotherapyUltrasound.class, ultrasound.getID_ElectrotherapyUltrasound()));
}
项目:openmaxims-linux    文件:UltrasoundImpl.java   
private ElectrotherapyUltrasoundVo getUltrasoundByClinicalContact(ClinicalContactShortVo voClinicalContact)
{
    if(voClinicalContact == null)
        throw new CodingRuntimeException("ElectrotherapyUltrasound Filter not provided for get call. ");

    String hql = "from ElectrotherapyUltrasound e where e.clinicalContact.id = :CLINICAL_CONTACT_ID and e.isRIE is null";

    return ElectrotherapyUltrasoundVoAssembler.create((ElectrotherapyUltrasound) getDomainFactory().findFirst(hql, "CLINICAL_CONTACT_ID", voClinicalContact.getID_ClinicalContact()));
}