Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package by.model.entity;
- import lombok.Data;
- import javax.persistence.*;
- import java.math.BigDecimal;
- import java.util.Date;
- @Entity(name = "TransferLog")
- @Table(name = "TRANSFER_LOG")
- @Data
- public class TransferLog {
- @Id
- @GeneratedValue(generator = "TRANSFER_LOG_SEQ", strategy = GenerationType.SEQUENCE)
- @SequenceGenerator(name = "TRANSFER_LOG_SEQ", sequenceName = "TRANSFER_LOG_SEQ", allocationSize = 1)
- @Column(name = "ID", updatable = false, nullable = false)
- private Long id;
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "TRANSACTION", updatable = false, nullable = false)
- private Date transaction;
- @Column(name = "ORDER_ID", length = 64)
- private String orderId;
- @Column(name = "AMOUNT", nullable = false)
- private BigDecimal amount;
- @Column(name = "CURRENCY", nullable = false)
- private Integer currency;
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "USER_ID", referencedColumnName = "ID", nullable = false)
- private UserInfo userInfo;
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "STATUS", referencedColumnName = "ID", nullable = false)
- private TransferStatus transferStatus;
- @Column(name = "PAN", length = 19)
- private String pan;
- @Column(name = "P2PPAN", length = 19)
- private String p2ppan;
- @Column(name = "EMAIL", length = 128)
- private String email;
- @Column(name = "APPROVALCODE", length = 6)
- private String approvalCode;
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "TRANSACTION_END")
- private Date transactionEnd;
- @Column(name = "COMMISSION")
- private BigDecimal commission;
- @Column(name = "TYPE_OF_TRANSFER")
- private String typeOfTransfer;
- @Column(name = "ERRORMESSAGE")
- private String errorMessage;
- @Column(name = "CARDHOLDERNAME")
- private String cardholderName;
- @Column(name = "SEND_EMAIL", nullable = false)
- private Integer sendEmail;
- @Override
- public boolean equals(Object obj) {
- if (obj == null)
- return false;
- if (!TransferLog.class.isAssignableFrom(obj.getClass()))
- return false;
- final TransferLog other = (TransferLog) obj;
- if ((this.id == null) ? (other.id != null) : !this.id.equals(other.id))
- return false;
- if ((this.transaction == null) ? (other.transaction != null) : !this.transaction.equals(other.transaction))
- return false;
- if ((this.orderId == null) ? (other.orderId != null) : !this.orderId.equals(other.orderId))
- return false;
- if ((this.amount == null) ? (other.amount != null) : !this.amount.equals(other.amount))
- return false;
- if ((this.currency == null) ? (other.currency != null) : !this.currency.equals(other.currency))
- return false;
- if ((this.pan == null) ? (other.pan != null) : !this.pan.equals(other.pan))
- return false;
- if ((this.p2ppan == null) ? (other.p2ppan != null) : !this.p2ppan.equals(other.p2ppan))
- return false;
- if ((this.email == null) ? (other.email != null) : !this.email.equals(other.email))
- return false;
- if ((this.approvalCode == null) ? (other.approvalCode != null) : !this.approvalCode.equals(other.approvalCode))
- return false;
- if ((this.transactionEnd == null) ? (other.transactionEnd != null) : !this.transactionEnd.equals(other.transactionEnd))
- return false;
- if ((this.commission == null) ? (other.commission != null) : !this.commission.equals(other.commission))
- return false;
- if ((this.typeOfTransfer == null) ? (other.typeOfTransfer != null) : !this.typeOfTransfer.equals(other.typeOfTransfer))
- return false;
- if ((this.errorMessage == null) ? (other.errorMessage != null) : !this.errorMessage.equals(other.errorMessage))
- return false;
- if ((this.cardholderName == null) ? (other.cardholderName != null) : !this.cardholderName.equals(other.cardholderName))
- return false;
- if ((this.sendEmail == null) ? (other.sendEmail != null) : !this.sendEmail.equals(other.sendEmail))
- return false;
- return true;
- }
- @Override
- public int hashCode() {
- int hash = 3;
- hash = 53 * hash + (this.id != null ? this.id.hashCode() : 0);
- hash = 53 * hash + (this.transaction != null ? this.transaction.hashCode() : 0);
- hash = 53 * hash + (this.orderId != null ? this.orderId.hashCode() : 0);
- hash = 53 * hash + (this.amount != null ? this.amount.hashCode() : 0);
- hash = 53 * hash + (this.currency != null ? this.currency.hashCode() : 0);
- hash = 53 * hash + (this.pan != null ? this.pan.hashCode() : 0);
- hash = 53 * hash + (this.p2ppan != null ? this.p2ppan.hashCode() : 0);
- hash = 53 * hash + (this.email != null ? this.email.hashCode() : 0);
- hash = 53 * hash + (this.approvalCode != null ? this.approvalCode.hashCode() : 0);
- hash = 53 * hash + (this.transactionEnd != null ? this.transactionEnd.hashCode() : 0);
- hash = 53 * hash + (this.commission != null ? this.commission.hashCode() : 0);
- hash = 53 * hash + (this.typeOfTransfer != null ? this.typeOfTransfer.hashCode() : 0);
- hash = 53 * hash + (this.errorMessage != null ? this.errorMessage.hashCode() : 0);
- hash = 53 * hash + (this.cardholderName != null ? this.cardholderName.hashCode() : 0);
- hash = 53 * hash + (this.sendEmail != null ? this.sendEmail.hashCode() : 0);
- return hash;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement