Subversion Repositories SmartDukaan

Rev

Rev 34183 | 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.fofo;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author amit
 *
 */
@Entity
@Table(name = "transaction.loan_transaction")
public class LoanTransaction implements Serializable {

        @Id
        @Column(name = "id", unique = true, updatable = false)
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private Integer id;

        @Column(name = "loan_id")
        private int loanId;

        @Column(name = "transaction_id")
        private int transactionId;

        public Integer getId() {
                return id;
        }

        public void setId(Integer id) {
                this.id = id;
        }

        public int getLoanId() {
                return loanId;
        }

        public void setLoanId(int loanId) {
                this.loanId = loanId;
        }

        public int getTransactionId() {
                return transactionId;
        }

        public void setTransactionId(int transactionId) {
                this.transactionId = transactionId;
        }

        @Override
        public String toString() {
                return "LoanTransaction{" +
                                "id=" + id +
                                ", loanId=" + loanId +
                                ", transactionId=" + transactionId +
                                '}';
        }

        @Override
        public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                LoanTransaction that = (LoanTransaction) o;
                return loanId == that.loanId && transactionId == that.transactionId && Objects.equals(id, that.id);
        }

        @Override
        public int hashCode() {
                return Objects.hash(id, loanId, transactionId);
        }
}