Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.CreditCard


  private String recCreateBy;
  private Date recCreateDatetime;

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


        form.setCustCreditCardFullName(custCreditCard.getCustCreditCardFullName());
        form.setCustCreditCardExpiryMonth(custCreditCard.getCustCreditCardExpiryMonth());
        form.setCustCreditCardExpiryYear(custCreditCard.getCustCreditCardExpiryYear());
        form.setCustCreditCardNum(AESEncoder.getInstance().decode(custCreditCard.getCustCreditCardNum()));
        form.setCustCreditCardVerNum(custCreditCard.getCustCreditCardVerNum());
        CreditCard creditCard = custCreditCard.getCreditCard();
        if (creditCard != null) {
          form.setCreditCardId(creditCard.getCreditCardId().toString());
        }
      }
      initSearchInfo(form, siteId);
      createEmptySecureTemplateInfo(request);
        return actionForward;
View Full Code Here

    customerCreditCard.setCustCreditCardNum(AESEncoder.getInstance().encode(form.getCustCreditCardNum()));
    customerCreditCard.setCustCreditCardExpiryMonth(form.getCustCreditCardExpiryMonth());
    customerCreditCard.setCustCreditCardExpiryYear(form.getCustCreditCardExpiryYear());
    customerCreditCard.setCustCreditCardVerNum(form.getCustCreditCardVerNum());
    String creditCardId = form.getCreditCardId();
    CreditCard creditCard = (CreditCard) em.find(CreditCard.class, Format.getLong(creditCardId));
    customerCreditCard.setCreditCard(creditCard);
    if (customerCreditCard.getCustCreditCardId() == null) {
      em.persist(customerCreditCard);
    }
    if (!found) {
View Full Code Here

       Query query = em.createQuery(sql);
      query.setParameter("siteId", siteId);
       Iterator<?> iterator = query.getResultList().iterator();
       Vector<LabelValueBean> vector = new Vector<LabelValueBean>();
       while (iterator.hasNext()) {
         CreditCard creditCard = (CreditCard) iterator.next();
         LabelValueBean bean = new LabelValueBean(creditCard.getCreditCardDesc(), creditCard.getCreditCardId().toString());
         vector.add(bean);
       }
       LabelValueBean creditCards[] = new LabelValueBean[vector.size()];
       vector.copyInto(creditCards);
       form.setCreditCards(creditCards);
View Full Code Here

    customerCreditCard.setCustCreditCardExpiryMonth(form.getCustCreditCardExpiryMonth());
    customerCreditCard.setCustCreditCardExpiryYear(form.getCustCreditCardExpiryYear());
    customerCreditCard.setCustCreditCardVerNum(form.getCustCreditCardVerNum());
    customerCreditCard.setRecUpdateBy(adminBean.getUser().getUserId());
    customerCreditCard.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
    CreditCard creditCard = CreditCardDAO.load(site.getSiteId(), Long.valueOf(form.getCreditCardId()));
    customerCreditCard.setCreditCard(creditCard);
    customer.getCustCreditCards().add(customerCreditCard);
    em.persist(customerCreditCard);

   
View Full Code Here

       query = em.createQuery(sql);
      query.setParameter("siteId", siteId);
       iterator = query.getResultList().iterator();
       vector = new Vector<LabelValueBean>();
       while (iterator.hasNext()) {
         CreditCard creditCard = (CreditCard) iterator.next();
         LabelValueBean bean = new LabelValueBean(creditCard.getCreditCardDesc(), creditCard.getCreditCardId().toString());
         vector.add(bean);
       }
       LabelValueBean creditCards[] = new LabelValueBean[vector.size()];
       vector.copyInto(creditCards);
       form.setCreditCards(creditCards);
View Full Code Here

        String sql = "from CreditCard where siteId = :siteId order by creditCardId";
        Query query = em.createQuery(sql);
        query.setParameter("siteId", Constants.SITE_SYSTEM);
        Iterator<?> iterator = query.getResultList().iterator();
        while (iterator.hasNext()) {
          CreditCard master = (CreditCard) iterator.next();
          CreditCard creditCard = new CreditCard();
          PropertyUtils.copyProperties(creditCard, master);
          creditCard.setSite(site);
          creditCard.setCreditCardId(null);
          creditCard.setRecUpdateBy(userId);
          creditCard.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
          creditCard.setRecCreateBy(userId);
          creditCard.setRecCreateDatetime(new Date(System.currentTimeMillis()));
          em.persist(creditCard);
        }
  }
View Full Code Here

      form.setCustCreditCardFullName(customerCreditCard.getCustCreditCardFullName());
      form.setCustCreditCardNum(AESEncoder.getInstance().decode(customerCreditCard.getCustCreditCardNum()));
      form.setCustCreditCardExpiryMonth(customerCreditCard.getCustCreditCardExpiryMonth());
      form.setCustCreditCardExpiryYear(customerCreditCard.getCustCreditCardExpiryYear());
      form.setCustCreditCardVerNum(customerCreditCard.getCustCreditCardVerNum());
      CreditCard creditCard = customerCreditCard.getCreditCard();
      if (creditCard != null) {
        form.setCreditCardId(creditCard.getCreditCardId().toString());
      }
      }
    }
View Full Code Here

    customerCreditCard.setCustCreditCardNum(AESEncoder.getInstance().encode(form.getCustCreditCardNum()));
    customerCreditCard.setCustCreditCardExpiryMonth(form.getCustCreditCardExpiryMonth());
    customerCreditCard.setCustCreditCardExpiryYear(form.getCustCreditCardExpiryYear());
    customerCreditCard.setCustCreditCardVerNum(form.getCustCreditCardVerNum());
    String creditCardId = form.getCreditCardId();
    CreditCard creditCard = (CreditCard) em.find(CreditCard.class, Format.getLong(creditCardId));
    customerCreditCard.setCreditCard(creditCard);
    if (customerCreditCard.getCustCreditCardId() == null) {
      em.persist(customerCreditCard);
    }
    if (!found) {
View Full Code Here

       query = em.createQuery(sql);
      query.setParameter("siteId", siteId);
       iterator = query.getResultList().iterator();
       vector = new Vector<LabelValueBean>();
       while (iterator.hasNext()) {
         CreditCard creditCard = (CreditCard) iterator.next();
         LabelValueBean bean = new LabelValueBean(creditCard.getCreditCardDesc(), creditCard.getCreditCardId().toString());
         vector.add(bean);
       }
       LabelValueBean creditCards[] = new LabelValueBean[vector.size()];
       vector.copyInto(creditCards);
       form.setCreditCards(creditCards);
View Full Code Here

TOP

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

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.