Package de.xanders.data.customer.vo

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


        List list = new ArrayList();
        Collection invoiceCollection = this.getInvoiceDao().findByCriteria(invoiceCriteria);
        Iterator iterator = invoiceCollection.iterator();
        while (iterator.hasNext()) {
            Invoice invoice = (Invoice) iterator.next();
            InvoiceVO invoiceVO = this.getInvoiceDao().toInvoiceVO(invoice);
            CustAccountService custAccountService = DataServiceLocator.instance().getCustAccountService();
            invoiceVO.setCustAccountVO(custAccountService.toCustAccountVO(invoice.getCustAccount()));
            list.add(invoiceVO);
        }
        return list;          
    }
View Full Code Here


     *
   * Prepares to enter a new invoice entry
   */
  public String initInvoice() throws Exception {
        invoiceDetailForm = (InvoiceDetailForm) getForm(INVOICE_DETAIL_FORM);
        CustomerMapperFactory.getInvoiceMapper().mapToBean(new InvoiceVO(), invoiceDetailForm);
        return "invoiceDetail";
  }
View Full Code Here

   * Edits a invoice entry
   */
  public String editInvoice() throws Exception {
        invoiceDetailForm = (InvoiceDetailForm) getForm(INVOICE_DETAIL_FORM);
    try {
      invoiceVO = new InvoiceVO();
      invoiceVO = dataServiceLocator.getInvoiceService().getInvoiceById(getReqParam(INVOICE_ID));
      CustomerMapperFactory.getInvoiceMapper().mapToBean(invoiceVO, invoiceDetailForm);
    } catch (InvoiceServiceException ex) {
      logger.error("DAO exception occured, cause: ", ex);
      MessageUtils.addErrorMessage("error.dataSource");
View Full Code Here

   */
  public String saveInvoice() throws Exception {
        invoiceDetailForm = (InvoiceDetailForm) getForm(INVOICE_DETAIL_FORM);
    if (validateBeanProperties(invoiceDetailForm)) {
      try {
        invoiceVO = new InvoiceVO();
        CustomerMapperFactory.getInvoiceMapper().mapToObj(invoiceDetailForm, invoiceVO);
                UserVO loggedInUserVO = (UserVO)getSession().getAttribute(Constants.LOGGED_IN_USER);
                if (invoiceVO.getInvoiceId() == null) {
                    invoiceVO.setCreatedOn(new Date());
                    invoiceVO.setCreatedBy(loggedInUserVO.getUserIdent());
View Full Code Here

   */
  public String deleteInvoice() throws Exception {
        invoiceDetailForm = (InvoiceDetailForm) getForm(INVOICE_DETAIL_FORM);
    try {
      dataServiceLocator.getInvoiceService().deleteInvoice(new Long(invoiceDetailForm.getInvoiceId()));
      CustomerMapperFactory.getInvoiceMapper().mapToBean(new InvoiceVO(), invoiceDetailForm);
    } catch (InvoiceServiceException ex) {
      logger.error("DAO exception occured, cause: ", ex);
      MessageUtils.addErrorMessage("error.dataSource");
    }
    return "invoiceDetail";
View Full Code Here

    }

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

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

              if (column.equals("invoiceState")) {
                  return ascending
                  ? c1.getInvoiceState().compareTo(c2.getInvoiceState())
                  : c2.getInvoiceState().compareTo(c1.getInvoiceState());
              } 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

TOP

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

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.