DealSearchDTO.java
package com.tradecloud.dto.treasury;
import com.tradecloud.domain.base.utils.DateRange;
import com.tradecloud.domain.common.Currency;
import com.tradecloud.domain.dto.base.SearchBase;
import com.tradecloud.domain.model.deal.SortBy;
import com.tradecloud.domain.model.deal.BuySellDealType;
import com.tradecloud.domain.model.deal.DealTransactionType;
import java.io.Serializable;
import java.util.Objects;
/**
* Created by ds on 10/1/14.
*/
public class DealSearchDTO extends SearchBase implements Serializable {
private DefaultDTO organisationalUnit;
private String status;
private DefaultDTO forexGroup;
private DefaultDTO nominatedBank;
private String orderReference;
private String dealLinkReference;
private String shippingReference;
private SortBy sortBy;
private DateRange dealDate= new DateRange();
private DateRange estimateSettlementDate = new DateRange();
private DateRange invoiceDate= new DateRange();
private DateRange settlementDate= new DateRange();
private DateRange maturityDate= new DateRange();
private Currency currency;
private String purpose;
private String linked;
private String supplier;
private String buyer;
private BuySellDealType buySellDealType;
private DealTransactionType transactionType;
private String source;
private boolean showAllAssociatedDeals;
private boolean selectAll=false;
private DateRange billOfLadingDate= new DateRange();
private String shipmentNumber;
private Boolean includeEarlyOrders;
public DefaultDTO getOrganisationalUnit() {
return organisationalUnit;
}
public void setOrganisationalUnit(DefaultDTO organisationalUnit) {
this.organisationalUnit = organisationalUnit;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
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 SortBy getSortBy() {
return sortBy;
}
public void setSortBy(SortBy sortBy) {
this.sortBy = sortBy;
}
public DateRange getDealDate() {
return dealDate;
}
public void setDealDate(DateRange dealDate) {
this.dealDate = dealDate;
}
public DateRange getEstimateSettlementDate() {
return estimateSettlementDate;
}
public void setEstimateSettlementDate(DateRange estimateSettlementDate) {
this.estimateSettlementDate = estimateSettlementDate;
}
public DateRange getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(DateRange invoiceDate) {
this.invoiceDate = invoiceDate;
}
public DateRange getSettlementDate() {
return settlementDate;
}
public void setSettlementDate(DateRange settlementDate) {
this.settlementDate = settlementDate;
}
public DateRange getMaturityDate() {
return maturityDate;
}
public void setMaturityDate(DateRange maturityDate) {
this.maturityDate = maturityDate;
}
public Currency getCurrency() {
return currency;
}
public void setCurrency(Currency currency) {
this.currency = currency;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
public String getLinked() {
return linked;
}
public void setLinked(String linked) {
this.linked = linked;
}
public String getSupplier() {
return supplier;
}
public void setSupplier(String supplier) {
this.supplier = supplier;
}
public BuySellDealType getBuySellDealType() {
return buySellDealType;
}
public void setBuySellDealType(BuySellDealType buySellDealType) {
this.buySellDealType = buySellDealType;
}
public DealTransactionType getTransactionType() {
return transactionType;
}
public void setTransactionType(DealTransactionType transactionType) {
this.transactionType = transactionType;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public boolean isShowAllAssociatedDeals() {
return showAllAssociatedDeals;
}
public void setShowAllAssociatedDeals(boolean showAllAssociatedDeals) {
this.showAllAssociatedDeals = showAllAssociatedDeals;
}
public boolean isSelectAll() {
return selectAll;
}
public void setSelectAll(boolean selectAll) {
this.selectAll = selectAll;
}
public String getBuyer() {
return buyer;
}
public void setBuyer(String buyer) {
this.buyer = buyer;
}
public DefaultDTO getNominatedBank() {
return nominatedBank;
}
public void setNominatedBank(DefaultDTO nominatedBank) {
this.nominatedBank = nominatedBank;
}
@Override
public String getTableName() {
return "deal";
}
public DateRange getBillOfLadingDate() {
return billOfLadingDate;
}
public void setBillOfLadingDate(DateRange billOfLadingDate) {
this.billOfLadingDate = billOfLadingDate;
}
public String getShipmentNumber() {
return shipmentNumber;
}
public void setShipmentNumber(String shipmentNumber) {
this.shipmentNumber = shipmentNumber;
}
public Boolean getIncludeEarlyOrders() {
return includeEarlyOrders;
}
public void setIncludeEarlyOrders(Boolean includeEarlyOrders) {
this.includeEarlyOrders = includeEarlyOrders;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DealSearchDTO that = (DealSearchDTO) o;
return showAllAssociatedDeals == that.showAllAssociatedDeals &&
selectAll == that.selectAll &&
Objects.equals(organisationalUnit, that.organisationalUnit) &&
Objects.equals(status, that.status) &&
Objects.equals(forexGroup, that.forexGroup) &&
Objects.equals(nominatedBank, that.nominatedBank) &&
Objects.equals(orderReference, that.orderReference) &&
Objects.equals(dealLinkReference, that.dealLinkReference) &&
Objects.equals(shipmentNumber, that.shipmentNumber) &&
Objects.equals(shippingReference, that.shippingReference) &&
sortBy == that.sortBy &&
Objects.equals(dealDate, that.dealDate) &&
Objects.equals(estimateSettlementDate, that.estimateSettlementDate) &&
Objects.equals(invoiceDate, that.invoiceDate) &&
Objects.equals(settlementDate, that.settlementDate) &&
Objects.equals(maturityDate, that.maturityDate) &&
Objects.equals(billOfLadingDate, that.billOfLadingDate) &&
Objects.equals(currency, that.currency) &&
Objects.equals(purpose, that.purpose) &&
Objects.equals(linked, that.linked) &&
Objects.equals(supplier, that.supplier) &&
Objects.equals(buyer, that.buyer) &&
buySellDealType == that.buySellDealType &&
transactionType == that.transactionType &&
Objects.equals(source, that.source);
}
@Override
public int hashCode() {
return Objects.hash(organisationalUnit, status, forexGroup, nominatedBank, orderReference, dealLinkReference, shippingReference,
sortBy, dealDate, estimateSettlementDate, invoiceDate, settlementDate, maturityDate, currency, purpose, linked, supplier,
buyer, buySellDealType, transactionType, source, showAllAssociatedDeals, selectAll,billOfLadingDate,shipmentNumber);
}
@Override
public String toString() {
return "DealSearchDTO{" +
"organisationalUnit=" + organisationalUnit +
", status='" + status + '\'' +
", forexGroup=" + forexGroup +
", orderReference='" + orderReference + '\'' +
", dealLinkReference='" + dealLinkReference + '\'' +
", shippingReference='" + shippingReference + '\'' +
", sortBy=" + sortBy +
", dealDate=" + dealDate +
", estimateSettlementDate=" + estimateSettlementDate +
", invoiceDate=" + invoiceDate +
", settlementDate=" + settlementDate +
", maturityDate=" + maturityDate +
", currency=" + currency +
", purpose='" + purpose + '\'' +
", linked='" + linked + '\'' +
", supplier='" + supplier + '\'' +
", buyer='" + buyer + '\'' +
", buySellDealType=" + buySellDealType +
", transactionType=" + transactionType +
", source='" + source + '\'' +
", showAllAssociatedDeals=" + showAllAssociatedDeals +
", selectAll=" + selectAll +
", nominated="+nominatedBank+
'}';
}
}