Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.Report


   
    String sql = "from Report report where report.site.siteId = 'default' and systemRecord = 'Y'";
    Query query = em.createQuery(sql);
    Iterator<?> iterator = query.getResultList().iterator();
    while (iterator.hasNext()) {
      Report masterReport = (Report) iterator.next();
      Report report = new Report();
      report.setSite(site);
      report.setReportName(masterReport.getReportName());
      report.setReportDesc(masterReport.getReportDesc());
      report.setReportText(masterReport.getReportText());
      report.setSystemRecord(Constants.VALUE_YES);
      report.setRecUpdateBy(userId);
      report.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      report.setRecCreateBy(userId);
      report.setRecCreateDatetime(new Date(System.currentTimeMillis()));
      em.persist(report);
    }
   
    sql = "from IeProfileHeader ieProfileHeader where ieProfileHeader.site.siteId = 'default' and systemRecord = 'Y'";
    query = em.createQuery(sql);
View Full Code Here


public class ReportDAO extends Report {
  private static final long serialVersionUID = -928260200482159949L;

  public static Report load(String siteId, Long reportId) throws SecurityException, Exception {
      EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
      Report report = (Report) em.find(Report.class, reportId);
    if (!report.getSite().getSiteId().equals(siteId)) {
      throw new SecurityException();
    }
    return report;
  }
View Full Code Here

TOP

Related Classes of com.jada.jpa.entity.Report

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.