Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.CustomerClass


      }
     
      sql = "from CustomerClass customerClass where siteId = :siteId and customerClass.systemRecord = 'Y'";
      query = em.createQuery(sql);
      query.setParameter("siteId", contentBean.getSiteDomain().getSite().getSiteId());
      CustomerClass customerClass = (CustomerClass) query.getSingleResult();
     
      sql = "from   Customer customer " +
        "where  customer.siteDomain.siteDomainId = :siteDomainId " +
        "and    custEmail = :custEmail ";
    query = em.createQuery(sql);
View Full Code Here


          }
        }
       
        if (customer == null) {
          customer = new Customer();
        CustomerClass customerClass = (CustomerClass) em.find(CustomerClass.class, payPalExpressCheckOut.getPaymentPaypalCustClassId());
        customer.setCustomerClass(customerClass);
          customer.setActive(Constants.VALUE_YES);
            customer.setRecCreateBy(Constants.USERNAME_CUSTOMER);
            customer.setRecCreateDatetime(new Date(System.currentTimeMillis()));
        }
View Full Code Here

    JSONEscapeObject object = new JSONEscapeObject();
    object.put("custClassId", "");
    object.put("custClassName", "All");
    custClasses.add(object);
    while (iterator.hasNext()) {
      CustomerClass customerClass = (CustomerClass) iterator.next();
      object = new JSONEscapeObject();
      object.put("custClassId", customerClass.getCustClassId());
      object.put("custClassName", customerClass.getCustClassName());
      custClasses.add(object);
    }
    return custClasses;
  }
View Full Code Here

      itemTierPrice.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
      if (Format.isNullOrEmpty(form.getCustClassId())) {
        itemTierPrice.setCustomerClass(null);
      }
      else {
        CustomerClass customerClass = CustomerClassDAO.load(site.getSiteId(), Format.getLong(form.getCustClassId()));
        itemTierPrice.setCustomerClass(customerClass);
      }
      em.persist(itemTierPrice);
    }
    else {
View Full Code Here

    query.setParameter("siteId", item.getSite().getSiteId());
    Iterator<?> iterator = query.getResultList().iterator();
    Vector<LabelValueBean> custClassList = new Vector<LabelValueBean>();
    custClassList.add(new LabelValueBean("", ""));
    while (iterator.hasNext()) {
      CustomerClass customerClass = (CustomerClass) iterator.next();
      LabelValueBean bean = new LabelValueBean(customerClass.getCustClassName(), customerClass.getCustClassId().toString());;
      custClassList.add(bean);
    }
    LabelValueBean custClasses[] = new LabelValueBean[custClassList.size()];
    custClassList.copyInto(custClasses);
    form.setCustClasses(custClasses);
View Full Code Here

        query = em.createQuery("from CustomerClass where siteId = :siteId order by custClassId");
        query.setParameter("siteId", form.getSiteId());
        iterator = query.getResultList().iterator();
        vector.add(new LabelValueBean("", ""));
        while (iterator.hasNext()) {
          CustomerClass customerClass = (CustomerClass) iterator.next();
          LabelValueBean bean = new LabelValueBean();
          bean.setLabel(customerClass.getCustClassName());
          bean.setValue(customerClass.getCustClassId().toString());
          vector.add(bean);
        }
        LabelValueBean customerClasses[] = new LabelValueBean[vector.size()];
        vector.copyInto(customerClasses);
        form.setCustomerClasses(customerClasses);
View Full Code Here

        query.setParameter("siteId", adminBean.getSite().getSiteId());
        Iterator<?> iterator = query.getResultList().iterator();
      JSONEscapeObject jsonResult = new JSONEscapeObject();
      Vector<JSONEscapeObject> vector = new Vector<JSONEscapeObject>();
        while (iterator.hasNext()) {
          CustomerClass customerClass = (CustomerClass) iterator.next();
          JSONEscapeObject jsonItem = new JSONEscapeObject();
          jsonItem.put("custClassId", customerClass.getCustClassId());
          jsonItem.put("custClassName", customerClass.getCustClassName());
          vector.add(jsonItem);
        }
        jsonResult.put("customerClasses", vector);
        String jsonString = jsonResult.toHtmlString();
        this.streamWebService(response, jsonString);
View Full Code Here

        Query query = em.createQuery("from CustomerClass where siteId = :siteId order by custClassId");
        query.setParameter("siteId", site.getSiteId());
        Iterator<?> iterator = query.getResultList().iterator();
        vector.add(new LabelValueBean("", ""));
        while (iterator.hasNext()) {
          CustomerClass customerClass = (CustomerClass) iterator.next();
          LabelValueBean bean = new LabelValueBean();
          bean.setLabel(customerClass.getCustClassName());
          bean.setValue(customerClass.getCustClassId().toString());
          vector.add(bean);
        }
        LabelValueBean customerClasses[] = new LabelValueBean[vector.size()];
        vector.copyInto(customerClasses);
        form.setCustomerClasses(customerClasses);
View Full Code Here

      }
     
      sql = "from CustomerClass customerClass where siteId = :siteId and customerClass.systemRecord = 'Y'";
      query = em.createQuery(sql);
      query.setParameter("siteId", site.getSiteId());
      CustomerClass customerClass = (CustomerClass) query.getSingleResult();

     
      Customer customer = new Customer();
      customer.setSite(site);
    if (singleCheckout == Constants.VALUE_YES) {
View Full Code Here

      JSONEscapeObject jsonResult = new JSONEscapeObject();
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
        Long trProductId = Format.getLong(form.getTaxRegionProductId());
        Long custClassId = Format.getLong(form.getCustClassId());
        TaxRegionProduct taxRegionProduct = (TaxRegionProduct) em.find(TaxRegionProduct.class, trProductId);
        CustomerClass customerClass = (CustomerClass) em.find(CustomerClass.class, custClassId);
       
        Iterator<?> iterator = taxRegionProduct.getCustomerClasses().iterator();
        while (iterator.hasNext()) {
          TaxRegionProductCust c = (TaxRegionProductCust) iterator.next();
          if (c.getCustomerClass().getCustClassId().equals(customerClass.getCustClassId())) {
              jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
              jsonResult.put("message", "Customer class already exist");
              streamWebService(response, jsonResult.toHtmlString());
            return null;
          }
View Full Code Here

TOP

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

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.