BankTransactionLimit.java
package com.tradecloud.domain;
import com.tradecloud.domain.party.Bank;
import javax.xml.bind.annotation.XmlTransient;
/**
* BankTransactionLimit generated by hbm2java.
*/
@XmlTransient
public class BankTransactionLimit implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private Bank bank;
private String currencyCode;
private boolean buy;
private double limit;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Bank getBank() {
return bank;
}
public void setBank(Bank bank) {
this.bank = bank;
}
public boolean isBuy() {
return buy;
}
public void setBuy(boolean buy) {
this.buy = buy;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public double getLimit() {
return limit;
}
public void setLimit(double limit) {
this.limit = limit;
}
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof BankTransactionLimit))
return false;
BankTransactionLimit other = (BankTransactionLimit) obj;
Bank thisBank = getBank();
Bank otherBank = other.getBank();
if (thisBank != otherBank && (thisBank == null || otherBank == null))
return false; // only one is null
if (thisBank != null && !thisBank.equals(otherBank))
return false;
String thisCurrency = getCurrencyCode();
String otherCurrency = other.getCurrencyCode();
if (thisCurrency != otherCurrency && (thisCurrency == null || otherCurrency == null))
return false; // only one is null
if (thisCurrency != null && !thisCurrency.equals(otherCurrency))
return false;
return isBuy() == other.isBuy();
}
public int hashCode() {
return getCurrencyCode() == null ? 0 : getCurrencyCode().hashCode(); // should
// be
// good
// enough
}
}