Package com.centraview.report.ejb.entity

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


   */
  public void delete(int[] reportIds)
  {
    try {
      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportLocal report = null;
      int index = 0;
      try {
        for (int i = 0; i < reportIds.length; i++) {
          index = reportIds[i];
          report = reportHome.findByPrimaryKey(new ReportPK(index, this.dataSource));
          report.remove();
        }
      } catch (ObjectNotFoundException e) {
        throw new EJBException("Report object not found, id = " + index);
      }
    } catch (Exception e) {
View Full Code Here


  {
    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());
      reportVO.setReportId(reportId);
      reportVO.setFrom(reportLocal.getDateFrom());
      reportVO.setTo(reportLocal.getDateTo());
      reportVO.setSelect(getAdHocPageData(reportLocal.getModuleId()));
      return reportVO;
    } catch (Exception e) {
      throw new EJBException(e);
    }
  }
View Full Code Here

  public int updateStandardReport(int userId, ReportVO reportVO, boolean saveName)
  {
    try {
      int reportId = 0;
      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportLocal reportLocal = reportHome.findByPrimaryKey(new ReportPK(reportVO.getReportId(), this.dataSource));

      if (saveName) {
        reportLocal.setDescription(reportVO.getDescription());
        reportLocal.setModuleId(reportVO.getModuleId());
        reportLocal.setName(reportVO.getName());
      }

      reportLocal.setDateFrom(reportVO.getFrom());
      reportLocal.setDateTo(reportVO.getTo());

      reportId = reportLocal.getReportId();
      return reportId;
    } catch (Exception e) {
      throw new EJBException(e);
    }
  }
View Full Code Here

      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
View Full Code Here

    ArrayList resultLine = null;
    CVDal dataAccessLayer = new CVDal(this.dataSource);
    ResultSet resultSet = null;
    try {
      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportLocal reportLocal = reportHome.findByPrimaryKey(new ReportPK(reportId, this.dataSource));
      reportResult.setReportId(reportLocal.getReportId());
      reportResult.setModuleId(reportLocal.getModuleId());
      reportResult.setName(reportLocal.getName());
      reportResult.setSearchCriteria(getSearchCriteriaString(userId, reportId));
      Date dateFrom = reportLocal.getDateFrom();
      Date dateTo = reportLocal.getDateTo();

      try {
        String query = getQueryForResultReport(userId, reportId, search, dataAccessLayer);

        dataAccessLayer.setSqlQuery(query);
View Full Code Here

          com.centraview.advancedsearch.AdvancedSearchLocalHome.class);
      AdvancedSearchLocal localAdvancedSearch = (AdvancedSearchLocal) cfh.create();
      localAdvancedSearch.setDataSource(this.dataSource);

      ReportLocalHome reportHome = EntityHomeFactory.getReportLocalHome();
      ReportLocal reportLocal = reportHome.findByPrimaryKey(new ReportPK(reportId, this.dataSource));
      resultVO.setReportId(reportLocal.getReportId());
      resultVO.setModuleId(reportLocal.getModuleId());
      resultVO.setName(reportLocal.getName());
      resultVO.setSearchCriteria(getSearchCriteriaString(userId, reportId));
      // get report dates
      java.sql.Date fromDate = reportLocal.getDateFrom();
      java.sql.Date toDate = reportLocal.getDateTo();

      resultVO.setDateRange(fromDate, toDate);

      String where = localAdvancedSearch.getWhereClauseForReport(userId, search, "");
      ReportBuilder reportbuilder = null;
View Full Code Here

TOP

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

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.