| 23418 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
|
|
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
import java.time.format.DateTimeFormatter;
|
|
|
6 |
|
|
|
7 |
import javax.persistence.Column;
|
|
|
8 |
import javax.persistence.Convert;
|
|
|
9 |
import javax.persistence.Entity;
|
|
|
10 |
import javax.persistence.GeneratedValue;
|
|
|
11 |
import javax.persistence.GenerationType;
|
|
|
12 |
import javax.persistence.Id;
|
|
|
13 |
import javax.persistence.Table;
|
| 23880 |
ashik.ali |
14 |
import javax.persistence.Transient;
|
| 23418 |
ashik.ali |
15 |
|
|
|
16 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
|
|
17 |
|
|
|
18 |
@Entity
|
|
|
19 |
@Table(name="fofo.prebooking_listing", schema = "fofo")
|
|
|
20 |
public class PrebookingListing implements Serializable{
|
|
|
21 |
|
|
|
22 |
private static final long serialVersionUID = 1L;
|
|
|
23 |
|
|
|
24 |
@Id
|
|
|
25 |
@Column(name = "id")
|
|
|
26 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
27 |
private int id;
|
| 24087 |
amit.gupta |
28 |
|
| 24085 |
amit.gupta |
29 |
@Column(name = "catalog_id")
|
|
|
30 |
private int catalogId;
|
|
|
31 |
|
| 23418 |
ashik.ali |
32 |
@Column(name = "advance_amount")
|
|
|
33 |
private float advanceAmount;
|
|
|
34 |
|
|
|
35 |
@Column(name = "tentative_amount")
|
|
|
36 |
private float tentativeAmount;
|
|
|
37 |
|
|
|
38 |
@Column(name = "created_by")
|
|
|
39 |
private int createdBy;
|
|
|
40 |
|
|
|
41 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
42 |
@Column(name = "active_timestamp")
|
|
|
43 |
private LocalDateTime activeTimestamp = null;
|
|
|
44 |
|
|
|
45 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
46 |
@Column(name = "expire_timestamp")
|
|
|
47 |
private LocalDateTime expireTimestamp = null;
|
|
|
48 |
|
|
|
49 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
50 |
@Column(name = "create_timestamp")
|
|
|
51 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
| 23880 |
ashik.ali |
52 |
|
|
|
53 |
@Transient
|
|
|
54 |
private String description;
|
| 23418 |
ashik.ali |
55 |
|
|
|
56 |
public int getId() {
|
|
|
57 |
return id;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
public void setId(int id) {
|
|
|
61 |
this.id = id;
|
|
|
62 |
}
|
| 24085 |
amit.gupta |
63 |
|
|
|
64 |
|
| 23418 |
ashik.ali |
65 |
|
| 24085 |
amit.gupta |
66 |
public int getCatalogId() {
|
|
|
67 |
return catalogId;
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
public void setCatalogId(int catalogId) {
|
|
|
71 |
this.catalogId = catalogId;
|
|
|
72 |
}
|
|
|
73 |
|
| 23418 |
ashik.ali |
74 |
public float getAdvanceAmount() {
|
|
|
75 |
return advanceAmount;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
public void setAdvanceAmount(float advanceAmount) {
|
|
|
79 |
this.advanceAmount = advanceAmount;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
public float getTentativeAmount() {
|
|
|
83 |
return tentativeAmount;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
public void setTentativeAmount(float tentativeAmount) {
|
|
|
87 |
this.tentativeAmount = tentativeAmount;
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
public int getCreatedBy() {
|
|
|
91 |
return createdBy;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public void setCreatedBy(int createdBy) {
|
|
|
95 |
this.createdBy = createdBy;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public LocalDateTime getActiveTimestamp() {
|
|
|
99 |
return activeTimestamp;
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public void setActiveTimestamp(LocalDateTime activeTimestamp) {
|
|
|
103 |
this.activeTimestamp = activeTimestamp;
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
public LocalDateTime getExpireTimestamp() {
|
|
|
107 |
return expireTimestamp;
|
|
|
108 |
}
|
|
|
109 |
|
|
|
110 |
public void setExpireTimestamp(LocalDateTime expireTimestamp) {
|
|
|
111 |
this.expireTimestamp = expireTimestamp;
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
public LocalDateTime getCreateTimestamp() {
|
|
|
115 |
return createTimestamp;
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
119 |
this.createTimestamp = createTimestamp;
|
|
|
120 |
}
|
|
|
121 |
|
| 23880 |
ashik.ali |
122 |
public String getDescription() {
|
|
|
123 |
return description;
|
|
|
124 |
}
|
|
|
125 |
|
|
|
126 |
public void setDescription(String description) {
|
|
|
127 |
this.description = description;
|
|
|
128 |
}
|
|
|
129 |
|
| 23418 |
ashik.ali |
130 |
public String getFormattedActiveTimestamp(){
|
|
|
131 |
if(activeTimestamp == null){
|
|
|
132 |
return null;
|
|
|
133 |
}
|
|
|
134 |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
|
|
|
135 |
return activeTimestamp.format(formatter);
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
public String getFormattedExpireTimestamp(){
|
|
|
139 |
if(expireTimestamp == null){
|
|
|
140 |
return null;
|
|
|
141 |
}
|
|
|
142 |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
|
|
|
143 |
return expireTimestamp.format(formatter);
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
public String getFormattedCreateTimestamp(){
|
|
|
147 |
if(createTimestamp == null){
|
|
|
148 |
return null;
|
|
|
149 |
}
|
|
|
150 |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
|
|
|
151 |
return createTimestamp.format(formatter);
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
@Override
|
|
|
155 |
public int hashCode() {
|
|
|
156 |
final int prime = 31;
|
|
|
157 |
int result = 1;
|
|
|
158 |
result = prime * result + id;
|
|
|
159 |
return result;
|
|
|
160 |
}
|
|
|
161 |
|
|
|
162 |
@Override
|
|
|
163 |
public boolean equals(Object obj) {
|
|
|
164 |
if (this == obj)
|
|
|
165 |
return true;
|
|
|
166 |
if (obj == null)
|
|
|
167 |
return false;
|
|
|
168 |
if (getClass() != obj.getClass())
|
|
|
169 |
return false;
|
|
|
170 |
PrebookingListing other = (PrebookingListing) obj;
|
|
|
171 |
if (id != other.id)
|
|
|
172 |
return false;
|
|
|
173 |
return true;
|
|
|
174 |
}
|
|
|
175 |
|
|
|
176 |
@Override
|
|
|
177 |
public String toString() {
|
| 24087 |
amit.gupta |
178 |
return "PrebookingListing [id=" + id + ", catalogId=" + catalogId + ", advanceAmount=" + advanceAmount
|
|
|
179 |
+ ", tentativeAmount=" + tentativeAmount + ", createdBy=" + createdBy + ", activeTimestamp="
|
|
|
180 |
+ activeTimestamp + ", expireTimestamp=" + expireTimestamp + ", createTimestamp=" + createTimestamp
|
|
|
181 |
+ ", description=" + description + "]";
|
| 23418 |
ashik.ali |
182 |
}
|
|
|
183 |
|
|
|
184 |
}
|