Subversion Repositories SmartDukaan

Rev

Rev 23716 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23716 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
23786 amit.gupta 8
import javax.persistence.EnumType;
9
import javax.persistence.Enumerated;
23716 amit.gupta 10
import javax.persistence.Id;
11
import javax.persistence.Table;
12
 
23786 amit.gupta 13
import com.spice.profitmandi.common.enumuration.CounterSize;
14
 
23716 amit.gupta 15
@Entity
16
@Table(name="fofo.stock_allocation")
17
public class StockAllocation implements Serializable{
18
 
19
	private static final long serialVersionUID = 1L;
20
 
21
	@Id
22
	@Column(name = "item_id")
23
	private int itemId;
24
 
23786 amit.gupta 25
	@Id
26
	@Column(name = "counter_size")
27
	@Enumerated(EnumType.STRING)
28
	private CounterSize counterSize;
29
 
23716 amit.gupta 30
	@Column(name = "create_timestamp")
31
	private LocalDateTime createTimestamp = LocalDateTime.now();
32
 
33
	@Override
34
	public int hashCode() {
35
		final int prime = 31;
36
		int result = 1;
37
		result = prime * result + itemId;
38
		return result;
39
	}
40
 
41
 
42
 
43
	@Override
44
	public boolean equals(Object obj) {
45
		if (this == obj)
46
			return true;
47
		if (obj == null)
48
			return false;
49
		if (getClass() != obj.getClass())
50
			return false;
51
		StockAllocation other = (StockAllocation) obj;
52
		if (itemId != other.itemId)
53
			return false;
54
		return true;
55
	}
56
 
57
 
58
 
59
	@Column(name = "update_timestamp")
60
	private LocalDateTime updateTimestamp = LocalDateTime.now();
61
 
62
	public LocalDateTime getUpdateTimestamp() {
63
		return updateTimestamp;
64
	}
65
 
66
 
67
 
68
	public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
69
		this.updateTimestamp = updateTimestamp;
70
	}
71
 
72
 
73
 
74
	@Column(name = "active")
75
	private boolean active;
76
 
23786 amit.gupta 77
	@Column(name="quantity")
23716 amit.gupta 78
	private int quantity;
79
 
80
 
81
 
82
	public int getQuantity() {
83
		return quantity;
84
	}
85
 
86
 
87
 
88
	public void setQuantity(int quantity) {
89
		this.quantity = quantity;
90
	}
91
 
92
 
93
 
94
	public int getItemId() {
95
		return itemId;
96
	}
97
 
98
 
99
 
100
	public void setItemId(int itemId) {
101
		this.itemId = itemId;
102
	}
103
 
23786 amit.gupta 104
 
23716 amit.gupta 105
 
23786 amit.gupta 106
	public CounterSize getCounterSize() {
107
		return counterSize;
108
	}
23716 amit.gupta 109
 
23786 amit.gupta 110
 
111
 
112
	public void setCounterSize(CounterSize counterSize) {
113
		this.counterSize = counterSize;
114
	}
115
 
116
 
117
 
23716 amit.gupta 118
	public LocalDateTime getCreateTimestamp() {
119
		return createTimestamp;
120
	}
121
 
122
 
123
 
124
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
125
		this.createTimestamp = createTimestamp;
126
	}
127
 
128
 
129
 
130
	public boolean isActive() {
131
		return active;
132
	}
133
 
134
 
135
 
136
	public void setActive(boolean active) {
137
		this.active = active;
138
	}
139
 
140
 
141
	@Override
142
	public String toString() {
23786 amit.gupta 143
		return "StockAllocation [itemId=" + itemId + ", createTimestamp=" + createTimestamp
23716 amit.gupta 144
				+ ", updateTimestamp=" + updateTimestamp + ", active=" + active + ", quantity=" + quantity + "]";
145
	}
146
 
147
 
148
}