public static ChequeEntity map()

in service/src/main/java/org/apache/fineract/cn/cheque/service/internal/mapper/ChequeMapper.java [36:52]


  public static ChequeEntity map(final Cheque cheque) {
    final ChequeEntity chequeEntity = new ChequeEntity();
    chequeEntity.setChequeNumber(cheque.getMicr().getChequeNumber());
    chequeEntity.setBranchSortCode(cheque.getMicr().getBranchSortCode());
    chequeEntity.setAccountNumber(cheque.getMicr().getAccountNumber());
    chequeEntity.setDrawee(cheque.getDrawee());
    chequeEntity.setDrawer(cheque.getDrawer());
    chequeEntity.setPayee(cheque.getPayee());
    chequeEntity.setAmount(Double.valueOf(cheque.getAmount()));
    final Date dateIssued = Date.valueOf(DateConverter.dateFromIsoString(cheque.getDateIssued()));
    chequeEntity.setDateIssued(dateIssued);
    chequeEntity.setOpenCheque(cheque.isOpenCheque());
    chequeEntity.setJournalEntryIdentifier(cheque.getJournalEntryIdentifier());
    chequeEntity.setCreatedBy(UserContextHolder.checkedGetUser());
    chequeEntity.setCreatedOn(LocalDateTime.now(Clock.systemUTC()));
    return chequeEntity;
  }