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

项目:AvoinApotti    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo saveElectrotherapyPneumaticTreatmentVo(ElectrotherapyPneumaticVo electrotherapyPneumaticTreatmentVo) throws StaleObjectException, UniqueKeyViolationException
{
    if(electrotherapyPneumaticTreatmentVo == null)
        throw new CodingRuntimeException ("ElectrotherapyPneumaticVo is null");
    if (!electrotherapyPneumaticTreatmentVo.isValidated())
        throw new DomainRuntimeException ("This ElectrotherapyPneumaticVo has not been validated");

    DomainFactory factory = getDomainFactory(); 

    if (electrotherapyPneumaticTreatmentVo.getID_ElectrotherapyPneumatic() == null)//Inserting a record
    {
        ElectrotherapyPneumaticVo vo = getElectrotheraphyPneumaticVoByClinicalContact(electrotherapyPneumaticTreatmentVo.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyPneumatic domElectrotherapyPneumatic = ElectrotherapyPneumaticVoAssembler.extractElectrotherapyPneumatic(factory, electrotherapyPneumaticTreatmentVo);

    factory.save(domElectrotherapyPneumatic);

    return ElectrotherapyPneumaticVoAssembler.create(domElectrotherapyPneumatic);
}
项目:openMAXIMS    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo saveElectrotherapyPneumaticTreatmentVo(ElectrotherapyPneumaticVo electrotherapyPneumaticTreatmentVo) throws StaleObjectException, UniqueKeyViolationException
{
    if(electrotherapyPneumaticTreatmentVo == null)
        throw new CodingRuntimeException ("ElectrotherapyPneumaticVo is null");
    if (!electrotherapyPneumaticTreatmentVo.isValidated())
        throw new DomainRuntimeException ("This ElectrotherapyPneumaticVo has not been validated");

    DomainFactory factory = getDomainFactory(); 

    if (electrotherapyPneumaticTreatmentVo.getID_ElectrotherapyPneumatic() == null)//Inserting a record
    {
        ElectrotherapyPneumaticVo vo = getElectrotheraphyPneumaticVoByClinicalContact(electrotherapyPneumaticTreatmentVo.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyPneumatic domElectrotherapyPneumatic = ElectrotherapyPneumaticVoAssembler.extractElectrotherapyPneumatic(factory, electrotherapyPneumaticTreatmentVo);

    factory.save(domElectrotherapyPneumatic);

    return ElectrotherapyPneumaticVoAssembler.create(domElectrotherapyPneumatic);
}
项目:openMAXIMS    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo saveElectrotherapyPneumaticTreatmentVo(ElectrotherapyPneumaticVo electrotherapyPneumaticTreatmentVo) throws StaleObjectException, UniqueKeyViolationException
{
    if(electrotherapyPneumaticTreatmentVo == null)
        throw new CodingRuntimeException ("ElectrotherapyPneumaticVo is null");
    if (!electrotherapyPneumaticTreatmentVo.isValidated())
        throw new DomainRuntimeException ("This ElectrotherapyPneumaticVo has not been validated");

    DomainFactory factory = getDomainFactory(); 

    if (electrotherapyPneumaticTreatmentVo.getID_ElectrotherapyPneumatic() == null)//Inserting a record
    {
        ElectrotherapyPneumaticVo vo = getElectrotheraphyPneumaticVoByClinicalContact(electrotherapyPneumaticTreatmentVo.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyPneumatic domElectrotherapyPneumatic = ElectrotherapyPneumaticVoAssembler.extractElectrotherapyPneumatic(factory, electrotherapyPneumaticTreatmentVo);

    factory.save(domElectrotherapyPneumatic);

    return ElectrotherapyPneumaticVoAssembler.create(domElectrotherapyPneumatic);
}
项目:openmaxims-linux    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo saveElectrotherapyPneumaticTreatmentVo(ElectrotherapyPneumaticVo electrotherapyPneumaticTreatmentVo) throws StaleObjectException, UniqueKeyViolationException
{
    if(electrotherapyPneumaticTreatmentVo == null)
        throw new CodingRuntimeException ("ElectrotherapyPneumaticVo is null");
    if (!electrotherapyPneumaticTreatmentVo.isValidated())
        throw new DomainRuntimeException ("This ElectrotherapyPneumaticVo has not been validated");

    DomainFactory factory = getDomainFactory(); 

    if (electrotherapyPneumaticTreatmentVo.getID_ElectrotherapyPneumatic() == null)//Inserting a record
    {
        ElectrotherapyPneumaticVo vo = getElectrotheraphyPneumaticVoByClinicalContact(electrotherapyPneumaticTreatmentVo.getClinicalContact());
        if(vo != null)
            throw new UniqueKeyViolationException("The screen will be refreshed");
    }

    ElectrotherapyPneumatic domElectrotherapyPneumatic = ElectrotherapyPneumaticVoAssembler.extractElectrotherapyPneumatic(factory, electrotherapyPneumaticTreatmentVo);

    factory.save(domElectrotherapyPneumatic);

    return ElectrotherapyPneumaticVoAssembler.create(domElectrotherapyPneumatic);
}
项目:AvoinApotti    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumaticVoByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("ElectrotherapyPneumatic Filter not provided for get call. ");

    String hql = new String("from ElectrotherapyPneumatic p where p.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    ElectrotherapyPneumaticVoCollection coll = ElectrotherapyPneumaticVoAssembler.createElectrotherapyPneumaticVoCollectionFromElectrotherapyPneumatic(list);
    if(coll!=null && coll.size()>0)
        return coll.get(0);
    else
        return null;
}
项目:AvoinApotti    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumatic(ElectrotherapyPneumaticRefVo electrotherapyPneumatic)
{
    if(electrotherapyPneumatic == null || electrotherapyPneumatic.getID_ElectrotherapyPneumatic() == null)
        throw new CodingRuntimeException("Cannot get ElectrotherapyPneumatic on null Id.");

    return ElectrotherapyPneumaticVoAssembler.create((ElectrotherapyPneumatic) getDomainFactory().getDomainObject(ElectrotherapyPneumatic.class, electrotherapyPneumatic.getID_ElectrotherapyPneumatic()));
}
项目:openMAXIMS    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumaticVoByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("ElectrotherapyPneumatic Filter not provided for get call. ");

    String hql = new String("from ElectrotherapyPneumatic p where p.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    ElectrotherapyPneumaticVoCollection coll = ElectrotherapyPneumaticVoAssembler.createElectrotherapyPneumaticVoCollectionFromElectrotherapyPneumatic(list);
    if(coll!=null && coll.size()>0)
        return coll.get(0);
    else
        return null;
}
项目:openMAXIMS    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumatic(ElectrotherapyPneumaticRefVo electrotherapyPneumatic)
{
    if(electrotherapyPneumatic == null || electrotherapyPneumatic.getID_ElectrotherapyPneumatic() == null)
        throw new CodingRuntimeException("Cannot get ElectrotherapyPneumatic on null Id.");

    return ElectrotherapyPneumaticVoAssembler.create((ElectrotherapyPneumatic) getDomainFactory().getDomainObject(ElectrotherapyPneumatic.class, electrotherapyPneumatic.getID_ElectrotherapyPneumatic()));
}
项目:openMAXIMS    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumaticVoByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("ElectrotherapyPneumatic Filter not provided for get call. ");

    String hql = new String("from ElectrotherapyPneumatic p where p.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    ElectrotherapyPneumaticVoCollection coll = ElectrotherapyPneumaticVoAssembler.createElectrotherapyPneumaticVoCollectionFromElectrotherapyPneumatic(list);
    if(coll!=null && coll.size()>0)
        return coll.get(0);
    else
        return null;
}
项目:openMAXIMS    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumatic(ElectrotherapyPneumaticRefVo electrotherapyPneumatic)
{
    if(electrotherapyPneumatic == null || electrotherapyPneumatic.getID_ElectrotherapyPneumatic() == null)
        throw new CodingRuntimeException("Cannot get ElectrotherapyPneumatic on null Id.");

    return ElectrotherapyPneumaticVoAssembler.create((ElectrotherapyPneumatic) getDomainFactory().getDomainObject(ElectrotherapyPneumatic.class, electrotherapyPneumatic.getID_ElectrotherapyPneumatic()));
}
项目:openmaxims-linux    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumaticVoByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("ElectrotherapyPneumatic Filter not provided for get call. ");

    String hql = new String("from ElectrotherapyPneumatic p where p.clinicalContact.id = :CLINICAL_CONTACT_ID");

    java.util.List list = getDomainFactory().find(hql, "CLINICAL_CONTACT_ID", voClinicalContactRef.getID_ClinicalContact());

    ElectrotherapyPneumaticVoCollection coll = ElectrotherapyPneumaticVoAssembler.createElectrotherapyPneumaticVoCollectionFromElectrotherapyPneumatic(list);
    if(coll!=null && coll.size()>0)
        return coll.get(0);
    else
        return null;
}
项目:openmaxims-linux    文件:PneumaticImpl.java   
public ElectrotherapyPneumaticVo getElectrotheraphyPneumatic(ElectrotherapyPneumaticRefVo electrotherapyPneumatic)
{
    if(electrotherapyPneumatic == null || electrotherapyPneumatic.getID_ElectrotherapyPneumatic() == null)
        throw new CodingRuntimeException("Cannot get ElectrotherapyPneumatic on null Id.");

    return ElectrotherapyPneumaticVoAssembler.create((ElectrotherapyPneumatic) getDomainFactory().getDomainObject(ElectrotherapyPneumatic.class, electrotherapyPneumatic.getID_ElectrotherapyPneumatic()));
}