ReportSearchDTO.java
package com.tradecloud.dto.treasury;
import com.tradecloud.domain.base.utils.DateRange;
import com.tradecloud.domain.helper.ReportFormat;
/**
*For now we will just use this DTO for all reports.
* Created by ds on 10/29/14.
*/
public class ReportSearchDTO {
private String shipmentReference;
private DefaultDTO forexGroup;
private ReportFormat reportFormat;
private DefaultDTO organisationalUnit;
//for currency
private MoneyDTO amount = new MoneyDTO();
private String status;
private DateRange maturityDate= new DateRange();
private DateRange estimateSettlementDate = new DateRange();
private String bankReference;
private String orderReference;
private String internalReference;
private String shippingReference;
private DateRange dealDate= new DateRange();
private DateRange shipmentBillOfLadingDate= new DateRange();
private String linked;
public String getShipmentReference() {
return shipmentReference;
}
public void setShipmentReference(String shipmentReference) {
this.shipmentReference = shipmentReference;
}
public DefaultDTO getForexGroup() {
return forexGroup;
}
public void setForexGroup(DefaultDTO forexGroup) {
this.forexGroup = forexGroup;
}
public ReportFormat getReportFormat() {
return reportFormat;
}
public void setReportFormat(ReportFormat reportFormat) {
this.reportFormat = reportFormat;
}
public DefaultDTO getOrganisationalUnit() {
return organisationalUnit;
}
public void setOrganisationalUnit(DefaultDTO organisationalUnit) {
this.organisationalUnit = organisationalUnit;
}
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 DateRange getMaturityDate() {
return maturityDate;
}
public void setMaturityDate(DateRange maturityDate) {
this.maturityDate = maturityDate;
}
public String getBankReference() {
return bankReference;
}
public void setBankReference(String bankReference) {
this.bankReference = bankReference;
}
public DateRange getEstimateSettlementDate() {
return estimateSettlementDate;
}
public void setEstimateSettlementDate(DateRange estimateSettlementDate) {
this.estimateSettlementDate = estimateSettlementDate;
}
public String getOrderReference() {
return orderReference;
}
public void setOrderReference(String orderReference) {
this.orderReference = orderReference;
}
public String getInternalReference() {
return internalReference;
}
public void setInternalReference(String internalReference) {
this.internalReference = internalReference;
}
public DateRange getDealDate() {
return dealDate;
}
public void setDealDate(DateRange dealDate) {
this.dealDate = dealDate;
}
public String getLinked() {
return linked;
}
public void setLinked(String linked) {
this.linked = linked;
}
public String getShippingReference() {
return shippingReference;
}
public void setShippingReference(String shippingReference) {
this.shippingReference = shippingReference;
}
public DateRange getShipmentBillOfLadingDate() {
return shipmentBillOfLadingDate;
}
public void setShipmentBillOfLadingDate(DateRange shipmentBillOfLadingDate) {
this.shipmentBillOfLadingDate = shipmentBillOfLadingDate;
}
@Override
public String toString() {
return "ReportSearchDTO{" +
"shipmentReference='" + shipmentReference + '\'' +
", forexGroup=" + forexGroup +
", reportFormat=" + reportFormat +
", organisationalUnit=" + organisationalUnit +
", amount=" + amount +
", status='" + status + '\'' +
", maturityDate=" + maturityDate +
", estimateSettlementDate=" + estimateSettlementDate +
", bankReference='" + bankReference + '\'' +
", orderReference='" + orderReference + '\'' +
", internalReference='" + internalReference + '\'' +
", shippingReference='" + shippingReference + '\'' +
", dealDate=" + dealDate +
", linked='" + linked + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ReportSearchDTO)) return false;
ReportSearchDTO that = (ReportSearchDTO) o;
if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false;
if (bankReference != null ? !bankReference.equals(that.bankReference) : that.bankReference != null) return false;
if (dealDate != null ? !dealDate.equals(that.dealDate) : that.dealDate != null) return false;
if (estimateSettlementDate != null ? !estimateSettlementDate.equals(that.estimateSettlementDate) : that.estimateSettlementDate != null)
return false;
if (forexGroup != null ? !forexGroup.equals(that.forexGroup) : that.forexGroup != null) return false;
if (internalReference != null ? !internalReference.equals(that.internalReference) : that.internalReference != null) return false;
if (maturityDate != null ? !maturityDate.equals(that.maturityDate) : that.maturityDate != null) return false;
if (orderReference != null ? !orderReference.equals(that.orderReference) : that.orderReference != null) return false;
if (organisationalUnit != null ? !organisationalUnit.equals(that.organisationalUnit) : that.organisationalUnit != null) return false;
if (reportFormat != that.reportFormat) return false;
if (shipmentReference != null ? !shipmentReference.equals(that.shipmentReference) : that.shipmentReference != null) return false;
if (status != null ? !status.equals(that.status) : that.status != null) return false;
return true;
}
@Override
public int hashCode() {
int result = shipmentReference != null ? shipmentReference.hashCode() : 0;
result = 31 * result + (forexGroup != null ? forexGroup.hashCode() : 0);
result = 31 * result + (reportFormat != null ? reportFormat.hashCode() : 0);
result = 31 * result + (organisationalUnit != null ? organisationalUnit.hashCode() : 0);
result = 31 * result + (amount != null ? amount.hashCode() : 0);
result = 31 * result + (status != null ? status.hashCode() : 0);
result = 31 * result + (maturityDate != null ? maturityDate.hashCode() : 0);
result = 31 * result + (estimateSettlementDate != null ? estimateSettlementDate.hashCode() : 0);
result = 31 * result + (bankReference != null ? bankReference.hashCode() : 0);
result = 31 * result + (orderReference != null ? orderReference.hashCode() : 0);
result = 31 * result + (internalReference != null ? internalReference.hashCode() : 0);
result = 31 * result + (dealDate != null ? dealDate.hashCode() : 0);
return result;
}
}