Rev 33719 | 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.time.LocalDateTime;import java.util.Objects;/*** @author amit*/@Entity@Table(name = "fofo.upSaleOrder")@NamedQueries({@NamedQuery(name = "UpSaleOrder.findLast48hourLatestEntry", query = "SELECT u FROM UpSaleOrder u WHERE u.fofoId IN :fofoIds AND u.createdTimestamp >= :startDateTime AND u.fetched=false ORDER BY u.createdTimestamp ASC"),})public class UpSaleOrder implements Serializable {private static final long serialVersionUID = 1L;@Id@Column(name = "id")@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "orderId")private int orderId;@Column(name = "fofoId")private int fofoId;@Column(name = "create_timestamp")private LocalDateTime createdTimestamp = LocalDateTime.now();@Column(name = "fetched")private boolean fetched;public int getId() {return id;}public void setId(int id) {this.id = id;}public int getOrderId() {return orderId;}public void setOrderId(int orderId) {this.orderId = orderId;}public LocalDateTime getCreatedTimestamp() {return createdTimestamp;}public void setCreatedTimestamp(LocalDateTime createdTimestamp) {this.createdTimestamp = createdTimestamp;}public int getFofoId() {return fofoId;}public void setFofoId(int fofoId) {this.fofoId = fofoId;}public boolean isFetched() {return fetched;}public void setFetched(boolean fetched) {this.fetched = fetched;}@Overridepublic String toString() {return "UpSaleOrder{" +"id=" + id +", orderId=" + orderId +", fofoId=" + fofoId +", createdTimestamp=" + createdTimestamp +", fetched=" + fetched +'}';}@Overridepublic boolean equals(Object o) {if (this == o) return true;if (o == null || getClass() != o.getClass()) return false;UpSaleOrder that = (UpSaleOrder) o;return id == that.id && orderId == that.orderId && fofoId == that.fofoId && fetched == that.fetched && Objects.equals(createdTimestamp, that.createdTimestamp);}@Overridepublic int hashCode() {return Objects.hash(id, orderId, fofoId, createdTimestamp, fetched);}}