Rev 30219 | 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.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;import javax.persistence.Transient;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 = "id", unique = true, updatable = false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;public int getId() {return id;}public void setId(int id) {this.id = id;}@Column(name = "fofo_id", unique = true, updatable = false)private int fofoId;@Enumerated(EnumType.STRING)private Gateway gateway;@Columnprivate float sanctionedAmount;@Columnprivate float availableAmount;@Columnprivate float interestRate;@Columnprivate int freeDays;@Column@Enumerated(EnumType.STRING)private CreditStatus creditStatus;@ColumnLocalDateTime updatedOn;@Columnprivate boolean active;@Columnprivate String description;@Column(name = "loan_reference_id")private String loanReferenceId;@Transientprivate LocalDateTime expiredOn;@Transientprivate String processingFee;public int getFreeDays() {return freeDays;}public void setFreeDays(int freeDays) {this.freeDays = freeDays;}public String getProcessingFee() {return processingFee;}public void setProcessingFee(String processingFee) {this.processingFee = processingFee;}public String getLoanReferenceId() {return loanReferenceId;}public LocalDateTime getExpiredOn() {return expiredOn;}public void setExpiredOn(LocalDateTime expiredOn) {this.expiredOn = expiredOn;}public void setLoanReferenceId(String loanReferenceId) {this.loanReferenceId = loanReferenceId;}public boolean isActive() {return active;}public void setActive(boolean active) {this.active = active;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}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;}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 + (active ? 1231 : 1237);result = prime * result + Float.floatToIntBits(availableAmount);result = prime * result + ((creditStatus == null) ? 0 : creditStatus.hashCode());result = prime * result + ((description == null) ? 0 : description.hashCode());result = prime * result + fofoId;result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());result = prime * result + id;result = prime * result + Float.floatToIntBits(interestRate);result = prime * result + ((loanReferenceId == null) ? 0 : loanReferenceId.hashCode());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 (active != other.active)return false;if (Float.floatToIntBits(availableAmount) != Float.floatToIntBits(other.availableAmount))return false;if (creditStatus != other.creditStatus)return false;if (description == null) {if (other.description != null)return false;} else if (!description.equals(other.description))return false;if (fofoId != other.fofoId)return false;if (gateway != other.gateway)return false;if (id != other.id)return false;if (Float.floatToIntBits(interestRate) != Float.floatToIntBits(other.interestRate))return false;if (loanReferenceId == null) {if (other.loanReferenceId != null)return false;} else if (!loanReferenceId.equals(other.loanReferenceId))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;}@Overridepublic String toString() {return "CreditAccount [id=" + id + ", fofoId=" + fofoId + ", gateway=" + gateway + ", sanctionedAmount="+ sanctionedAmount + ", availableAmount=" + availableAmount + ", interestRate=" + interestRate+ ", creditStatus=" + creditStatus + ", updatedOn=" + updatedOn + ", active=" + active+ ", description=" + description + ", loanReferenceId=" + loanReferenceId + "]";}}