Rev 26629 | Rev 26924 | 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 java.io.Serializable;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Convert;import javax.persistence.Entity;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.convertor.LocalDateTimeAttributeConverter;/*** @author amit**/@Entity@Table(name = "fofo.pending_order", schema = "fofo")public class PendingOrder implements Serializable {/****/private static final long serialVersionUID = 1L;@Id@Column(name = "id")@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "fofo_id")private int fofoId;@Column(name = "customer_id")private int customerId;@Column(name = "pay_method")private String payMethod;@Column(name = "customer_gst_number")private String customerGstNumber;@Column(name = "customer_address_id")private int customerAddressId;@Column(name = "status")private String status;@Transientprivate Customer customer;@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name = "create_timestamp")private LocalDateTime createTimestamp = LocalDateTime.now();@Column(name = "total_amount")private double totalAmount;@Column(name = "cancelled_amount")private double cancelledAmount;@Column(name = "refunded_amount")private double refundedAmount;@Column(name = "paid_amount")private double paidAmount;@Column(name = "billed_amount")private double billedAmount;@Overridepublic String toString() {return "PendingOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", payMethod="+ payMethod + ", customerGstNumber=" + customerGstNumber + ", customerAddressId=" + customerAddressId+ ", status=" + status + ", createTimestamp=" + createTimestamp + ", totalAmount=" + totalAmount+ ", cancelledAmount=" + cancelledAmount + ", refundedAmount=" + refundedAmount + ", paidAmount="+ paidAmount + ", billedAmount=" + billedAmount + "]";}public int getId() {return id;}public Customer getCustomer() {return customer;}public void setCustomer(Customer customer) {this.customer = customer;}public void setId(int id) {this.id = id;}public int getFofoId() {return fofoId;}public String getPayMethod() {return payMethod;}public void setPayMethod(String payMethod) {this.payMethod = payMethod;}public void setFofoId(int fofoId) {this.fofoId = fofoId;}public int getCustomerId() {return customerId;}public void setCustomerId(int customerId) {this.customerId = customerId;}public String getCustomerGstNumber() {return customerGstNumber;}public void setCustomerGstNumber(String customerGstNumber) {this.customerGstNumber = customerGstNumber;}public int getCustomerAddressId() {return customerAddressId;}public void setCustomerAddressId(int customerAddressId) {this.customerAddressId = customerAddressId;}public String getStatus() {return status;}public void setStatus(String status) {this.status = status;}public LocalDateTime getCreateTimestamp() {return createTimestamp;}public void setCreateTimestamp(LocalDateTime createTimestamp) {this.createTimestamp = createTimestamp;}public double getTotalAmount() {return totalAmount;}public void setTotalAmount(double totalAmount) {this.totalAmount = totalAmount;}public double getCancelledAmount() {return cancelledAmount;}public void setCancelledAmount(double cancelledAmount) {this.cancelledAmount = cancelledAmount;}public double getRefundedAmount() {return refundedAmount;}public void setRefundedAmount(double refundedAmount) {this.refundedAmount = refundedAmount;}public double getPaidAmount() {return paidAmount;}public void setPaidAmount(double paidAmount) {this.paidAmount = paidAmount;}public double getBilledAmount() {return billedAmount;}public void setBilledAmount(double billedAmount) {this.billedAmount = billedAmount;}public static long getSerialversionuid() {return serialVersionUID;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;long temp;temp = Double.doubleToLongBits(billedAmount);result = prime * result + (int) (temp ^ (temp >>> 32));temp = Double.doubleToLongBits(cancelledAmount);result = prime * result + (int) (temp ^ (temp >>> 32));result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());result = prime * result + customerAddressId;result = prime * result + ((customerGstNumber == null) ? 0 : customerGstNumber.hashCode());result = prime * result + customerId;result = prime * result + fofoId;result = prime * result + id;temp = Double.doubleToLongBits(paidAmount);result = prime * result + (int) (temp ^ (temp >>> 32));result = prime * result + ((payMethod == null) ? 0 : payMethod.hashCode());temp = Double.doubleToLongBits(refundedAmount);result = prime * result + (int) (temp ^ (temp >>> 32));result = prime * result + ((status == null) ? 0 : status.hashCode());temp = Double.doubleToLongBits(totalAmount);result = prime * result + (int) (temp ^ (temp >>> 32));return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;PendingOrder other = (PendingOrder) obj;if (Double.doubleToLongBits(billedAmount) != Double.doubleToLongBits(other.billedAmount))return false;if (Double.doubleToLongBits(cancelledAmount) != Double.doubleToLongBits(other.cancelledAmount))return false;if (createTimestamp == null) {if (other.createTimestamp != null)return false;} else if (!createTimestamp.equals(other.createTimestamp))return false;if (customerAddressId != other.customerAddressId)return false;if (customerGstNumber == null) {if (other.customerGstNumber != null)return false;} else if (!customerGstNumber.equals(other.customerGstNumber))return false;if (customerId != other.customerId)return false;if (fofoId != other.fofoId)return false;if (id != other.id)return false;if (Double.doubleToLongBits(paidAmount) != Double.doubleToLongBits(other.paidAmount))return false;if (payMethod == null) {if (other.payMethod != null)return false;} else if (!payMethod.equals(other.payMethod))return false;if (Double.doubleToLongBits(refundedAmount) != Double.doubleToLongBits(other.refundedAmount))return false;if (status == null) {if (other.status != null)return false;} else if (!status.equals(other.status))return false;if (Double.doubleToLongBits(totalAmount) != Double.doubleToLongBits(other.totalAmount))return false;return true;}}