Examples of TaxRegionZip


Examples of com.jada.jpa.entity.TaxRegionZip

      JSONEscapeObject jsonResult = new JSONEscapeObject();
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
      Iterator<TaxRegionZip> iterator = taxRegion.getZipCodes().iterator();
      Vector<JSONEscapeObject> zipCodes = new Vector<JSONEscapeObject>();
      while (iterator.hasNext()) {
        TaxRegionZip taxRegionZip = (TaxRegionZip) iterator.next();
        JSONEscapeObject object = new JSONEscapeObject();
        object.put("taxRegionZipId", taxRegionZip.getTaxRegionZipId());
        object.put("zipCodeStart", taxRegionZip.getZipCodeStart());
        object.put("zipCodeEnd", taxRegionZip.getZipCodeEnd());
        zipCodes.add(object);
      }
      jsonResult.put("zipCodes", zipCodes);
      result = jsonResult.toHtmlString();
      return result;
View Full Code Here

Examples of com.jada.jpa.entity.TaxRegionZip

      jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
     
        Long taxRegionId = Format.getLong(form.getTaxRegionId());
        TaxRegion taxRegion = (TaxRegion) em.find(TaxRegion.class, taxRegionId);
       
        TaxRegionZip taxRegionZip = new TaxRegionZip();
        taxRegionZip.setZipCodeStart(form.getZipCodeStart());
        taxRegionZip.setZipCodeEnd(form.getZipCodeEnd());
        taxRegionZip.setRecUpdateBy(adminBean.getUser().getUserId());
        taxRegionZip.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
        taxRegionZip.setRecCreateBy(adminBean.getUser().getUserId());
        taxRegionZip.setRecCreateDatetime(new Date(System.currentTimeMillis()));
        taxRegionZip.setTaxRegion(taxRegion);
   
    em.persist(taxRegionZip);
   
    String result = getJSONZipCodeList(taxRegion);
    streamWebService(response, result);
View Full Code Here

Examples of com.jada.jpa.entity.TaxRegionZip

      jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
     
        Long taxRegionId = Format.getLong(form.getTaxRegionId());
        TaxRegion taxRegion = (TaxRegion) em.find(TaxRegion.class, taxRegionId);
        Long taxRegionZipId = Format.getLong(form.getTaxRegionZipId());
        TaxRegionZip taxRegionZip = (TaxRegionZip) em.find(TaxRegionZip.class, taxRegionZipId);
      
        taxRegionZip.setZipCodeStart(form.getZipCodeStart());
        taxRegionZip.setZipCodeEnd(form.getZipCodeEnd());
        taxRegionZip.setRecUpdateBy(adminBean.getUser().getUserId());
        taxRegionZip.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
        taxRegionZip.setTaxRegion(taxRegion);
   
    em.persist(taxRegionZip);
   
    String result = getJSONZipCodeList(taxRegion);
    streamWebService(response, result);
View Full Code Here

Examples of com.jada.jpa.entity.TaxRegionZip

        String taxRegionZipIds[] = form.getTaxRegionZipIds();
        TaxRegion taxRegion = (TaxRegion) em.find(TaxRegion.class, taxRegionId);
        if (taxRegionZipIds != null) {
          for (int i = 0; i < taxRegionZipIds.length; i++) {
            Long taxRegionZipId = Format.getLong(taxRegionZipIds[i]);
              TaxRegionZip taxRegionZip = (TaxRegionZip) em.find(TaxRegionZip.class, taxRegionZipId);
              taxRegion.getZipCodes().remove(taxRegionZip);
              em.remove(taxRegionZip);
          }
        }
    String result = getJSONZipCodeList(taxRegion);
View Full Code Here

Examples of com.jada.jpa.entity.TaxRegionZip

          }
          String zipCode = shippingAddress.getCustZipCode();
          if (!found && !Format.isNullOrEmpty(zipCode)) {
            Iterator<?> iteratorZipCode = tr.getZipCodes().iterator();
            while (iteratorZipCode.hasNext()) {
              TaxRegionZip trZip = (TaxRegionZip) iteratorZipCode.next();
              if (zipCode.compareTo(trZip.getZipCodeStart()) >= 0 &&
                zipCode.compareTo(trZip.getZipCodeEnd()) <= 0) {
                vector.add(tr);
                break;
              }
            }
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.