Package de.xanders.data.customer.vo

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


     * @see LeadService#getLeadById(java.lang.Long)
     */
    protected LeadVO handleGetLeadById(java.lang.Long leadId)
        throws java.lang.Exception {
      Lead lead = this.getLeadDao().load(leadId);
      LeadVO leadVO = this.getLeadDao().toLeadVO(lead);
      CustAccountService custAccountService = DataServiceLocator.instance().getCustAccountService();
      leadVO.setCustAccountVO(custAccountService.toCustAccountVO(lead.getCustAccount()));
      return leadVO;     
    }
View Full Code Here


      List list = new ArrayList();
        Collection leadCollection = this.getLeadDao().findByCriteria(leadCriteria);
        Iterator iterator = leadCollection.iterator();
        while (iterator.hasNext()) {
          Lead lead = (Lead) iterator.next();
          LeadVO leadVO = this.getLeadDao().toLeadVO(lead);
          CustAccountService custAccountService = DataServiceLocator.instance().getCustAccountService();
          leadVO.setCustAccountVO(custAccountService.toCustAccountVO(lead.getCustAccount()));
          list.add(leadVO);
        }
        return list;  
    }
View Full Code Here

    }

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

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

              if (column.equals("quoteState")) {
                  return ascending
                  ? c1.getLeadState().compareTo(c2.getLeadState())
                  : c2.getLeadState().compareTo(c1.getLeadState());
              } else 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 lead entry
     */
    public String initLead() throws Exception {
        leadDetailForm = (LeadDetailForm) getForm(LEAD_DETAIL_FORM);
        CustomerMapperFactory.getLeadMapper().mapToBean(new LeadVO(), leadDetailForm);
        return "leadDetail";
    }
View Full Code Here

     */
    public String saveLead() throws Exception {
        leadDetailForm = (LeadDetailForm) getForm(LEAD_DETAIL_FORM);
        if (validateBeanProperties(leadDetailForm)) {
            try {
                leadVO = new LeadVO();
                CustomerMapperFactory.getLeadMapper().mapToObj(leadDetailForm, leadVO);
                UserVO loggedInUserVO = (UserVO)getSession().getAttribute(Constants.LOGGED_IN_USER);
                if (leadVO.getLeadId() == null) {
                    leadVO.setCreatedOn(new Date());
                    leadVO.setCreatedBy(loggedInUserVO.getUserIdent());
View Full Code Here

     */
    public String deleteLead() throws Exception {
        leadDetailForm = (LeadDetailForm) getForm(LEAD_DETAIL_FORM);
        try {
            dataServiceLocator.getLeadService().deleteLead(new Long(leadDetailForm.getLeadId()));
            CustomerMapperFactory.getLeadMapper().mapToBean(new LeadVO(), leadDetailForm);
        } catch (LeadServiceException ex) {
            logger.error("DAO exception occured, cause: ", ex);
            MessageUtils.addErrorMessage("error.dataSource");
        }
        return "leadDetail";
View Full Code Here

     * Prepares to enter a new lead entry
     */
    public String createLead() throws Exception {
        leadDetailForm = (LeadDetailForm) getBean(LEAD_DETAIL_FORM);
        leadDetailForm.setFormStatus(LeadDetailForm.UPDATE);
        CustomerMapperFactory.getLeadMapper().mapToBean(new LeadVO(), leadDetailForm);
        return LEAD_DETAIL;
    }
View Full Code Here

     */
    public String saveLead() throws Exception {
        leadDetailForm = (LeadDetailForm) getBean(LEAD_DETAIL_FORM);
        if (validateBeanProperties(leadDetailForm)) {
            try {
                leadVO = new LeadVO();
                CustomerMapperFactory.getLeadMapper().mapToObj(leadDetailForm, leadVO);
                UserVO loggedInUserVO = (UserVO)getSession().getAttribute(LOGGED_IN_USER);
                if (leadVO.getLeadId() == null) {
                    leadVO.setCreatedOn(new Date());
                    leadVO.setCreatedBy(loggedInUserVO.getUserIdent());
View Full Code Here

     */
    public String deleteLead() throws Exception {
        leadDetailForm = (LeadDetailForm) getBean(LEAD_DETAIL_FORM);
        try {
            dataServiceLocator.getLeadService().deleteLead(new Long(leadDetailForm.getLeadId()));
            CustomerMapperFactory.getLeadMapper().mapToBean(new LeadVO(), leadDetailForm);
            leadDetailForm.setFormStatus(null);
        } catch (LeadServiceException ex) {
            logger.error("DAO exception occured, cause: ", ex);
            MessageUtils.addErrorMessage("error.dataSource");
        }
View Full Code Here

TOP

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

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.