package com.rhc.mortgage.domain;
import java.math.BigDecimal;
public class Application {
private BigDecimal amount;
private Long customerId;
private Boolean reviewed = false;
private Boolean approved;
private Long applicationId;
private Boolean valid = true;
public Application(BigDecimal amount, Long customerId, Long applicationId) {
this.amount = amount;
this.customerId = customerId;
this.applicationId = applicationId;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Boolean getReviewed() {
return reviewed;
}
public void setReviewed(Boolean reviewed) {
this.reviewed = reviewed;
}
public Boolean getApproved() {
return approved;
}
public void setApproved(Boolean approved) {
this.approved = approved;
}
public Long getApplicationId() {
return applicationId;
}
public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}
public Boolean getValid() {
return valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
@Override
public String toString() {
return "Application [amount=" + amount + ", customerId=" + customerId + ", reviewed=" + reviewed + ", approved=" + approved
+ ", applicationId=" + applicationId + ", valid=" + valid + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((amount == null) ? 0 : amount.hashCode());
result = prime * result
+ ((applicationId == null) ? 0 : applicationId.hashCode());
result = prime * result
+ ((approved == null) ? 0 : approved.hashCode());
result = prime * result
+ ((customerId == null) ? 0 : customerId.hashCode());
result = prime * result
+ ((reviewed == null) ? 0 : reviewed.hashCode());
result = prime * result + ((valid == null) ? 0 : valid.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Application other = (Application) obj;
if (amount == null) {
if (other.amount != null)
return false;
} else if (!amount.equals(other.amount))
return false;
if (applicationId == null) {
if (other.applicationId != null)
return false;
} else if (!applicationId.equals(other.applicationId))
return false;
if (approved == null) {
if (other.approved != null)
return false;
} else if (!approved.equals(other.approved))
return false;
if (customerId == null) {
if (other.customerId != null)
return false;
} else if (!customerId.equals(other.customerId))
return false;
if (reviewed == null) {
if (other.reviewed != null)
return false;
} else if (!reviewed.equals(other.reviewed))
return false;
if (valid == null) {
if (other.valid != null)
return false;
} else if (!valid.equals(other.valid))
return false;
return true;
}
}