Java 类ims.core.vo.domain.SupportNetworkFamilyAssembler 实例源码

项目:AvoinApotti    文件:NursingAdmissionImpl.java   
public void saveSupportNetworkFamily(SupportNetworkFamilyCollection voSupportNetworkFamily) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voSupportNetworkFamily.isValidated())
        throw new DomainRuntimeException("Problems on Admission has not been validated");

    DomainFactory factory = getDomainFactory();
    for(int i=0; i<voSupportNetworkFamily.size(); i++)
    {
        ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily.get(i));
        factory.save(doSupportNetworkFamily);
    }

    return;

}
项目:AvoinApotti    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:openMAXIMS    文件:NursingAdmissionImpl.java   
public void saveSupportNetworkFamily(SupportNetworkFamilyCollection voSupportNetworkFamily) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voSupportNetworkFamily.isValidated())
        throw new DomainRuntimeException("Problems on Admission has not been validated");

    DomainFactory factory = getDomainFactory();
    for(int i=0; i<voSupportNetworkFamily.size(); i++)
    {
        ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily.get(i));
        factory.save(doSupportNetworkFamily);
    }

    return;

}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:openMAXIMS    文件:NursingAdmissionImpl.java   
public void saveSupportNetworkFamily(SupportNetworkFamilyCollection voSupportNetworkFamily) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voSupportNetworkFamily.isValidated())
        throw new DomainRuntimeException("Problems on Admission has not been validated");

    DomainFactory factory = getDomainFactory();
    for(int i=0; i<voSupportNetworkFamily.size(); i++)
    {
        ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily.get(i));
        factory.save(doSupportNetworkFamily);
    }

    return;

}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:openmaxims-linux    文件:NursingAdmissionImpl.java   
public void saveSupportNetworkFamily(SupportNetworkFamilyCollection voSupportNetworkFamily) throws StaleObjectException 
{
    //Ensure the value object has been validated
    if (!voSupportNetworkFamily.isValidated())
        throw new DomainRuntimeException("Problems on Admission has not been validated");

    DomainFactory factory = getDomainFactory();
    for(int i=0; i<voSupportNetworkFamily.size(); i++)
    {
        ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily.get(i));
        factory.save(doSupportNetworkFamily);
    }

    return;

}
项目:openmaxims-linux    文件:SupportNetworkFamilyImpl.java   
/**
* saves a Family Support Network
*/
public SupportNetworkFamily saveSupportNetworkFamily(ims.core.vo.SupportNetworkFamily voSupportNetworkFamily) throws ims.domain.exceptions.StaleObjectException
{
    if(!voSupportNetworkFamily.isValidated())
    {
        throw new DomainRuntimeException("SupportNetworkFamily Value Object has not been validated");
    }

    DomainFactory factory = getDomainFactory();

    ims.core.clinical.domain.objects.SupportNetworkFamily doSupportNetworkFamily = SupportNetworkFamilyAssembler.extractSupportNetworkFamily(factory, voSupportNetworkFamily);

    factory.save(doSupportNetworkFamily);

    return SupportNetworkFamilyAssembler.create(doSupportNetworkFamily);
}
项目:AvoinApotti    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamilyCollection listSupportNetworkFamily(Boolean activeOnly, ims.core.vo.PatientShort patient, Boolean isRieMode)
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Comparable> values = new ArrayList<Comparable>();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from SupportNetworkFamily suppNet ");
    hql.append(" where suppNet.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (activeOnly.equals(Boolean.TRUE))
    {
        if (isRieMode == null || isRieMode) //WDEV-15479
        {
            hql.append(" and suppNet.isCurrentlyActiveFamilySupport = :isActive");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
        else
        {
            hql.append(" and ((suppNet.isCurrentlyActiveFamilySupport = :isActive and suppNet.isRIE is null ) or (suppNet.isRIE = 1))");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
    }

    List list = factory.find(hql.toString(), names,values);
    return(SupportNetworkFamilyAssembler.createSupportNetworkFamilyCollectionFromSupportNetworkFamily(list).sort());

}
项目:AvoinApotti    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamily getSupportNetworkFamily(SupportNetworkFamilyRefVo voRef) 
{
    if (voRef == null || voRef.getID_SupportNetworkFamily() == null)
        throw new CodingRuntimeException("Invalid SupportNetworkFamilyRefVo");

    DomainFactory factory = getDomainFactory();
    List snf = factory.find("from SupportNetworkFamily snf where snf.id = :id",new String[] {"id"},new Object[] {voRef.getID_SupportNetworkFamily()});
    if(snf != null && snf.size() > 0)
        return (SupportNetworkFamilyAssembler.create((ims.core.clinical.domain.objects.SupportNetworkFamily)snf.get(0)));

    return null;
}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamilyCollection listSupportNetworkFamily(Boolean activeOnly, ims.core.vo.PatientShort patient, Boolean isRieMode)
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Comparable> values = new ArrayList<Comparable>();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from SupportNetworkFamily suppNet ");
    hql.append(" where suppNet.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (activeOnly.equals(Boolean.TRUE))
    {
        if (isRieMode == null || isRieMode) //WDEV-15479
        {
            hql.append(" and suppNet.isCurrentlyActiveFamilySupport = :isActive");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
        else
        {
            hql.append(" and ((suppNet.isCurrentlyActiveFamilySupport = :isActive and suppNet.isRIE is null ) or (suppNet.isRIE = 1))");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
    }

    List list = factory.find(hql.toString(), names,values);
    return(SupportNetworkFamilyAssembler.createSupportNetworkFamilyCollectionFromSupportNetworkFamily(list).sort());

}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamily getSupportNetworkFamily(SupportNetworkFamilyRefVo voRef) 
{
    if (voRef == null || voRef.getID_SupportNetworkFamily() == null)
        throw new CodingRuntimeException("Invalid SupportNetworkFamilyRefVo");

    DomainFactory factory = getDomainFactory();
    List snf = factory.find("from SupportNetworkFamily snf where snf.id = :id",new String[] {"id"},new Object[] {voRef.getID_SupportNetworkFamily()});
    if(snf != null && snf.size() > 0)
        return (SupportNetworkFamilyAssembler.create((ims.core.clinical.domain.objects.SupportNetworkFamily)snf.get(0)));

    return null;
}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamilyCollection listSupportNetworkFamily(Boolean activeOnly, ims.core.vo.PatientShort patient, Boolean isRieMode)
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Comparable> values = new ArrayList<Comparable>();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from SupportNetworkFamily suppNet ");
    hql.append(" where suppNet.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (activeOnly.equals(Boolean.TRUE))
    {
        if (isRieMode == null || isRieMode) //WDEV-15479
        {
            hql.append(" and suppNet.isCurrentlyActiveFamilySupport = :isActive");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
        else
        {
            hql.append(" and ((suppNet.isCurrentlyActiveFamilySupport = :isActive and suppNet.isRIE is null ) or (suppNet.isRIE = 1))");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
    }

    List list = factory.find(hql.toString(), names,values);
    return(SupportNetworkFamilyAssembler.createSupportNetworkFamilyCollectionFromSupportNetworkFamily(list).sort());

}
项目:openMAXIMS    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamily getSupportNetworkFamily(SupportNetworkFamilyRefVo voRef) 
{
    if (voRef == null || voRef.getID_SupportNetworkFamily() == null)
        throw new CodingRuntimeException("Invalid SupportNetworkFamilyRefVo");

    DomainFactory factory = getDomainFactory();
    List snf = factory.find("from SupportNetworkFamily snf where snf.id = :id",new String[] {"id"},new Object[] {voRef.getID_SupportNetworkFamily()});
    if(snf != null && snf.size() > 0)
        return (SupportNetworkFamilyAssembler.create((ims.core.clinical.domain.objects.SupportNetworkFamily)snf.get(0)));

    return null;
}
项目:openmaxims-linux    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamilyCollection listSupportNetworkFamily(Boolean activeOnly, ims.core.vo.PatientShort patient, Boolean isRieMode)
{

    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Comparable> values = new ArrayList<Comparable>();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from SupportNetworkFamily suppNet ");
    hql.append(" where suppNet.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (activeOnly.equals(Boolean.TRUE))
    {
        if (isRieMode == null || isRieMode) //WDEV-15479
        {
            hql.append(" and suppNet.isCurrentlyActiveFamilySupport = :isActive");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
        else
        {
            hql.append(" and ((suppNet.isCurrentlyActiveFamilySupport = :isActive and suppNet.isRIE is null ) or (suppNet.isRIE = 1))");
            names.add("isActive");
            values.add(Boolean.TRUE);
        }
    }

    List list = factory.find(hql.toString(), names,values);
    return(SupportNetworkFamilyAssembler.createSupportNetworkFamilyCollectionFromSupportNetworkFamily(list).sort());

}
项目:openmaxims-linux    文件:SupportNetworkFamilyImpl.java   
public ims.core.vo.SupportNetworkFamily getSupportNetworkFamily(SupportNetworkFamilyRefVo voRef) 
{
    if (voRef == null || voRef.getID_SupportNetworkFamily() == null)
        throw new CodingRuntimeException("Invalid SupportNetworkFamilyRefVo");

    DomainFactory factory = getDomainFactory();
    List snf = factory.find("from SupportNetworkFamily snf where snf.id = :id",new String[] {"id"},new Object[] {voRef.getID_SupportNetworkFamily()});
    if(snf != null && snf.size() > 0)
        return (SupportNetworkFamilyAssembler.create((ims.core.clinical.domain.objects.SupportNetworkFamily)snf.get(0)));

    return null;
}