Package de.xanders.data.customer.vo

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


    }

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

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

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


     *     
     * Prepares to enter a new contact entry
     */
    public String initContact() throws Exception {
        contactDetailForm = (ContactDetailForm) getForm(CONTACT_DETAIL_FORM);
        CustomerMapperFactory.getContactMapper().mapToBean(new ContactVO(), contactDetailForm);
        return "contactDetail";
    }
View Full Code Here

     * Saves (creates or updates) a contact entry
     */
    public String saveContact() throws Exception {
        contactDetailForm = (ContactDetailForm) getForm(CONTACT_DETAIL_FORM);
        try {
            contactVO = new ContactVO();
            CustomerMapperFactory.getContactMapper().mapToObj(contactDetailForm, contactVO);
            UserVO loggedInUserVO = (UserVO)getSession().getAttribute(Constants.LOGGED_IN_USER);
            if (contactVO.getContactId() == null) {
                contactVO.setCreatedOn(new Date());
                contactVO.setCreatedBy(loggedInUserVO.getUserIdent());
View Full Code Here

     * Deletes a contact entry
     */
    public String deleteContact() throws Exception {
        try {
            dataServiceLocator.getContactService().deleteContact(new Long(contactDetailForm.getContactId()));
            CustomerMapperFactory.getContactMapper().mapToBean(new ContactVO(), contactDetailForm);
        } catch (ContactServiceException ex) {
            logger.error("DAO exception occured, cause: ", ex);
            MessageUtils.addErrorMessage("error.dataSource");
        }
        return "contactDetail";
View Full Code Here

TOP

Related Classes of de.xanders.data.customer.vo.ContactVO

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.