FECRequestDTO.java
package com.tradecloud.dto.treasury;
import com.tradecloud.domain.model.deal.BuySellDealType;
import com.tradecloud.domain.model.fecrequest.FECRequestStatusType;
import java.util.Date;
import java.util.List;
/**
* Created by ds on 10/6/14.
*/
public class FECRequestDTO extends BaseDTO{
private MoneyDTO amount=new MoneyDTO();
private Date maturityDate;
private FECRequestStatusType status;
private DefaultDTO organisationalUnit;
private DefaultDTO forexGroup;
//todo use BuySellIndicator
private BuySellDealType buySellDealType;
private List<AuditEventDTO> auditEventDTOs;
private List<FECRequestDealLinkDTO> fecRequestDealLinkDTOs;
public MoneyDTO getAmount() {
return amount;
}
public void setAmount(MoneyDTO amount) {
this.amount = amount;
}
public Date getMaturityDate() {
return maturityDate;
}
public void setMaturityDate(Date maturityDate) {
this.maturityDate = maturityDate;
}
public FECRequestStatusType getStatus() {
return status;
}
public void setStatus(FECRequestStatusType 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 BuySellDealType getBuySellDealType() {
return buySellDealType;
}
public void setBuySellDealType(BuySellDealType buySellDealType) {
this.buySellDealType = buySellDealType;
}
public List<AuditEventDTO> getAuditEventDTOs() {
return auditEventDTOs;
}
public void setAuditEventDTOs(List<AuditEventDTO> auditEventDTOs) {
this.auditEventDTOs = auditEventDTOs;
}
public List<FECRequestDealLinkDTO> getFecRequestDealLinkDTOs() {
return fecRequestDealLinkDTOs;
}
public void setFecRequestDealLinkDTOs(List<FECRequestDealLinkDTO> fecRequestDealLinkDTOs) {
this.fecRequestDealLinkDTOs = fecRequestDealLinkDTOs;
}
@Override
public String toString() {
return "FECRequestDTO{" +
"amount=" + amount +
", maturityDate=" + maturityDate +
", status=" + status +
", organisationalUnit=" + organisationalUnit +
", forexGroup=" + forexGroup +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FECRequestDTO)) return false;
FECRequestDTO that = (FECRequestDTO) o;
if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false;
if (forexGroup != null ? !forexGroup.equals(that.forexGroup) : that.forexGroup != null) return false;
if (maturityDate != null ? !maturityDate.equals(that.maturityDate) : that.maturityDate != null) return false;
if (organisationalUnit != null ? !organisationalUnit.equals(that.organisationalUnit) : that.organisationalUnit != null) return false;
if (status != that.status) return false;
return true;
}
@Override
public int hashCode() {
int result = amount != null ? amount.hashCode() : 0;
result = 31 * result + (maturityDate != null ? maturityDate.hashCode() : 0);
result = 31 * result + (status != null ? status.hashCode() : 0);
result = 31 * result + (organisationalUnit != null ? organisationalUnit.hashCode() : 0);
result = 31 * result + (forexGroup != null ? forexGroup.hashCode() : 0);
return result;
}
}