Java 类ims.ocrr.vo.domain.OrderEntryTemplateShortVoAssembler 实例源码

项目:AvoinApotti    文件:SelectandOrderImpl.java   
/**
* Returns a list of all active order entry templates
*/
public OrderEntryTemplateShortVoCollection listActiveOrderEntryTemplatesForLocationAndRole(ILocation location, AppRoleRefVo role)
{
    if(location == null)
        return null;

    DomainFactory factory = getDomainFactory();
    DomainObject locRecord = factory.getDomainObject(Location.class, location.getID());
    List templates;
    if(locRecord instanceof LocSite)
    {
        templates = listOrderEntryTemplates(factory, locRecord, role);
    }
    else 
    {
        //record is of type location go back up the hierarchy until the record's parentLocation is of type LocSite
        //when it is do the same call as above
        Location doLocation = (Location) locRecord;

        if(doLocation.getParentLocation() instanceof LocSite)
            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        else
        {
            while(!(doLocation.getParentLocation() instanceof LocSite))
                doLocation = doLocation.getParentLocation();

            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        }   
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(templates);
}
项目:AvoinApotti    文件:TestEditImpl.java   
public OrderEntryTemplateShortVoCollection listTemplatesUsingInvestigation(InvestigationIndexRefVo invIndex)
{
    if (invIndex == null)
        throw new CodingRuntimeException("parameter invIndex is null in method listTemplatesUsingInvestigation");

    DomainFactory factory = getDomainFactory();
    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(getAssociatedItems(factory, invIndex.getID_InvestigationIndex()));
}
项目:openMAXIMS    文件:SelectandOrderImpl.java   
/**
* Returns a list of all active order entry templates
*/
public OrderEntryTemplateShortVoCollection listActiveOrderEntryTemplatesForLocationAndRole(ILocation location, AppRoleRefVo role)
{
    if(location == null)
        return null;

    DomainFactory factory = getDomainFactory();
    DomainObject locRecord = factory.getDomainObject(Location.class, location.getID());
    List templates;
    if(locRecord instanceof LocSite)
    {
        templates = listOrderEntryTemplates(factory, locRecord, role);
    }
    else 
    {
        //record is of type location go back up the hierarchy until the record's parentLocation is of type LocSite
        //when it is do the same call as above
        Location doLocation = (Location) locRecord;

        if(doLocation.getParentLocation() instanceof LocSite)
            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        else
        {
            while(!(doLocation.getParentLocation() instanceof LocSite))
                doLocation = doLocation.getParentLocation();

            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        }   
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(templates);
}
项目:openMAXIMS    文件:TestEditImpl.java   
public OrderEntryTemplateShortVoCollection listTemplatesUsingInvestigation(InvestigationIndexRefVo invIndex)
{
    if (invIndex == null)
        throw new CodingRuntimeException("parameter invIndex is null in method listTemplatesUsingInvestigation");

    DomainFactory factory = getDomainFactory();
    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(getAssociatedItems(factory, invIndex.getID_InvestigationIndex()));
}
项目:openMAXIMS    文件:SelectandOrderImpl.java   
/**
* Returns a list of all active order entry templates
*/
public OrderEntryTemplateShortVoCollection listActiveOrderEntryTemplatesForLocationAndRole(ILocation location, AppRoleRefVo role)
{
    if(location == null)
        return null;

    DomainFactory factory = getDomainFactory();
    DomainObject locRecord = factory.getDomainObject(Location.class, location.getID());
    List templates;
    if(locRecord instanceof LocSite)
    {
        templates = listOrderEntryTemplates(factory, locRecord, role);
    }
    else 
    {
        //record is of type location go back up the hierarchy until the record's parentLocation is of type LocSite
        //when it is do the same call as above
        Location doLocation = (Location) locRecord;

        if(doLocation.getParentLocation() instanceof LocSite)
            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        else
        {
            while(!(doLocation.getParentLocation() instanceof LocSite))
                doLocation = doLocation.getParentLocation();

            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        }   
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(templates);
}
项目:openMAXIMS    文件:TestEditImpl.java   
public OrderEntryTemplateShortVoCollection listTemplatesUsingInvestigation(InvestigationIndexRefVo invIndex)
{
    if (invIndex == null)
        throw new CodingRuntimeException("parameter invIndex is null in method listTemplatesUsingInvestigation");

    DomainFactory factory = getDomainFactory();
    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(getAssociatedItems(factory, invIndex.getID_InvestigationIndex()));
}
项目:openmaxims-linux    文件:SelectandOrderImpl.java   
/**
* Returns a list of all active order entry templates
*/
public OrderEntryTemplateShortVoCollection listActiveOrderEntryTemplatesForLocationAndRole(ILocation location, AppRoleRefVo role)
{
    if(location == null)
        return null;

    DomainFactory factory = getDomainFactory();
    DomainObject locRecord = factory.getDomainObject(Location.class, location.getID());
    List templates;
    if(locRecord instanceof LocSite)
    {
        templates = listOrderEntryTemplates(factory, locRecord, role);
    }
    else 
    {
        //record is of type location go back up the hierarchy until the record's parentLocation is of type LocSite
        //when it is do the same call as above
        Location doLocation = (Location) locRecord;

        if(doLocation.getParentLocation() instanceof LocSite)
            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        else
        {
            while(!(doLocation.getParentLocation() instanceof LocSite))
                doLocation = doLocation.getParentLocation();

            templates = listOrderEntryTemplates(factory, doLocation.getParentLocation(), role);
        }   
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(templates);
}
项目:openmaxims-linux    文件:TestEditImpl.java   
public OrderEntryTemplateShortVoCollection listTemplatesUsingInvestigation(InvestigationIndexRefVo invIndex)
{
    if (invIndex == null)
        throw new CodingRuntimeException("parameter invIndex is null in method listTemplatesUsingInvestigation");

    DomainFactory factory = getDomainFactory();
    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(getAssociatedItems(factory, invIndex.getID_InvestigationIndex()));
}
项目:AvoinApotti    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}
项目:openmaxims-linux    文件:OrderEntryTemplateListImpl.java   
/**
* lists order entry templates
*/
public ims.ocrr.vo.OrderEntryTemplateShortVoCollection listOrderEntryTemplates(ims.ocrr.vo.OrderEntryTemplateListSearchCriteriaVo searchCriteria)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from OrderEntryTemplate oet "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(searchCriteria != null)
    {
        if(searchCriteria.getNameIsNotNull())
        {
            condStr.append(andStr + " upper(oet.formName) like :name");
            markers.add("name");
            values.add("%" + searchCriteria.getName().toUpperCase() + "%");
            andStr = " and ";
        }

        if(searchCriteria.getStatusIsNotNull())
        {
            condStr.append(andStr + " oet.activeStatus = :status");
            markers.add("status");
            values.add(getDomLookup(searchCriteria.getStatus()));
            andStr = " and ";
        }

        if(searchCriteria.getLocationIsNotNull())
        {
            hql = "select oet from OrderEntryTemplate oet join oet.templatesLocations loc ";                
            condStr.append(andStr + " (loc.location in (:location) and loc.isActive = :active) ");
            markers.add("location");
            markers.add("active");
            values.add(LocSiteShortVoAssembler.extractLocSite(factory, searchCriteria.getLocation()));
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    if(condStr.length() > 0)
    {
        hql += " where ";
        hql += condStr.toString();
    }

    return OrderEntryTemplateShortVoAssembler.createOrderEntryTemplateShortVoCollectionFromOrderEntryTemplate(factory.find(hql.toString(), markers, values));
}