Rev 29811 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.dtr;import java.io.Serializable;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.EnumType;import javax.persistence.Enumerated;import javax.persistence.Id;import javax.persistence.Table;import com.spice.profitmandi.dao.enumuration.fofo.Gateway;@Entity@Table(name="dtr.credit_account", schema = "dtr")public class CreditAccount implements Serializable{private static final long serialVersionUID = 1L;@Id@Column(name="fofo_id", unique=true, updatable=false)private int fofoId;@Id@Enumerated(EnumType.STRING)private Gateway gateway;@Columnprivate float sanctionedAmount;@Columnprivate float availableAmount;@Columnprivate float interestRate;@Column@Enumerated(EnumType.STRING)private CreditStatus creditStatus;@ColumnLocalDateTime updatedOn;public CreditStatus getCreditStatus() {return creditStatus;}public void setCreditStatus(CreditStatus creditStatus) {this.creditStatus = creditStatus;}public LocalDateTime getUpdatedOn() {return updatedOn;}public void setUpdatedOn(LocalDateTime updatedOn) {this.updatedOn = updatedOn;}@Overridepublic String toString() {return "CreditAccount [fofoId=" + fofoId + ", gateway=" + gateway + ", sanctionedAmount=" + sanctionedAmount+ ", availableAmount=" + availableAmount + ", interestRate=" + interestRate + ", creditStatus="+ creditStatus + ", updatedOn=" + updatedOn + "]";}public int getFofoId() {return fofoId;}public void setFofoId(int fofoId) {this.fofoId = fofoId;}public Gateway getGateway() {return gateway;}public void setGateway(Gateway gateway) {this.gateway = gateway;}public float getSanctionedAmount() {return sanctionedAmount;}public void setSanctionedAmount(float sanctionedAmount) {this.sanctionedAmount = sanctionedAmount;}public float getAvailableAmount() {return availableAmount;}public void setAvailableAmount(float availableAmount) {this.availableAmount = availableAmount;}public float getInterestRate() {return interestRate;}public void setInterestRate(float interestRate) {this.interestRate = interestRate;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + Float.floatToIntBits(availableAmount);result = prime * result + ((creditStatus == null) ? 0 : creditStatus.hashCode());result = prime * result + fofoId;result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());result = prime * result + Float.floatToIntBits(interestRate);result = prime * result + Float.floatToIntBits(sanctionedAmount);result = prime * result + ((updatedOn == null) ? 0 : updatedOn.hashCode());return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;CreditAccount other = (CreditAccount) obj;if (Float.floatToIntBits(availableAmount) != Float.floatToIntBits(other.availableAmount))return false;if (creditStatus != other.creditStatus)return false;if (fofoId != other.fofoId)return false;if (gateway != other.gateway)return false;if (Float.floatToIntBits(interestRate) != Float.floatToIntBits(other.interestRate))return false;if (Float.floatToIntBits(sanctionedAmount) != Float.floatToIntBits(other.sanctionedAmount))return false;if (updatedOn == null) {if (other.updatedOn != null)return false;} else if (!updatedOn.equals(other.updatedOn))return false;return true;}}