Examples of AddressVO


Examples of com.centraview.contact.helper.AddressVO

      // Getting AddressVO from Contact Helper Ejb //
      // (userID,contactID,contactType
      // TODO: Hardcoded UserId to be removed Later (use
      // this.operationIndividualID)
      AddressVO addVO = remote.getPrimaryAddressForContact(1, this.indVo.getContactID(), this.indVo.getContactType());
      this.indVo.setPrimaryAddress(addVO);

      if (indVo.getModifiedBy() != 0) {
        String individualName = remote.getIndividualName(this.indVo.getModifiedBy());
        if (individualName != null && individualName.length() > 20) {
View Full Code Here

Examples of com.centraview.contact.helper.AddressVO

    String sid = (String)dynaForm.get("sourceid");
    setSource(Integer.parseInt(sid));
    setSourceName((String)dynaForm.get("source"));

    //This is for setting Address
    AddressVO primaryAdd = new AddressVO();
    primaryAdd.setStreet1((String)dynaForm.get("street1"));
    primaryAdd.setStreet2((String)dynaForm.get("street2"));
    primaryAdd.setCity((String)dynaForm.get("city"));

    primaryAdd.setStateName((String)dynaForm.get("state"));

    primaryAdd.setZip((String)dynaForm.get("zip"));

    primaryAdd.setCountryName((String)dynaForm.get("country"));

    primaryAdd.setWebsite(((String)dynaForm.get("paWebsite")));

    String addId = (String)dynaForm.get("AddressID");
    int addressID;
    if (addId != null && addId.length() == 0) {
      addressID = 0;
    } else {
      addressID = Integer.parseInt(addId);
    }
    primaryAdd.setAddressID(addressID);

    setPrimaryAddress(primaryAdd);
  }// end of constructor
View Full Code Here

Examples of com.centraview.contact.helper.AddressVO

        Integer sourceId = (null == dynaForm.get("sourceId")) ? new Integer(0) : (Integer)dynaForm.get("sourceId");
        this.setSourceName((String)dynaForm.get("sourceName"));
        this.setSource(sourceId.intValue());
      }
      if (CVUtility.updateFieldPermitted(individualFieldRights, "address")) {
        AddressVO primaryAddress = this.getPrimaryAddress();
        primaryAddress.setStreet1((String)dynaForm.get("street1"));
        primaryAddress.setStreet2((String)dynaForm.get("street2"));
        primaryAddress.setCity((String)dynaForm.get("city"));
        primaryAddress.setStateName((String)dynaForm.get("state"));
        primaryAddress.setZip((String)dynaForm.get("zip"));
        primaryAddress.setCountryName((String)dynaForm.get("country"));
        String webSiteForm = (null == dynaForm.get("website")) ? "" : (String)dynaForm.get("website");
        String webSite = "";
        if (webSiteForm.matches("^https?://.+")) {
          webSite = webSiteForm;
        } else if (webSiteForm.trim().length() > 0) {
          webSite = "http://" + webSiteForm;
        }
        primaryAddress.setWebsite(webSite);
        Integer addressId = (dynaForm.get("addressId") == null) ? new Integer(-1) : (Integer)dynaForm.get("addressId");
        primaryAddress.setAddressID(addressId.intValue());
        this.setPrimaryAddress(primaryAddress);
      }
      if (CVUtility.updateFieldPermitted(individualFieldRights, "contactmethod")) {
        MethodOfContactVO workingVO = null;
        HashMap currentMocVOs = new HashMap();
View Full Code Here

Examples of com.centraview.contact.helper.AddressVO

        individualForm.set("mocId" + count, String.valueOf(moc.getMocID()));
        count++;
      }
    } // end of while

    AddressVO address = this.getPrimaryAddress();
    if (address != null) {
      if (address.getAddressID() != 0) {
        individualForm.set("addressId", new Integer(address.getAddressID()));
      }
      if (address.getStreet1() != null) {
        individualForm.set("street1", address.getStreet1());
      }
      if (address.getStreet2() != null) {
        individualForm.set("street2", address.getStreet2());
      }
      if (address.getCity() != null) {
        individualForm.set("city", address.getCity());
      }
      if (address.getStateName() != null) {
        individualForm.set("state", address.getStateName());
      }
      if (address.getZip() != null) {
        individualForm.set("zip", address.getZip());
      }
      if (address.getCountryName() != null) {
        individualForm.set("country", address.getCountryName());
      }
      if (address.getWebsite() != null) {
        individualForm.set("website", address.getWebsite());
      }
    }
  } // end of populateFormBean()
View Full Code Here

Examples of com.centraview.contact.helper.AddressVO

              accHelper.setDataSource(this.dataSource);

              ContactHelperLocalHome home2 = (ContactHelperLocalHome) ic.lookup("local/ContactHelper");
              ContactHelperLocal contactHelperLocal = home2.create();
              contactHelperLocal.setDataSource(this.dataSource);
              AddressVO addVO = contactHelperLocal.getAddress(shipToId);
              // FIXME I assume the addVO is gotten here so the taxJurisdictionId can be
              // found, unfortunately that doesn't happen.
              if (taxJurisdictionId != 0) {
                taxRate = accHelper.getTax(taxClassId, taxJurisdictionId);
              }// if (taxJurisdictionId !=0)
View Full Code Here

Examples of de.xanders.data.customer.vo.AddressVO

    }

    protected void sort(final String column, final boolean ascending) {
      Comparator comparator = new Comparator() {
          public int compare(Object o1, Object o2) {
              AddressVO c1 = (AddressVO) o1;
              AddressVO c2 = (AddressVO) o2;

              if (column == null) {
                  return 0;
              }

              if (column.equals("addressId")) {
                  return ascending
                  ? c1.getAddressId().compareTo(c2.getAddressId())
                  : c2.getAddressId().compareTo(c1.getAddressId());
              } else {
                  return 0;
              }
          }
      };
View Full Code Here

Examples of org.opencustomer.db.vo.crm.AddressVO

        PersonVO person = (PersonVO) getPanel().getEntity();

        if (log.isDebugEnabled())
            log.debug("save button pressed");

        AddressVO mainAddress = getAddress(person, AddressVO.Type.MAIN);
        mainAddress.setName(form.getMainAddressName());
        mainAddress.setStreet(form.getMainAddressStreet());
        mainAddress.setZip(form.getMainAddressZip());
        mainAddress.setCity(form.getMainAddressCity());
       
        manageAddress(person, mainAddress);
       
        AddressVO postalAddress = getAddress(person, AddressVO.Type.POSTAL);
        postalAddress.setName(form.getPostalAddressName());
        postalAddress.setStreet(form.getPostalAddressStreet());
        postalAddress.setPostbox(form.getPostalAddressPostbox());
        postalAddress.setZip(form.getPostalAddressZip());
        postalAddress.setCity(form.getPostalAddressCity());
       
        manageAddress(person, postalAddress);
    }
View Full Code Here

Examples of org.opencustomer.db.vo.crm.AddressVO

        return isEmpty;
    }

    private AddressVO getAddress(PersonVO person, AddressVO.Type type)
    {
        AddressVO foundValue = null;

        for (AddressVO address : person.getAddresses())
        {
            if (type.equals(address.getType()))
            {
                if (log.isDebugEnabled())
                    log.debug("address found for " + type);

                foundValue = address;
                break;
            }
        }

        if (foundValue == null)
        {
            if (log.isDebugEnabled())
                log.debug("create address for " + type);

            foundValue = new AddressVO();
            foundValue.setType(type);
            foundValue.setPerson(person);
        }

        return foundValue;
    }
View Full Code Here

Examples of org.opencustomer.db.vo.crm.AddressVO

    @Override
    protected void writeForm(PageOverviewForm form, ActionMessages errors, HttpServletRequest request) {
        PersonVO person = (PersonVO)getPanel().getEntity();
       
        AddressVO mainAddress   = null;
        AddressVO postalAddress = null;
       
        // get person addresses
        for(AddressVO address : person.getAddresses()) {
            if(AddressVO.Type.MAIN.equals(address.getType()) && mainAddress == null) {
                mainAddress = address;
            } else if(AddressVO.Type.POSTAL.equals(address.getType()) && postalAddress == null) {
                postalAddress = address;
            }
        }

        // get company addresses
        if(person.getCompany() != null && Hibernate.isInitialized(person.getCompany().getAddresses())) {
            for(AddressVO address : person.getCompany().getAddresses()) {
                if(AddressVO.Type.MAIN.equals(address.getType()) && mainAddress == null) {
                    mainAddress = address;
                } else if(AddressVO.Type.POSTAL.equals(address.getType()) && postalAddress == null) {
                    postalAddress = address;
                }
            }
        }
       
        if(mainAddress != null) {
            getPanel().setAttribute("mainAddress", mainAddress);
            if(mainAddress.getCompany() != null)
                getPanel().setAttribute("mainAddressCompany", Boolean.TRUE);
            else
                getPanel().removeAttribute("mainAddressCompany");
        } else {
            getPanel().removeAttribute("mainAddress");
            getPanel().removeAttribute("mainAddressCompany");
        }
       
        if(postalAddress != null) {
            getPanel().setAttribute("postalAddress", postalAddress);
            if(postalAddress.getCompany() != null)
                getPanel().setAttribute("postalAddressCompany", Boolean.TRUE);
            else
                getPanel().removeAttribute("postalAddressCompany");
        } else {
            getPanel().removeAttribute("postalAddress");
View Full Code Here

Examples of org.opencustomer.db.vo.crm.AddressVO

    @Override
    protected void writeForm(PageOverviewForm form, ActionMessages errors, HttpServletRequest request) {
        CompanyVO company = (CompanyVO)getPanel().getEntity();
       
        AddressVO mainAddress   = null;
        AddressVO postalAddress = null;
       
        for(AddressVO address : company.getAddresses()) {
            if(AddressVO.Type.MAIN.equals(address.getType())) {
                mainAddress = address;
            } else if(AddressVO.Type.POSTAL.equals(address.getType())) {
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.