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

项目:AvoinApotti    文件:DataSetTypeAddEditImpl.java   
/**
* saveDataSetType
*/
public ims.core.vo.DataSetTypeVo saveDataSetType(ims.core.vo.DataSetTypeVo recordVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!recordVo.isValidated())
        throw new DomainRuntimeException("DataSetType record has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.core.charting.domain.objects.DatasetType bo = DataSetTypeVoAssembler.extractDatasetType(factory, recordVo);

    try
    {
        factory.save(bo);
    }
    catch(UnqViolationUncheckedException e)
    {
        throw new ims.domain.exceptions.UniqueKeyViolationException(e); 
    }

    return DataSetTypeVoAssembler.create(bo);
}
项目:openMAXIMS    文件:DataSetTypeAddEditImpl.java   
/**
* saveDataSetType
*/
public ims.core.vo.DataSetTypeVo saveDataSetType(ims.core.vo.DataSetTypeVo recordVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!recordVo.isValidated())
        throw new DomainRuntimeException("DataSetType record has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.core.charting.domain.objects.DatasetType bo = DataSetTypeVoAssembler.extractDatasetType(factory, recordVo);

    try
    {
        factory.save(bo);
    }
    catch(UnqViolationUncheckedException e)
    {
        throw new ims.domain.exceptions.UniqueKeyViolationException(e); 
    }

    return DataSetTypeVoAssembler.create(bo);
}
项目:openMAXIMS    文件:DataSetTypeAddEditImpl.java   
/**
* saveDataSetType
*/
public ims.core.vo.DataSetTypeVo saveDataSetType(ims.core.vo.DataSetTypeVo recordVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!recordVo.isValidated())
        throw new DomainRuntimeException("DataSetType record has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.core.charting.domain.objects.DatasetType bo = DataSetTypeVoAssembler.extractDatasetType(factory, recordVo);

    try
    {
        factory.save(bo);
    }
    catch(UnqViolationUncheckedException e)
    {
        throw new ims.domain.exceptions.UniqueKeyViolationException(e); 
    }

    return DataSetTypeVoAssembler.create(bo);
}
项目:openmaxims-linux    文件:DataSetTypeAddEditImpl.java   
/**
* saveDataSetType
*/
public ims.core.vo.DataSetTypeVo saveDataSetType(ims.core.vo.DataSetTypeVo recordVo) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException
{
    if (!recordVo.isValidated())
        throw new DomainRuntimeException("DataSetType record has not been validated");

    DomainFactory factory = getDomainFactory();
    ims.core.charting.domain.objects.DatasetType bo = DataSetTypeVoAssembler.extractDatasetType(factory, recordVo);

    try
    {
        factory.save(bo);
    }
    catch(UnqViolationUncheckedException e)
    {
        throw new ims.domain.exceptions.UniqueKeyViolationException(e); 
    }

    return DataSetTypeVoAssembler.create(bo);
}
项目:AvoinApotti    文件:DataSetTypeAddEditImpl.java   
public DataSetTypeVo getDataSetType(DatasetTypeRefVo id)
{
    return DataSetTypeVoAssembler.create((DatasetType) getDomainFactory().getDomainObject(ims.core.charting.domain.objects.DatasetType.class, id.getID_DatasetType()));
}
项目:AvoinApotti    文件:DataSetTypeImpl.java   
/**
* listDataSetType
*/
public ims.core.vo.DataSetTypeVoCollection listDataSetType(String name, ims.core.vo.lookups.DataSetCategory category, Boolean active)
{
    //String hql = "from DatasetType as d1_1 where (d1_1.name like :NAME and d1_1.category.id = :CATEGORY)";

    DomainFactory factory = getDomainFactory();

    String hql = " from DatasetType as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

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

    if(category != null)
    {   
        condStr.append(andStr + " d1_1.category.id = :CATEGORY"); 
        markers.add("CATEGORY");
        values.add(new Integer(category.getId()));
        andStr = " and ";
    }

    if(active != null)
    {   
        condStr.append(andStr + " d1_1.isActive = :ACTIVE"); 
        markers.add("ACTIVE");
        values.add(active);
        andStr = " and ";
    }

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

    hql += condStr.toString();

    return DataSetTypeVoAssembler.createDataSetTypeVoCollectionFromDatasetType(
            factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS    文件:DataSetTypeAddEditImpl.java   
public DataSetTypeVo getDataSetType(DatasetTypeRefVo id)
{
    return DataSetTypeVoAssembler.create((DatasetType) getDomainFactory().getDomainObject(ims.core.charting.domain.objects.DatasetType.class, id.getID_DatasetType()));
}
项目:openMAXIMS    文件:DataSetTypeImpl.java   
/**
* listDataSetType
*/
public ims.core.vo.DataSetTypeVoCollection listDataSetType(String name, ims.core.vo.lookups.DataSetCategory category, Boolean active)
{
    //String hql = "from DatasetType as d1_1 where (d1_1.name like :NAME and d1_1.category.id = :CATEGORY)";

    DomainFactory factory = getDomainFactory();

    String hql = " from DatasetType as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

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

    if(category != null)
    {   
        condStr.append(andStr + " d1_1.category.id = :CATEGORY"); 
        markers.add("CATEGORY");
        values.add(new Integer(category.getId()));
        andStr = " and ";
    }

    if(active != null)
    {   
        condStr.append(andStr + " d1_1.isActive = :ACTIVE"); 
        markers.add("ACTIVE");
        values.add(active);
        andStr = " and ";
    }

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

    hql += condStr.toString();

    return DataSetTypeVoAssembler.createDataSetTypeVoCollectionFromDatasetType(
            factory.find(hql, markers, values)).sort();
}
项目:openMAXIMS    文件:DataSetTypeAddEditImpl.java   
public DataSetTypeVo getDataSetType(DatasetTypeRefVo id)
{
    return DataSetTypeVoAssembler.create((DatasetType) getDomainFactory().getDomainObject(ims.core.charting.domain.objects.DatasetType.class, id.getID_DatasetType()));
}
项目:openMAXIMS    文件:DataSetTypeImpl.java   
/**
* listDataSetType
*/
public ims.core.vo.DataSetTypeVoCollection listDataSetType(String name, ims.core.vo.lookups.DataSetCategory category, Boolean active)
{
    //String hql = "from DatasetType as d1_1 where (d1_1.name like :NAME and d1_1.category.id = :CATEGORY)";

    DomainFactory factory = getDomainFactory();

    String hql = " from DatasetType as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

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

    if(category != null)
    {   
        condStr.append(andStr + " d1_1.category.id = :CATEGORY"); 
        markers.add("CATEGORY");
        values.add(new Integer(category.getId()));
        andStr = " and ";
    }

    if(active != null)
    {   
        condStr.append(andStr + " d1_1.isActive = :ACTIVE"); 
        markers.add("ACTIVE");
        values.add(active);
        andStr = " and ";
    }

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

    hql += condStr.toString();

    return DataSetTypeVoAssembler.createDataSetTypeVoCollectionFromDatasetType(
            factory.find(hql, markers, values)).sort();
}
项目:openmaxims-linux    文件:DataSetTypeAddEditImpl.java   
public DataSetTypeVo getDataSetType(DatasetTypeRefVo id)
{
    return DataSetTypeVoAssembler.create((DatasetType) getDomainFactory().getDomainObject(ims.core.charting.domain.objects.DatasetType.class, id.getID_DatasetType()));
}
项目:openmaxims-linux    文件:DataSetTypeImpl.java   
/**
* listDataSetType
*/
public ims.core.vo.DataSetTypeVoCollection listDataSetType(String name, ims.core.vo.lookups.DataSetCategory category, Boolean active)
{
    //String hql = "from DatasetType as d1_1 where (d1_1.name like :NAME and d1_1.category.id = :CATEGORY)";

    DomainFactory factory = getDomainFactory();

    String hql = " from DatasetType as d1_1 "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

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

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

    if(category != null)
    {   
        condStr.append(andStr + " d1_1.category.id = :CATEGORY"); 
        markers.add("CATEGORY");
        values.add(new Integer(category.getId()));
        andStr = " and ";
    }

    if(active != null)
    {   
        condStr.append(andStr + " d1_1.isActive = :ACTIVE"); 
        markers.add("ACTIVE");
        values.add(active);
        andStr = " and ";
    }

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

    hql += condStr.toString();

    return DataSetTypeVoAssembler.createDataSetTypeVoCollectionFromDatasetType(
            factory.find(hql, markers, values)).sort();
}