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

项目:AvoinApotti    文件:ThermalImpl.java   
public ims.therapies.vo.ThermalVo saveThermalDetails(ims.therapies.vo.ThermalVo voThermal) throws StaleObjectException, UniqueKeyViolationException
{
    if(voThermal == null)
        throw new DomainRuntimeException("Cannot save null Thermal record");

    // Ensure the value object has been validated
    if (!voThermal.isValidated())
        throw new DomainRuntimeException("Thermal Record has not been validated");

    /*  WDEV-13649if(voThermal.getID_Thermal() == null)
    {
        List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voThermal.getClinicalContact()));
        if (list != null && list.size() > 0)
            throw new StaleObjectException((Thermal)list.get(0));
    }*/
    DomainFactory factory = getDomainFactory();
    Thermal domThermal = ThermalVoAssembler.extractThermal(factory, voThermal);

    factory.save(domThermal);

    return ThermalVoAssembler.create(domThermal);
}
项目:openMAXIMS    文件:ThermalImpl.java   
public ims.therapies.vo.ThermalVo saveThermalDetails(ims.therapies.vo.ThermalVo voThermal) throws StaleObjectException, UniqueKeyViolationException
{
    if(voThermal == null)
        throw new DomainRuntimeException("Cannot save null Thermal record");

    // Ensure the value object has been validated
    if (!voThermal.isValidated())
        throw new DomainRuntimeException("Thermal Record has not been validated");

    /*  WDEV-13649if(voThermal.getID_Thermal() == null)
    {
        List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voThermal.getClinicalContact()));
        if (list != null && list.size() > 0)
            throw new StaleObjectException((Thermal)list.get(0));
    }*/
    DomainFactory factory = getDomainFactory();
    Thermal domThermal = ThermalVoAssembler.extractThermal(factory, voThermal);

    factory.save(domThermal);

    return ThermalVoAssembler.create(domThermal);
}
项目:openMAXIMS    文件:ThermalImpl.java   
public ims.therapies.vo.ThermalVo saveThermalDetails(ims.therapies.vo.ThermalVo voThermal) throws StaleObjectException, UniqueKeyViolationException
{
    if(voThermal == null)
        throw new DomainRuntimeException("Cannot save null Thermal record");

    // Ensure the value object has been validated
    if (!voThermal.isValidated())
        throw new DomainRuntimeException("Thermal Record has not been validated");

    /*  WDEV-13649if(voThermal.getID_Thermal() == null)
    {
        List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voThermal.getClinicalContact()));
        if (list != null && list.size() > 0)
            throw new StaleObjectException((Thermal)list.get(0));
    }*/
    DomainFactory factory = getDomainFactory();
    Thermal domThermal = ThermalVoAssembler.extractThermal(factory, voThermal);

    factory.save(domThermal);

    return ThermalVoAssembler.create(domThermal);
}
项目:openmaxims-linux    文件:ThermalImpl.java   
public ims.therapies.vo.ThermalVo saveThermalDetails(ims.therapies.vo.ThermalVo voThermal) throws StaleObjectException, UniqueKeyViolationException
{
    if(voThermal == null)
        throw new DomainRuntimeException("Cannot save null Thermal record");

    // Ensure the value object has been validated
    if (!voThermal.isValidated())
        throw new DomainRuntimeException("Thermal Record has not been validated");

    /*  WDEV-13649if(voThermal.getID_Thermal() == null)
    {
        List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voThermal.getClinicalContact()));
        if (list != null && list.size() > 0)
            throw new StaleObjectException((Thermal)list.get(0));
    }*/
    DomainFactory factory = getDomainFactory();
    Thermal domThermal = ThermalVoAssembler.extractThermal(factory, voThermal);

    factory.save(domThermal);

    return ThermalVoAssembler.create(domThermal);
}
项目:AvoinApotti    文件:ThermalImpl.java   
public ThermalVo getThermalDetailsByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get ThermalVo for null ClinicalContactRefVo");

    List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));

    if (list == null || list.size() == 0)
        return null;
    //  WDEV-13649else if (list.size() > 1)
    //  WDEV-13649  throw new CodingRuntimeException("More than one Thermal found for the current Clinical Contact");

    return ThermalVoAssembler.createThermalVoCollectionFromThermal(list).get(0);
}
项目:AvoinApotti    文件:ThermalImpl.java   
public ThermalVo getThermal(ThermalRefVo thermal)
{
    if(thermal == null || thermal.getID_Thermal() == null)
        throw new CodingRuntimeException("Can not get Thermal on null Id.");

    return ThermalVoAssembler.create((Thermal) getDomainFactory().getDomainObject(Thermal.class, thermal.getID_Thermal()));
}
项目:openMAXIMS    文件:ThermalImpl.java   
public ThermalVo getThermalDetailsByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get ThermalVo for null ClinicalContactRefVo");

    List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));

    if (list == null || list.size() == 0)
        return null;
    //  WDEV-13649else if (list.size() > 1)
    //  WDEV-13649  throw new CodingRuntimeException("More than one Thermal found for the current Clinical Contact");

    return ThermalVoAssembler.createThermalVoCollectionFromThermal(list).get(0);
}
项目:openMAXIMS    文件:ThermalImpl.java   
public ThermalVo getThermal(ThermalRefVo thermal)
{
    if(thermal == null || thermal.getID_Thermal() == null)
        throw new CodingRuntimeException("Can not get Thermal on null Id.");

    return ThermalVoAssembler.create((Thermal) getDomainFactory().getDomainObject(Thermal.class, thermal.getID_Thermal()));
}
项目:openMAXIMS    文件:ThermalImpl.java   
public ThermalVo getThermalDetailsByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get ThermalVo for null ClinicalContactRefVo");

    List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));

    if (list == null || list.size() == 0)
        return null;
    //  WDEV-13649else if (list.size() > 1)
    //  WDEV-13649  throw new CodingRuntimeException("More than one Thermal found for the current Clinical Contact");

    return ThermalVoAssembler.createThermalVoCollectionFromThermal(list).get(0);
}
项目:openMAXIMS    文件:ThermalImpl.java   
public ThermalVo getThermal(ThermalRefVo thermal)
{
    if(thermal == null || thermal.getID_Thermal() == null)
        throw new CodingRuntimeException("Can not get Thermal on null Id.");

    return ThermalVoAssembler.create((Thermal) getDomainFactory().getDomainObject(Thermal.class, thermal.getID_Thermal()));
}
项目:openmaxims-linux    文件:ThermalImpl.java   
public ThermalVo getThermalDetailsByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get ThermalVo for null ClinicalContactRefVo");

    List list = Thermal.listThermalByClinicalContact(getDomainFactory(), (ims.core.admin.domain.objects.ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));

    if (list == null || list.size() == 0)
        return null;
    //  WDEV-13649else if (list.size() > 1)
    //  WDEV-13649  throw new CodingRuntimeException("More than one Thermal found for the current Clinical Contact");

    return ThermalVoAssembler.createThermalVoCollectionFromThermal(list).get(0);
}
项目:openmaxims-linux    文件:ThermalImpl.java   
public ThermalVo getThermal(ThermalRefVo thermal)
{
    if(thermal == null || thermal.getID_Thermal() == null)
        throw new CodingRuntimeException("Can not get Thermal on null Id.");

    return ThermalVoAssembler.create((Thermal) getDomainFactory().getDomainObject(Thermal.class, thermal.getID_Thermal()));
}