DealDTO.java

package com.tradecloud.dto.treasury;

import com.tradecloud.domain.model.deal.BuySellDealType;
import com.tradecloud.domain.model.deal.DealLegType;
import com.tradecloud.domain.settlement.SettlementSplitPaymentType;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by ds on 9/23/14.
 */
public class DealDTO extends BaseDTO {
    private Date maturityDate;
    private Date estimatedSettlementDate;
    private Date settlementDate;
    private Date dealDate;
    private Date invoicedDate;
    private Date expiryDate;
    private String supplier;
    private String tradePurpose;
    private MoneyDTO spotRate= new MoneyDTO();
    private MoneyDTO forwardRate= new MoneyDTO();
    private MoneyDTO amount=new MoneyDTO();
    private String status;
    private DefaultDTO organisationalUnit;
    private DefaultDTO forexGroup;
    private String orderReference;
    private String dealLinkReference;
    private String shippingReference;
    private String paymentReference;
    private String debitCreditNoteReference;
    private MoneyDTO debitCreditNoteAmount=new MoneyDTO();
    private String invoiceReference;
    private Date debitCreditNoteSettlementDate;
    private DealLegType dealLegType;
    private String source;
    private String transactionType;
    private BuySellDealType buySellDealType;
    private MoneyDTO localCurrencyAmount=new MoneyDTO();
    private Date fecMaturityDate;
    private MoneyDTO groupDealAmount= new MoneyDTO();
    private MoneyDTO totalLinkedAmount= new MoneyDTO();
    private MoneyDTO linkedRate= new MoneyDTO();
    private MoneyDTO linkedCashFlow= new MoneyDTO();
    private MoneyDTO cashFlow= new MoneyDTO();
    private MoneyDTO unlinkedAmount= new MoneyDTO();
    private MoneyDTO fecRequestLinkedAmount= new MoneyDTO();
    private MoneyDTO fecLinkedAmount= new MoneyDTO();
    private boolean currencySelected;
    private boolean selected;
    private String clientName;
    private List<AuditEventDTO> auditEventDTOs;
    private List<FECDealLinkDTO> fecDealLinkDTOs;
    private List<FECRequestDealLinkDTO> fecRequestDealLinkDTOs;
    private String party;
    private String buyer;
    private String paymentTerm;
    private Date shipmentDate;
    private String logoPath;
    private DefaultDTO nominatedBank;
    private String paymentType;
    private BigDecimal orderSettledAmount;
    private BigDecimal balanceOutstanding;
    private String shipmentNumber;
    private Date shipmentBillDate;

    private boolean earlyOrder = false;

    public Date getMaturityDate() {
        return maturityDate;
    }

    public void setMaturityDate(Date maturityDate) {
        this.maturityDate = maturityDate;
    }

    public Date getEstimatedSettlementDate() {
        return estimatedSettlementDate;
    }

    public void setEstimatedSettlementDate(Date estimatedSettlementDate) {
        this.estimatedSettlementDate = estimatedSettlementDate;
    }

    public Date getSettlementDate() {
        return settlementDate;
    }

    public void setSettlementDate(Date settlementDate) {
        this.settlementDate = settlementDate;
    }

    public Date getDealDate() {
        return dealDate;
    }

    public void setDealDate(Date dealDate) {
        this.dealDate = dealDate;
    }

    public Date getInvoicedDate() {
        return invoicedDate;
    }

    public void setInvoicedDate(Date invoicedDate) {
        this.invoicedDate = invoicedDate;
    }

    public Date getExpiryDate() {
        return expiryDate;
    }

    public void setExpiryDate(Date expiryDate) {
        this.expiryDate = expiryDate;
    }

    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }

    public String getTradePurpose() {
        return tradePurpose;
    }

    public void setTradePurpose(String tradePurpose) {
        this.tradePurpose = tradePurpose;
    }

    public MoneyDTO getSpotRate() {
        return spotRate;
    }

    public void setSpotRate(MoneyDTO spotRate) {
        this.spotRate = spotRate;
    }

    public MoneyDTO getForwardRate() {
        return forwardRate;
    }

    public void setForwardRate(MoneyDTO forwardRate) {
        this.forwardRate = forwardRate;
    }

    public MoneyDTO getAmount() {
        return amount;
    }

    public void setAmount(MoneyDTO amount) {
        this.amount = amount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public DefaultDTO getOrganisationalUnit() {
        return organisationalUnit;
    }

    public void setOrganisationalUnit(DefaultDTO organisationalUnit) {
        this.organisationalUnit = organisationalUnit;
    }

    public DefaultDTO getForexGroup() {
        return forexGroup;
    }

    public void setForexGroup(DefaultDTO forexGroup) {
        this.forexGroup = forexGroup;
    }

    public String getOrderReference() {
        return orderReference;
    }

    public void setOrderReference(String orderReference) {
        this.orderReference = orderReference;
    }

    public String getDealLinkReference() {
        return dealLinkReference;
    }

    public void setDealLinkReference(String dealLinkReference) {
        this.dealLinkReference = dealLinkReference;
    }

    public String getShippingReference() {
        return shippingReference;
    }

    public void setShippingReference(String shippingReference) {
        this.shippingReference = shippingReference;
    }

    public String getPaymentReference() {
        return paymentReference;
    }

    public void setPaymentReference(String paymentReference) {
        this.paymentReference = paymentReference;
    }

    public String getDebitCreditNoteReference() {
        return debitCreditNoteReference;
    }

    public void setDebitCreditNoteReference(String debitCreditNoteReference) {
        this.debitCreditNoteReference = debitCreditNoteReference;
    }

    public MoneyDTO getDebitCreditNoteAmount() {
        return debitCreditNoteAmount;
    }

    public void setDebitCreditNoteAmount(MoneyDTO debitCreditNoteAmount) {
        this.debitCreditNoteAmount = debitCreditNoteAmount;
    }

    public String getInvoiceReference() {
        return invoiceReference;
    }

    public void setInvoiceReference(String invoiceReference) {
        this.invoiceReference = invoiceReference;
    }

    public Date getDebitCreditNoteSettlementDate() {
        return debitCreditNoteSettlementDate;
    }

    public void setDebitCreditNoteSettlementDate(Date debitCreditNoteSettlementDate) {
        this.debitCreditNoteSettlementDate = debitCreditNoteSettlementDate;
    }

    public DealLegType getDealLegType() {
        return dealLegType;
    }

    public void setDealLegType(DealLegType dealLegType) {
        this.dealLegType = dealLegType;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTransactionType() {
        return transactionType;
    }

    public void setTransactionType(String transactionType) {
        this.transactionType = transactionType;
    }

    public BuySellDealType getBuySellDealType() {
        return buySellDealType;
    }

    public void setBuySellDealType(BuySellDealType buySellDealType) {
        this.buySellDealType = buySellDealType;
    }

    public MoneyDTO getLocalCurrencyAmount() {
        return localCurrencyAmount;
    }

    public void setLocalCurrencyAmount(MoneyDTO localCurrencyAmount) {
        this.localCurrencyAmount = localCurrencyAmount;
    }

    public Date getFecMaturityDate() {
        return fecMaturityDate;
    }

    public void setFecMaturityDate(Date fecMaturityDate) {
        this.fecMaturityDate = fecMaturityDate;
    }

    public MoneyDTO getGroupDealAmount() {
        return groupDealAmount;
    }

    public void setGroupDealAmount(MoneyDTO groupDealAmount) {
        this.groupDealAmount = groupDealAmount;
    }

    public MoneyDTO getTotalLinkedAmount() {
        return totalLinkedAmount;
    }

    public void setTotalLinkedAmount(MoneyDTO totalLinkedAmount) {
        this.totalLinkedAmount = totalLinkedAmount;
    }

    public MoneyDTO getLinkedRate() {
        return linkedRate;
    }

    public void setLinkedRate(MoneyDTO linkedRate) {
        this.linkedRate = linkedRate;
    }

    public MoneyDTO getLinkedCashFlow() {
        return linkedCashFlow;
    }

    public void setLinkedCashFlow(MoneyDTO linkedCashFlow) {
        this.linkedCashFlow = linkedCashFlow;
    }

    public MoneyDTO getCashFlow() {
        return cashFlow;
    }

    public void setCashFlow(MoneyDTO cashFlow) {
        this.cashFlow = cashFlow;
    }

    public MoneyDTO getUnlinkedAmount() {
        return unlinkedAmount;
    }

    public void setUnlinkedAmount(MoneyDTO unlinkedAmount) {
        this.unlinkedAmount = unlinkedAmount;
    }

    public boolean isCurrencySelected() {
        return currencySelected;
    }

    public void setCurrencySelected(boolean currencySelected) {
        this.currencySelected = currencySelected;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public List<AuditEventDTO> getAuditEventDTOs() {
        return auditEventDTOs;
    }

    public void setAuditEventDTOs(List<AuditEventDTO> auditEventDTOs) {
        this.auditEventDTOs = auditEventDTOs;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public MoneyDTO getFecRequestLinkedAmount() {
        return fecRequestLinkedAmount;
    }

    public void setFecRequestLinkedAmount(MoneyDTO fecRequestLinkedAmount) {
        this.fecRequestLinkedAmount = fecRequestLinkedAmount;
    }

    public MoneyDTO getFecLinkedAmount() {
        return fecLinkedAmount;
    }

    public void setFecLinkedAmount(MoneyDTO fecLinkedAmount) {
        this.fecLinkedAmount = fecLinkedAmount;
    }

    public List<FECDealLinkDTO> getFecDealLinkDTOs() {
        return fecDealLinkDTOs;
    }

    public void setFecDealLinkDTOs(List<FECDealLinkDTO> fecDealLinkDTOs) {
        this.fecDealLinkDTOs = fecDealLinkDTOs;
    }

    public List<FECRequestDealLinkDTO> getFecRequestDealLinkDTOs() {
        return fecRequestDealLinkDTOs;
    }

    public void setFecRequestDealLinkDTOs(List<FECRequestDealLinkDTO> fecRequestDealLinkDTOs) {
        this.fecRequestDealLinkDTOs = fecRequestDealLinkDTOs;
    }

    public String getParty() {
        return party;
    }

    public void setParty(String party) {
        this.party = party;
    }

    public String getBuyer() {
        return buyer;
    }

    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    public String getPaymentTerm() {
        return paymentTerm;
    }

    public void setPaymentTerm(String paymentTerm) {
        this.paymentTerm = paymentTerm;
    }

    public Date getShipmentDate() {
        return shipmentDate;
    }

    public void setShipmentDate(Date shipmentDate) {
        this.shipmentDate = shipmentDate;
    }

    public String getLogoPath() {
        return logoPath;
    }

    public void setLogoPath(String logoPath) {
        this.logoPath = logoPath;
    }

    public DefaultDTO getNominatedBank() {
        return nominatedBank;
    }

    public void setNominatedBank(DefaultDTO nominatedBank) {
        this.nominatedBank = nominatedBank;
    }

    public String getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }

    public String getSplitPaymentUnderLine(){
        if(paymentType!=null){
            if(paymentType.equalsIgnoreCase(SettlementSplitPaymentType.SPLIT_PAYMENT_TYPE_1.name())){
                return   "border-bottom: 2px dotted;text-decoration:none;";
            }
            if(paymentType.equalsIgnoreCase(SettlementSplitPaymentType.SPLIT_PAYMENT_TYPE_2.name())){
                return   "border-bottom: 2px dashed;text-decoration:none;";
            }
        }
        return  "";

    }

    public BigDecimal getOrderSettledAmount() {
        return orderSettledAmount;
    }

    public void setOrderSettledAmount(BigDecimal orderSettledAmount) {
        this.orderSettledAmount = orderSettledAmount;
    }

    public BigDecimal getBalanceOutstanding() {
        return balanceOutstanding;
    }

    public void setBalanceOutstanding(BigDecimal balanceOutstanding) {
        this.balanceOutstanding = balanceOutstanding;
    }

    public String getShipmentNumber() {
        return shipmentNumber;
    }

    public void setShipmentNumber(String shipmentNumber) {
        this.shipmentNumber = shipmentNumber;
    }

    public Date getShipmentBillDate() {
        return shipmentBillDate;
    }

    public void setShipmentBillDate(Date shipmentBillDate) {
        this.shipmentBillDate = shipmentBillDate;
    }

    public boolean isEarlyOrder() {
        return earlyOrder;
    }

    public void setEarlyOrder(boolean earlyOrder) {
        this.earlyOrder = earlyOrder;
    }

    @Override
    public String toString() {
        return "DealDTO{" +
                "maturityDate=" + maturityDate +
                ", estimatedSettlementDate=" + estimatedSettlementDate +
                ", settlementDate=" + settlementDate +
                ", dealDate=" + dealDate +
                ", invoicedDate=" + invoicedDate +
                ", expiryDate=" + expiryDate +
                ", spotRate=" + spotRate +
                ", forwardRate=" + forwardRate +
                ", amount=" + amount +
                ", status='" + status + '\'' +
                ", forexGroup=" + forexGroup +
                ", orderReference='" + orderReference + '\'' +
                ", dealLinkReference='" + dealLinkReference + '\'' +
                ", dealLegType=" + dealLegType +
                ", localCurrencyAmount=" + localCurrencyAmount +
                ", fecMaturityDate=" + fecMaturityDate +
                '}';
    }
}