Java 类ims.nursing.vo.domain.CarePlanTemplateAssembler 实例源码

项目:AvoinApotti    文件:CarePlanTemplateDetailImpl.java   
/**
* Get a care plan template
*/
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{

    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = (CarePlanTemplate)factory.getDomainObject(CarePlanTemplate.class,carePlanTemplate.getID_CarePlanTemplate());
    if (domCpt == null)
        return null;

    ims.nursing.vo.CarePlanTemplate voCpt = CarePlanTemplateAssembler.create(domCpt);
    voCpt.getInterventions().sort();
    return voCpt;

}
项目:AvoinApotti    文件:CarePlanTemplateDetailImpl.java   
public ims.nursing.vo.CarePlanTemplate saveCarePlanTemplate(ims.nursing.vo.CarePlanTemplate cpt) throws ims.domain.exceptions.StaleObjectException
{
    if (!cpt.isValidated())
    {
        throw new DomainRuntimeException("CarePlanTemplate VO not validated.");
    }
    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = CarePlanTemplateAssembler.extractCarePlanTemplate(factory,cpt);

    factory.save(domCpt);
    return CarePlanTemplateAssembler.create(domCpt);
}
项目:AvoinApotti    文件:CarePlanStep1Impl.java   
/**
* Returns a list of templates which match the search string
*/
public ims.nursing.vo.CarePlanTemplateCollection listTemplates(String templateSearchString)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();
    String comparator="=";      
    if (templateSearchString != null && templateSearchString.indexOf("%") >= 0)
        comparator="LIKE";

    filterString.append(" from ims.nursing.careplans.domain.objects.CarePlanTemplate template");        
    filterString.append(" where upper(template.title) " + comparator + " :title ");
    //28/10/2004 - Sinead request - display the active only
    filterString.append(" and template.active = :active ");
    markerNames.add("title");
    markerNames.add("active");
    //30/09/05 - ESTEE11 - care plan case sensitivity for search 
    markerValues.add(templateSearchString != null?templateSearchString.toUpperCase():templateSearchString);
    markerValues.add(Boolean.TRUE);

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);

    java.util.List templates = factory.find(filterString.toString(),names,markerValues.toArray());
    return (CarePlanTemplateAssembler.createCarePlanTemplateCollectionFromCarePlanTemplate(templates)).sort();
}
项目:AvoinApotti    文件:CarePlanStep2Impl.java   
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{
    DomainFactory factory = getDomainFactory();

    CarePlanTemplate tempDom = (CarePlanTemplate) factory.getDomainObject(CarePlanTemplate.class, carePlanTemplate.getID_CarePlanTemplate());
    return (CarePlanTemplateAssembler.create(tempDom));
}
项目:openMAXIMS    文件:CarePlanTemplateDetailImpl.java   
/**
* Get a care plan template
*/
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{

    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = (CarePlanTemplate)factory.getDomainObject(CarePlanTemplate.class,carePlanTemplate.getID_CarePlanTemplate());
    if (domCpt == null)
        return null;

    ims.nursing.vo.CarePlanTemplate voCpt = CarePlanTemplateAssembler.create(domCpt);
    voCpt.getInterventions().sort();
    return voCpt;

}
项目:openMAXIMS    文件:CarePlanTemplateDetailImpl.java   
public ims.nursing.vo.CarePlanTemplate saveCarePlanTemplate(ims.nursing.vo.CarePlanTemplate cpt) throws ims.domain.exceptions.StaleObjectException
{
    if (!cpt.isValidated())
    {
        throw new DomainRuntimeException("CarePlanTemplate VO not validated.");
    }
    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = CarePlanTemplateAssembler.extractCarePlanTemplate(factory,cpt);

    factory.save(domCpt);
    return CarePlanTemplateAssembler.create(domCpt);
}
项目:openMAXIMS    文件:CarePlanStep1Impl.java   
/**
* Returns a list of templates which match the search string
*/
public ims.nursing.vo.CarePlanTemplateCollection listTemplates(String templateSearchString)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();
    String comparator="=";      
    if (templateSearchString != null && templateSearchString.indexOf("%") >= 0)
        comparator="LIKE";

    filterString.append(" from ims.nursing.careplans.domain.objects.CarePlanTemplate template");        
    filterString.append(" where upper(template.title) " + comparator + " :title ");
    //28/10/2004 - Sinead request - display the active only
    filterString.append(" and template.active = :active ");
    markerNames.add("title");
    markerNames.add("active");
    //30/09/05 - ESTEE11 - care plan case sensitivity for search 
    markerValues.add(templateSearchString != null?templateSearchString.toUpperCase():templateSearchString);
    markerValues.add(Boolean.TRUE);

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);

    java.util.List templates = factory.find(filterString.toString(),names,markerValues.toArray());
    return (CarePlanTemplateAssembler.createCarePlanTemplateCollectionFromCarePlanTemplate(templates)).sort();
}
项目:openMAXIMS    文件:CarePlanStep2Impl.java   
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{
    DomainFactory factory = getDomainFactory();

    CarePlanTemplate tempDom = (CarePlanTemplate) factory.getDomainObject(CarePlanTemplate.class, carePlanTemplate.getID_CarePlanTemplate());
    return (CarePlanTemplateAssembler.create(tempDom));
}
项目:openMAXIMS    文件:CarePlanTemplateDetailImpl.java   
/**
* Get a care plan template
*/
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{

    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = (CarePlanTemplate)factory.getDomainObject(CarePlanTemplate.class,carePlanTemplate.getID_CarePlanTemplate());
    if (domCpt == null)
        return null;

    ims.nursing.vo.CarePlanTemplate voCpt = CarePlanTemplateAssembler.create(domCpt);
    voCpt.getInterventions().sort();
    return voCpt;

}
项目:openMAXIMS    文件:CarePlanTemplateDetailImpl.java   
public ims.nursing.vo.CarePlanTemplate saveCarePlanTemplate(ims.nursing.vo.CarePlanTemplate cpt) throws ims.domain.exceptions.StaleObjectException
{
    if (!cpt.isValidated())
    {
        throw new DomainRuntimeException("CarePlanTemplate VO not validated.");
    }
    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = CarePlanTemplateAssembler.extractCarePlanTemplate(factory,cpt);

    factory.save(domCpt);
    return CarePlanTemplateAssembler.create(domCpt);
}
项目:openMAXIMS    文件:CarePlanStep1Impl.java   
/**
* Returns a list of templates which match the search string
*/
public ims.nursing.vo.CarePlanTemplateCollection listTemplates(String templateSearchString)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();
    String comparator="=";      
    if (templateSearchString != null && templateSearchString.indexOf("%") >= 0)
        comparator="LIKE";

    filterString.append(" from ims.nursing.careplans.domain.objects.CarePlanTemplate template");        
    filterString.append(" where upper(template.title) " + comparator + " :title ");
    //28/10/2004 - Sinead request - display the active only
    filterString.append(" and template.active = :active ");
    markerNames.add("title");
    markerNames.add("active");
    //30/09/05 - ESTEE11 - care plan case sensitivity for search 
    markerValues.add(templateSearchString != null?templateSearchString.toUpperCase():templateSearchString);
    markerValues.add(Boolean.TRUE);

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);

    java.util.List templates = factory.find(filterString.toString(),names,markerValues.toArray());
    return (CarePlanTemplateAssembler.createCarePlanTemplateCollectionFromCarePlanTemplate(templates)).sort();
}
项目:openMAXIMS    文件:CarePlanStep2Impl.java   
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{
    DomainFactory factory = getDomainFactory();

    CarePlanTemplate tempDom = (CarePlanTemplate) factory.getDomainObject(CarePlanTemplate.class, carePlanTemplate.getID_CarePlanTemplate());
    return (CarePlanTemplateAssembler.create(tempDom));
}
项目:openmaxims-linux    文件:CarePlanTemplateDetailImpl.java   
/**
* Get a care plan template
*/
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{

    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = (CarePlanTemplate)factory.getDomainObject(CarePlanTemplate.class,carePlanTemplate.getID_CarePlanTemplate());
    if (domCpt == null)
        return null;

    ims.nursing.vo.CarePlanTemplate voCpt = CarePlanTemplateAssembler.create(domCpt);
    voCpt.getInterventions().sort();
    return voCpt;

}
项目:openmaxims-linux    文件:CarePlanTemplateDetailImpl.java   
public ims.nursing.vo.CarePlanTemplate saveCarePlanTemplate(ims.nursing.vo.CarePlanTemplate cpt) throws ims.domain.exceptions.StaleObjectException
{
    if (!cpt.isValidated())
    {
        throw new DomainRuntimeException("CarePlanTemplate VO not validated.");
    }
    DomainFactory factory = getDomainFactory();
    CarePlanTemplate domCpt = CarePlanTemplateAssembler.extractCarePlanTemplate(factory,cpt);

    factory.save(domCpt);
    return CarePlanTemplateAssembler.create(domCpt);
}
项目:openmaxims-linux    文件:CarePlanStep1Impl.java   
/**
* Returns a list of templates which match the search string
*/
public ims.nursing.vo.CarePlanTemplateCollection listTemplates(String templateSearchString)
{
    DomainFactory factory = getDomainFactory();

    StringBuffer filterString = new StringBuffer();
    ArrayList markerNames = new ArrayList();
    ArrayList markerValues = new ArrayList();
    String comparator="=";      
    if (templateSearchString != null && templateSearchString.indexOf("%") >= 0)
        comparator="LIKE";

    filterString.append(" from ims.nursing.careplans.domain.objects.CarePlanTemplate template");        
    filterString.append(" where upper(template.title) " + comparator + " :title ");
    //28/10/2004 - Sinead request - display the active only
    filterString.append(" and template.active = :active ");
    markerNames.add("title");
    markerNames.add("active");
    //30/09/05 - ESTEE11 - care plan case sensitivity for search 
    markerValues.add(templateSearchString != null?templateSearchString.toUpperCase():templateSearchString);
    markerValues.add(Boolean.TRUE);

    String[] names = new String[markerNames.size()];
    markerNames.toArray(names);

    java.util.List templates = factory.find(filterString.toString(),names,markerValues.toArray());
    return (CarePlanTemplateAssembler.createCarePlanTemplateCollectionFromCarePlanTemplate(templates)).sort();
}
项目:openmaxims-linux    文件:CarePlanStep2Impl.java   
public ims.nursing.vo.CarePlanTemplate getCarePlanTemplate(CarePlanTemplateTitle carePlanTemplate)
{
    DomainFactory factory = getDomainFactory();

    CarePlanTemplate tempDom = (CarePlanTemplate) factory.getDomainObject(CarePlanTemplate.class, carePlanTemplate.getID_CarePlanTemplate());
    return (CarePlanTemplateAssembler.create(tempDom));
}