Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.Template


    siteDomain.setRecCreateBy(userId);
    siteDomain.setRecCreateDatetime(new Date(System.currentTimeMillis()));
    siteDomain.setBaseCurrency(siteCurrencyClass);
    siteDomain.setSite(site);
   
    Template template = new Template();
      template.setSite(site);
      template.setTemplateName(Constants.TEMPLATE_BASIC);
      template.setTemplateDesc("Basic template");
       template.setRecUpdateBy(userId);
      template.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      template.setRecCreateBy(userId);
      template.setRecCreateDatetime(new Date(System.currentTimeMillis()));
      em.persist(template);

    siteDomain.setTemplate(template);

    em.persist(siteDomain);
View Full Code Here


public class TemplateDAO extends Template {
  private static final long serialVersionUID = -1198725498355587055L;

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

TOP

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

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.