Package com.centraview.report.ejb.entity

Examples of com.centraview.report.ejb.entity.ReportContentLocalHome


  public ReportVO getStandardReport(int userId, int reportId)
  {
    try {
      ReportVO reportVO = new ReportVO();
      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportContentLocalHome reportContentHome = EntityHomeFactory.getReportContentLocalHome();
      ReportLocal reportLocal = reportHome.findByPrimaryKey(new ReportPK(reportId, this.dataSource));

      reportVO.setDescription(reportLocal.getDescription());
      reportVO.setModuleId(reportLocal.getModuleId());
      reportVO.setName(reportLocal.getName());
View Full Code Here


   */
  public int addAdHocReport(int userId, ReportVO reportVO)
  {
    try {
      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportContentLocalHome reportContentHome = EntityHomeFactory.getReportContentLocalHome();
      ReportContentLocal reportContentLocal = null;
      ReportContentVO field = null;
      int n = 0;
      int reportId = 0;
      short seqNumber = 0;
      Byte sortSeq = null;

      Timestamp today = new Timestamp(System.currentTimeMillis());
      ReportLocal reportLocal = reportHome.create(today, reportVO.getFrom(), reportVO.getTo(), reportVO.getDescription(), new Integer(userId), null,
          reportVO.getModuleId(), reportVO.getName(), ReportConstants.ADHOC_REPORT_CODE, null, this.dataSource);
      reportId = reportLocal.getReportId();
      ArrayList selectedFields = reportVO.getSelectedFields();
      n = selectedFields.size();
      for (int i = 0; i < n; i++) {
        field = (ReportContentVO) selectedFields.get(i);
        reportContentLocal = reportContentHome.create(field.getFieldId(), field.getTableId(), reportId, ++seqNumber, field.getSortOrder(), field
            .getSortSeq(), this.dataSource);
      }
      return reportId;
    } catch (Exception e) {
      throw new EJBException(e);
View Full Code Here

      String fieldName = null;
      ArrayList selectedTopFields = new ArrayList();

      ReportVO reportVO = getStandardReport(userId, reportId);

      ReportContentLocalHome reportContentHome = EntityHomeFactory.getReportContentLocalHome();
      ReportContentLocal reportContent = null;
      Collection reportContents = reportContentHome.findByReport(reportId, this.dataSource);
      for (Iterator iterator = reportContents.iterator(); iterator.hasNext();) {
        reportContent = (ReportContentLocal) iterator.next();
        tableId = reportContent.getTableId();
        fieldId = reportContent.getFieldId();
        fieldName = getFieldName(fieldId, tableId);
View Full Code Here

      int n = 0;
      int reportId = 0;
      short seqNumber = 0;
      ReportContentVO field = null;
      ReportContentLocal reportContentLocal = null;
      ReportContentLocalHome reportContentHome = EntityHomeFactory.getReportContentLocalHome();

      reportId = updateStandardReport(userId, reportVO, true);

      for (Iterator iterator = reportContentHome.findByReport(reportId, this.dataSource).iterator(); iterator.hasNext();) {
        reportContentLocal = (ReportContentLocal) iterator.next();
        reportContentLocal.remove();
      }

      ArrayList selectedFields = reportVO.getSelectedFields();
      n = selectedFields.size();
      for (int i = 0; i < n; i++) {
        field = (ReportContentVO) selectedFields.get(i);
        reportContentLocal = reportContentHome.create(field.getFieldId(), field.getTableId(), reportId, ++seqNumber, field.getSortOrder(), field
            .getSortSeq(), this.dataSource);
      }
      return reportId;
    } catch (Exception e) {
      throw new EJBException(e);
View Full Code Here

TOP

Related Classes of com.centraview.report.ejb.entity.ReportContentLocalHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.