Java 类ims.admin.vo.domain.SystemReportVoAssembler 实例源码

项目:AvoinApotti    文件:DeployReportsImpl.java   
/**
* listSystemReports
*/
@SuppressWarnings("rawtypes")
public ims.admin.vo.SystemReportVoCollection listSystemReports()
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from ReportBo as rep where rep.imsId is not null order by rep.reportName";
    List reports = factory.find(hqlString);
    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(reports);
}
项目:AvoinApotti    文件:SearchReportImpl.java   
public ims.admin.vo.SystemReportVoCollection listReports(Boolean systemReportsOnly, String reportName)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" FROM ReportBo AS rep ");

    if (Boolean.TRUE.equals(systemReportsOnly) || reportName != null)
    {
        hql.append(" WHERE ");
    }

    if (Boolean.TRUE.equals(systemReportsOnly))
    {
        hql.append("rep.imsId IS NOT NULL ");
    }

    if (reportName != null)
    {
        hql.append(" AND UPPER(rep.reportName) like :reportName ");
        markers.add("reportName");
        values.add("%" + reportName.toUpperCase() + "%");
    }

    hql.append(" order by UPPER(rep.reportName) asc");

    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(factory.find(hql.toString(), markers, values));
}
项目:AvoinApotti    文件:ReportAccessImpl.java   
public ims.admin.vo.SystemReportVo saveReport(SystemReportVo report) throws ims.domain.exceptions.StaleObjectException
{
    if (report == null)
        throw new CodingRuntimeException("Cannot save null Report");

    if (!report.isValidated())
        throw new DomainRuntimeException("SystemReportVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    ReportBo doReport = SystemReportVoAssembler.extractReportBo(factory, report);
    factory.save(doReport);

    return SystemReportVoAssembler.create(doReport);
}
项目:AvoinApotti    文件:ReportAccessImpl.java   
public SystemReportVo getReport(ReportBoRefVo reportRef)
{
    if (reportRef == null)
        throw new CodingRuntimeException("Cannot get Report on null Id.");

    return SystemReportVoAssembler.create((ReportBo) getDomainFactory().getDomainObject(ReportBo.class, reportRef.getID_ReportBo()));
}
项目:openMAXIMS    文件:DeployReportsImpl.java   
/**
* listSystemReports
*/
@SuppressWarnings("rawtypes")
public ims.admin.vo.SystemReportVoCollection listSystemReports()
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from ReportBo as rep where rep.imsId is not null order by rep.reportName";
    List reports = factory.find(hqlString);
    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(reports);
}
项目:openMAXIMS    文件:SearchReportImpl.java   
public ims.admin.vo.SystemReportVoCollection listReports(Boolean systemReportsOnly, String reportName)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" FROM ReportBo AS rep ");

    if (Boolean.TRUE.equals(systemReportsOnly) || reportName != null)
    {
        hql.append(" WHERE ");
    }

    if (Boolean.TRUE.equals(systemReportsOnly))
    {
        hql.append("rep.imsId IS NOT NULL ");
    }

    if (reportName != null)
    {
        hql.append(" AND UPPER(rep.reportName) like :reportName ");
        markers.add("reportName");
        values.add("%" + reportName.toUpperCase() + "%");
    }

    hql.append(" order by UPPER(rep.reportName) asc");

    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:ReportAccessImpl.java   
public ims.admin.vo.SystemReportVo saveReport(SystemReportVo report) throws ims.domain.exceptions.StaleObjectException
{
    if (report == null)
        throw new CodingRuntimeException("Cannot save null Report");

    if (!report.isValidated())
        throw new DomainRuntimeException("SystemReportVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    ReportBo doReport = SystemReportVoAssembler.extractReportBo(factory, report);
    factory.save(doReport);

    return SystemReportVoAssembler.create(doReport);
}
项目:openMAXIMS    文件:ReportAccessImpl.java   
public SystemReportVo getReport(ReportBoRefVo reportRef)
{
    if (reportRef == null)
        throw new CodingRuntimeException("Cannot get Report on null Id.");

    return SystemReportVoAssembler.create((ReportBo) getDomainFactory().getDomainObject(ReportBo.class, reportRef.getID_ReportBo()));
}
项目:openMAXIMS    文件:DeployReportsImpl.java   
/**
* listSystemReports
*/
@SuppressWarnings("rawtypes")
public ims.admin.vo.SystemReportVoCollection listSystemReports()
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from ReportBo as rep where rep.imsId is not null order by rep.reportName";
    List reports = factory.find(hqlString);
    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(reports);
}
项目:openMAXIMS    文件:SearchReportImpl.java   
public ims.admin.vo.SystemReportVoCollection listReports(Boolean systemReportsOnly, String reportName)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" FROM ReportBo AS rep ");

    if (Boolean.TRUE.equals(systemReportsOnly) || reportName != null)
    {
        hql.append(" WHERE ");
    }

    if (Boolean.TRUE.equals(systemReportsOnly))
    {
        hql.append("rep.imsId IS NOT NULL ");
    }

    if (reportName != null)
    {
        hql.append(" AND UPPER(rep.reportName) like :reportName ");
        markers.add("reportName");
        values.add("%" + reportName.toUpperCase() + "%");
    }

    hql.append(" order by UPPER(rep.reportName) asc");

    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(factory.find(hql.toString(), markers, values));
}
项目:openMAXIMS    文件:ReportAccessImpl.java   
public ims.admin.vo.SystemReportVo saveReport(SystemReportVo report) throws ims.domain.exceptions.StaleObjectException
{
    if (report == null)
        throw new CodingRuntimeException("Cannot save null Report");

    if (!report.isValidated())
        throw new DomainRuntimeException("SystemReportVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    ReportBo doReport = SystemReportVoAssembler.extractReportBo(factory, report);
    factory.save(doReport);

    return SystemReportVoAssembler.create(doReport);
}
项目:openMAXIMS    文件:ReportAccessImpl.java   
public SystemReportVo getReport(ReportBoRefVo reportRef)
{
    if (reportRef == null)
        throw new CodingRuntimeException("Cannot get Report on null Id.");

    return SystemReportVoAssembler.create((ReportBo) getDomainFactory().getDomainObject(ReportBo.class, reportRef.getID_ReportBo()));
}
项目:openmaxims-linux    文件:DeployReportsImpl.java   
/**
* listSystemReports
*/
@SuppressWarnings("rawtypes")
public ims.admin.vo.SystemReportVoCollection listSystemReports()
{
    DomainFactory factory = getDomainFactory();
    String hqlString = "from ReportBo as rep where rep.imsId is not null order by rep.reportName";
    List reports = factory.find(hqlString);
    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(reports);
}
项目:openmaxims-linux    文件:SearchReportImpl.java   
public ims.admin.vo.SystemReportVoCollection listReports(Boolean systemReportsOnly, String reportName)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer hql = new StringBuffer();

    hql.append(" FROM ReportBo AS rep ");

    if (Boolean.TRUE.equals(systemReportsOnly) || reportName != null)
    {
        hql.append(" WHERE ");
    }

    if (Boolean.TRUE.equals(systemReportsOnly))
    {
        hql.append("rep.imsId IS NOT NULL ");
    }

    if (reportName != null)
    {
        hql.append(" AND UPPER(rep.reportName) like :reportName ");
        markers.add("reportName");
        values.add("%" + reportName.toUpperCase() + "%");
    }

    hql.append(" order by UPPER(rep.reportName) asc");

    return SystemReportVoAssembler.createSystemReportVoCollectionFromReportBo(factory.find(hql.toString(), markers, values));
}
项目:openmaxims-linux    文件:ReportAccessImpl.java   
public ims.admin.vo.SystemReportVo saveReport(SystemReportVo report) throws ims.domain.exceptions.StaleObjectException
{
    if (report == null)
        throw new CodingRuntimeException("Cannot save null Report");

    if (!report.isValidated())
        throw new DomainRuntimeException("SystemReportVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    ReportBo doReport = SystemReportVoAssembler.extractReportBo(factory, report);
    factory.save(doReport);

    return SystemReportVoAssembler.create(doReport);
}
项目:openmaxims-linux    文件:ReportAccessImpl.java   
public SystemReportVo getReport(ReportBoRefVo reportRef)
{
    if (reportRef == null)
        throw new CodingRuntimeException("Cannot get Report on null Id.");

    return SystemReportVoAssembler.create((ReportBo) getDomainFactory().getDomainObject(ReportBo.class, reportRef.getID_ReportBo()));
}