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.transaction;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;@Entity@Table(name="payment.payment", schema = "payment")public class Payment {@Id@Column(name = "id", unique = true, updatable = false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Columnprivate int gatewayId;@Columnprivate String gatewayPaymentId;@Columnprivate int merchantTxnId;@Columnprivate String gatewayTxnId;@Columnprivate double amount;@Columnprivate String gatewayTxnStatus;@Columnprivate int status;@Columnprivate int userId;@Columnprivate String errorCode;@Columnprivate String description;@Columnprivate String authCode;@Columnprivate String referenceCode;@Columnprivate String sessionId;@Columnprivate LocalDateTime gatewayTxnDate;@Columnprivate LocalDateTime initTimestamp;@Columnprivate LocalDateTime successTimestamp;@Columnprivate LocalDateTime errorTimestamp;@Columnprivate LocalDateTime provisionalCaptureTimestamp;@Columnprivate boolean isDigital;@Columnprivate float refundAmount;@Overridepublic String toString() {return "Payment [id=" + id + ", gatewayId=" + gatewayId + ", gatewayPaymentId=" + gatewayPaymentId+ ", merchantTxnId=" + merchantTxnId + ", gatewayTxnId=" + gatewayTxnId + ", amount=" + amount+ ", gatewayTxnStatus=" + gatewayTxnStatus + ", status=" + status + ", userId=" + userId+ ", errorCode=" + errorCode + ", description=" + description + ", authCode=" + authCode+ ", referenceCode=" + referenceCode + ", sessionId=" + sessionId + ", gatewayTxnDate=" + gatewayTxnDate+ ", initTimestamp=" + initTimestamp + ", successTimestamp=" + successTimestamp + ", errorTimestamp="+ errorTimestamp + ", provisionalCaptureTimestamp=" + provisionalCaptureTimestamp + ", isDigital="+ isDigital + ", refundAmount=" + refundAmount + "]";}public int getId() {return id;}public void setId(int id) {this.id = id;}public int getGatewayId() {return gatewayId;}public void setGatewayId(int gatewayId) {this.gatewayId = gatewayId;}public String getGatewayPaymentId() {return gatewayPaymentId;}public void setGatewayPaymentId(String gatewayPaymentId) {this.gatewayPaymentId = gatewayPaymentId;}public int getMerchantTxnId() {return merchantTxnId;}public void setMerchantTxnId(int merchantTxnId) {this.merchantTxnId = merchantTxnId;}public String getGatewayTxnId() {return gatewayTxnId;}public void setGatewayTxnId(String gatewayTxnId) {this.gatewayTxnId = gatewayTxnId;}public double getAmount() {return amount;}public void setAmount(double amount) {this.amount = amount;}public String getGatewayTxnStatus() {return gatewayTxnStatus;}public void setGatewayTxnStatus(String gatewayTxnStatus) {this.gatewayTxnStatus = gatewayTxnStatus;}public int getStatus() {return status;}public void setStatus(int status) {this.status = status;}public int getUserId() {return userId;}public void setUserId(int userId) {this.userId = userId;}public String getErrorCode() {return errorCode;}public void setErrorCode(String errorCode) {this.errorCode = errorCode;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public String getAuthCode() {return authCode;}public void setAuthCode(String authCode) {this.authCode = authCode;}public String getReferenceCode() {return referenceCode;}public void setReferenceCode(String referenceCode) {this.referenceCode = referenceCode;}public String getSessionId() {return sessionId;}public void setSessionId(String sessionId) {this.sessionId = sessionId;}public LocalDateTime getGatewayTxnDate() {return gatewayTxnDate;}public void setGatewayTxnDate(LocalDateTime gatewayTxnDate) {this.gatewayTxnDate = gatewayTxnDate;}public LocalDateTime getInitTimestamp() {return initTimestamp;}public void setInitTimestamp(LocalDateTime initTimestamp) {this.initTimestamp = initTimestamp;}public LocalDateTime getSuccessTimestamp() {return successTimestamp;}public void setSuccessTimestamp(LocalDateTime successTimestamp) {this.successTimestamp = successTimestamp;}public LocalDateTime getErrorTimestamp() {return errorTimestamp;}public void setErrorTimestamp(LocalDateTime errorTimestamp) {this.errorTimestamp = errorTimestamp;}public LocalDateTime getProvisionalCaptureTimestamp() {return provisionalCaptureTimestamp;}public void setProvisionalCaptureTimestamp(LocalDateTime provisionalCaptureTimestamp) {this.provisionalCaptureTimestamp = provisionalCaptureTimestamp;}public boolean isDigital() {return isDigital;}public void setDigital(boolean isDigital) {this.isDigital = isDigital;}public float getRefundAmount() {return refundAmount;}public void setRefundAmount(float refundAmount) {this.refundAmount = refundAmount;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;long temp;temp = Double.doubleToLongBits(amount);result = prime * result + (int) (temp ^ (temp >>> 32));result = prime * result + ((authCode == null) ? 0 : authCode.hashCode());result = prime * result + ((description == null) ? 0 : description.hashCode());result = prime * result + ((errorCode == null) ? 0 : errorCode.hashCode());result = prime * result + ((errorTimestamp == null) ? 0 : errorTimestamp.hashCode());result = prime * result + gatewayId;result = prime * result + ((gatewayPaymentId == null) ? 0 : gatewayPaymentId.hashCode());result = prime * result + ((gatewayTxnDate == null) ? 0 : gatewayTxnDate.hashCode());result = prime * result + ((gatewayTxnId == null) ? 0 : gatewayTxnId.hashCode());result = prime * result + ((gatewayTxnStatus == null) ? 0 : gatewayTxnStatus.hashCode());result = prime * result + id;result = prime * result + ((initTimestamp == null) ? 0 : initTimestamp.hashCode());result = prime * result + (isDigital ? 1231 : 1237);result = prime * result + merchantTxnId;result = prime * result + ((provisionalCaptureTimestamp == null) ? 0 : provisionalCaptureTimestamp.hashCode());result = prime * result + ((referenceCode == null) ? 0 : referenceCode.hashCode());result = prime * result + Float.floatToIntBits(refundAmount);result = prime * result + ((sessionId == null) ? 0 : sessionId.hashCode());result = prime * result + status;result = prime * result + ((successTimestamp == null) ? 0 : successTimestamp.hashCode());result = prime * result + userId;return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;Payment other = (Payment) obj;if (Double.doubleToLongBits(amount) != Double.doubleToLongBits(other.amount))return false;if (authCode == null) {if (other.authCode != null)return false;} else if (!authCode.equals(other.authCode))return false;if (description == null) {if (other.description != null)return false;} else if (!description.equals(other.description))return false;if (errorCode == null) {if (other.errorCode != null)return false;} else if (!errorCode.equals(other.errorCode))return false;if (errorTimestamp == null) {if (other.errorTimestamp != null)return false;} else if (!errorTimestamp.equals(other.errorTimestamp))return false;if (gatewayId != other.gatewayId)return false;if (gatewayPaymentId == null) {if (other.gatewayPaymentId != null)return false;} else if (!gatewayPaymentId.equals(other.gatewayPaymentId))return false;if (gatewayTxnDate == null) {if (other.gatewayTxnDate != null)return false;} else if (!gatewayTxnDate.equals(other.gatewayTxnDate))return false;if (gatewayTxnId == null) {if (other.gatewayTxnId != null)return false;} else if (!gatewayTxnId.equals(other.gatewayTxnId))return false;if (gatewayTxnStatus == null) {if (other.gatewayTxnStatus != null)return false;} else if (!gatewayTxnStatus.equals(other.gatewayTxnStatus))return false;if (id != other.id)return false;if (initTimestamp == null) {if (other.initTimestamp != null)return false;} else if (!initTimestamp.equals(other.initTimestamp))return false;if (isDigital != other.isDigital)return false;if (merchantTxnId != other.merchantTxnId)return false;if (provisionalCaptureTimestamp == null) {if (other.provisionalCaptureTimestamp != null)return false;} else if (!provisionalCaptureTimestamp.equals(other.provisionalCaptureTimestamp))return false;if (referenceCode == null) {if (other.referenceCode != null)return false;} else if (!referenceCode.equals(other.referenceCode))return false;if (Float.floatToIntBits(refundAmount) != Float.floatToIntBits(other.refundAmount))return false;if (sessionId == null) {if (other.sessionId != null)return false;} else if (!sessionId.equals(other.sessionId))return false;if (status != other.status)return false;if (successTimestamp == null) {if (other.successTimestamp != null)return false;} else if (!successTimestamp.equals(other.successTimestamp))return false;if (userId != other.userId)return false;return true;}}