Examples of OutgoingPaymentEntity


Examples of com.expositds.ars.dao.entity.billing.OutgoingPaymentEntity

      result = incomingPaymentEntity;
    }

    if (source instanceof OutgoingPayment) {
      OutgoingPaymentEntity outgoingPaymentEntity = new OutgoingPaymentEntity();

      outgoingPaymentEntity.setCompleted(source.isCompleted());
      outgoingPaymentEntity.setCreationDate(source.getCreationDate());
      outgoingPaymentEntity.setId(source.getId());
      outgoingPaymentEntity.setPaymentDate(source.getPaymentDate());

      Employee employee = ((OutgoingPayment) source).getRecipient();
      EmployeeEntity employeeEntity = null;
      if (employee instanceof Mechanic) {
        employeeEntity = DozerHelper.map(employee, MechanicEntity.class);
      }
      if (employee instanceof Employee) {
        employeeEntity = DozerHelper.map(employee, EmployeeEntity.class);
      }

      outgoingPaymentEntity.setRecipient(employeeEntity);
      outgoingPaymentEntity.setSubject(source.getSubject());

      SubsidiaryEntity subsidiaryEntity = DozerHelper.map(
          source.getSubsidiary(), SubsidiaryEntity.class);
      outgoingPaymentEntity.setSubsidiary(subsidiaryEntity);
      outgoingPaymentEntity.setTotal(source.getTotal());
      outgoingPaymentEntity.setType(source.getType());

      result = outgoingPaymentEntity;
    }

    return result;
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.