Subversion Repositories SmartDukaan

Rev

Rev 23716 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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