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

项目:AvoinApotti    文件:ChartTypeImpl.java   
/**
* listChartType
*/
public ims.core.vo.ChartTypeShortVoCollection listChartType(String name, ims.core.charting.vo.DatasetTypeRefVo refDataset)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ChartType as c1_1 join fetch c1_1.datasetTypes as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(name != null)
    {   
        condStr.append(andStr + " upper(c1_1.name) like upper(:NAME)"); 
        markers.add("NAME");
        values.add(name);
        andStr = " and ";
    }

    if(refDataset != null)
    {   
        condStr.append(andStr + " d1_1.datasetType.id = :DATASET "); 
        markers.add("DATASET");
        values.add(refDataset.getID_DatasetType());
        andStr = " and ";
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(
            factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS    文件:ChartTypeImpl.java   
/**
* listChartType
*/
public ims.core.vo.ChartTypeShortVoCollection listChartType(String name, ims.core.charting.vo.DatasetTypeRefVo refDataset)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ChartType as c1_1 join fetch c1_1.datasetTypes as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(name != null)
    {   
        condStr.append(andStr + " upper(c1_1.name) like upper(:NAME)"); 
        markers.add("NAME");
        values.add(name);
        andStr = " and ";
    }

    if(refDataset != null)
    {   
        condStr.append(andStr + " d1_1.datasetType.id = :DATASET "); 
        markers.add("DATASET");
        values.add(refDataset.getID_DatasetType());
        andStr = " and ";
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(
            factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS    文件:ChartTypeImpl.java   
/**
* listChartType
*/
public ims.core.vo.ChartTypeShortVoCollection listChartType(String name, ims.core.charting.vo.DatasetTypeRefVo refDataset)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ChartType as c1_1 join fetch c1_1.datasetTypes as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(name != null)
    {   
        condStr.append(andStr + " upper(c1_1.name) like upper(:NAME)"); 
        markers.add("NAME");
        values.add(name);
        andStr = " and ";
    }

    if(refDataset != null)
    {   
        condStr.append(andStr + " d1_1.datasetType.id = :DATASET "); 
        markers.add("DATASET");
        values.add(refDataset.getID_DatasetType());
        andStr = " and ";
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(
            factory.find(hql, markers, values)).sort();
}
项目:openmaxims-linux    文件:ChartTypeImpl.java   
/**
* listChartType
*/
public ims.core.vo.ChartTypeShortVoCollection listChartType(String name, ims.core.charting.vo.DatasetTypeRefVo refDataset)
{
    DomainFactory factory = getDomainFactory();

    String hql = " from ChartType as c1_1 join fetch c1_1.datasetTypes as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

    if(name != null)
    {   
        condStr.append(andStr + " upper(c1_1.name) like upper(:NAME)"); 
        markers.add("NAME");
        values.add(name);
        andStr = " and ";
    }

    if(refDataset != null)
    {   
        condStr.append(andStr + " d1_1.datasetType.id = :DATASET "); 
        markers.add("DATASET");
        values.add(refDataset.getID_DatasetType());
        andStr = " and ";
    }

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();

    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(
            factory.find(hql, markers, values)).sort();
}
项目:AvoinApotti    文件:PathologyResultsImpl.java   
public ChartTypeShortVoCollection listChartTypes()
{
    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(getDomainFactory().find("from ChartType as ct where ct.isActive = 1 order by ct.name"));
}
项目:openMAXIMS    文件:PathologyResultsImpl.java   
public ChartTypeShortVoCollection listChartTypes()
{
    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(getDomainFactory().find("from ChartType as ct where ct.isActive = 1 order by ct.name"));
}
项目:openMAXIMS    文件:PathologyResultsImpl.java   
public ChartTypeShortVoCollection listChartTypes()
{
    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(getDomainFactory().find("from ChartType as ct where ct.isActive = 1 order by ct.name"));
}
项目:openmaxims-linux    文件:PathologyResultsImpl.java   
public ChartTypeShortVoCollection listChartTypes()
{
    return ChartTypeShortVoAssembler.createChartTypeShortVoCollectionFromChartType(getDomainFactory().find("from ChartType as ct where ct.isActive = 1 order by ct.name"));
}