Java 类ims.emergency.vo.domain.DrugToxicologyVoAssembler 实例源码

项目:AvoinApotti    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get Urinalysis on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DrugToxicology as drugTox where drugTox.careContext.id = :careContextID ");

    List<?> list = factory.find(hql.toString(), new String[] { "careContextID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list == null || list.size() == 0)
        return null;

    return DrugToxicologyVoAssembler.create((DrugToxicology) list.get(0));

}
项目:openMAXIMS    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get Urinalysis on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DrugToxicology as drugTox where drugTox.careContext.id = :careContextID ");

    List<?> list = factory.find(hql.toString(), new String[] { "careContextID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list == null || list.size() == 0)
        return null;

    return DrugToxicologyVoAssembler.create((DrugToxicology) list.get(0));

}
项目:openMAXIMS    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get Urinalysis on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DrugToxicology as drugTox where drugTox.careContext.id = :careContextID ");

    List<?> list = factory.find(hql.toString(), new String[] { "careContextID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list == null || list.size() == 0)
        return null;

    return DrugToxicologyVoAssembler.create((DrugToxicology) list.get(0));

}
项目:openmaxims-linux    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get Urinalysis on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("from DrugToxicology as drugTox where drugTox.careContext.id = :careContextID ");

    List<?> list = factory.find(hql.toString(), new String[] { "careContextID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list == null || list.size() == 0)
        return null;

    return DrugToxicologyVoAssembler.create((DrugToxicology) list.get(0));

}
项目:AvoinApotti    文件:UrineToxCcImpl.java   
public DrugToxicologyVo save(DrugToxicologyVo drugToxicologyToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (drugToxicologyToSave == null)
        throw new CodingRuntimeException("Cannot save null DrugToxicology ");

    if (!drugToxicologyToSave.isValidated())
        throw new DomainRuntimeException("DrugToxicology Not Validated.");

    DomainFactory factory = getDomainFactory();
    DrugToxicology domainDrugToxicology = DrugToxicologyVoAssembler.extractDrugToxicology(factory, drugToxicologyToSave);

    factory.save(domainDrugToxicology);

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:AvoinApotti    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(DrugToxicologyRefVo drugToxicologyRef)
{
    if (drugToxicologyRef == null || drugToxicologyRef.getID_DrugToxicology() == null)
    {
        throw new CodingRuntimeException("Cannot get DrugToxicology on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DrugToxicology domainDrugToxicology = (DrugToxicology) factory.getDomainObject(DrugToxicology.class, drugToxicologyRef.getID_DrugToxicology());

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:openMAXIMS    文件:UrineToxCcImpl.java   
public DrugToxicologyVo save(DrugToxicologyVo drugToxicologyToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (drugToxicologyToSave == null)
        throw new CodingRuntimeException("Cannot save null DrugToxicology ");

    if (!drugToxicologyToSave.isValidated())
        throw new DomainRuntimeException("DrugToxicology Not Validated.");

    DomainFactory factory = getDomainFactory();
    DrugToxicology domainDrugToxicology = DrugToxicologyVoAssembler.extractDrugToxicology(factory, drugToxicologyToSave);

    factory.save(domainDrugToxicology);

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:openMAXIMS    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(DrugToxicologyRefVo drugToxicologyRef)
{
    if (drugToxicologyRef == null || drugToxicologyRef.getID_DrugToxicology() == null)
    {
        throw new CodingRuntimeException("Cannot get DrugToxicology on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DrugToxicology domainDrugToxicology = (DrugToxicology) factory.getDomainObject(DrugToxicology.class, drugToxicologyRef.getID_DrugToxicology());

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:openMAXIMS    文件:UrineToxCcImpl.java   
public DrugToxicologyVo save(DrugToxicologyVo drugToxicologyToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (drugToxicologyToSave == null)
        throw new CodingRuntimeException("Cannot save null DrugToxicology ");

    if (!drugToxicologyToSave.isValidated())
        throw new DomainRuntimeException("DrugToxicology Not Validated.");

    DomainFactory factory = getDomainFactory();
    DrugToxicology domainDrugToxicology = DrugToxicologyVoAssembler.extractDrugToxicology(factory, drugToxicologyToSave);

    factory.save(domainDrugToxicology);

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:openMAXIMS    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(DrugToxicologyRefVo drugToxicologyRef)
{
    if (drugToxicologyRef == null || drugToxicologyRef.getID_DrugToxicology() == null)
    {
        throw new CodingRuntimeException("Cannot get DrugToxicology on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DrugToxicology domainDrugToxicology = (DrugToxicology) factory.getDomainObject(DrugToxicology.class, drugToxicologyRef.getID_DrugToxicology());

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:openmaxims-linux    文件:UrineToxCcImpl.java   
public DrugToxicologyVo save(DrugToxicologyVo drugToxicologyToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (drugToxicologyToSave == null)
        throw new CodingRuntimeException("Cannot save null DrugToxicology ");

    if (!drugToxicologyToSave.isValidated())
        throw new DomainRuntimeException("DrugToxicology Not Validated.");

    DomainFactory factory = getDomainFactory();
    DrugToxicology domainDrugToxicology = DrugToxicologyVoAssembler.extractDrugToxicology(factory, drugToxicologyToSave);

    factory.save(domainDrugToxicology);

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}
项目:openmaxims-linux    文件:UrineToxCcImpl.java   
public DrugToxicologyVo getDrugToxicology(DrugToxicologyRefVo drugToxicologyRef)
{
    if (drugToxicologyRef == null || drugToxicologyRef.getID_DrugToxicology() == null)
    {
        throw new CodingRuntimeException("Cannot get DrugToxicology on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    DrugToxicology domainDrugToxicology = (DrugToxicology) factory.getDomainObject(DrugToxicology.class, drugToxicologyRef.getID_DrugToxicology());

    return DrugToxicologyVoAssembler.create(domainDrugToxicology);
}