Subversion Repositories SmartDukaan

Rev

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

Rev 22352 Rev 22859
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.dtr;
1
package com.spice.profitmandi.dao.entity.dtr;
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
4
 
4
 
5
import javax.persistence.EmbeddedId;
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
8
import javax.persistence.Table;
9
import javax.persistence.UniqueConstraint;
9
import javax.persistence.UniqueConstraint;
10
 
10
 
Line 22... Line 22...
22
	
22
	
23
	public NotBuyBack() {
23
	public NotBuyBack() {
24
	}
24
	}
25
	
25
	
26
	@Id
26
	@Id
27
	@EmbeddedId
27
	@Column(name = "item_id")
28
	private NotBuyBackId id;
28
	private int itemId;
29
	
29
	
-
 
30
	@Id
-
 
31
	@Column(name = "transaction_id")
-
 
32
	private int transactionId;
-
 
33
	
30
	public NotBuyBackId getId() {
34
	public int getItemId() {
31
		return id;
35
		return itemId;
-
 
36
	}
-
 
37
	
-
 
38
	public void setItemId(int itemId) {
-
 
39
		this.itemId = itemId;
32
	}
40
	}
-
 
41
	
33
	public void setId(NotBuyBackId id) {
42
	public int getTransactionId() {
34
		this.id = id;
43
		return transactionId;
35
	}
44
	}
36
	
45
	
-
 
46
	public void setTransactionId(int transactionId) {
-
 
47
		this.transactionId = transactionId;
-
 
48
	}
-
 
49
 
37
	@Override
50
	@Override
38
	public int hashCode() {
51
	public int hashCode() {
39
		final int prime = 31;
52
		final int prime = 31;
40
		int result = 1;
53
		int result = 1;
41
		result = prime * result + id.hashCode();
54
		result = prime * result + itemId;
-
 
55
		result = prime * result + transactionId;
42
		return result;
56
		return result;
43
	}
57
	}
-
 
58
 
44
	@Override
59
	@Override
45
	public boolean equals(Object obj) {
60
	public boolean equals(Object obj) {
46
		if (this == obj)
61
		if (this == obj)
47
			return true;
62
			return true;
48
		if (obj == null)
63
		if (obj == null)
49
			return false;
64
			return false;
50
		if (getClass() != obj.getClass())
65
		if (getClass() != obj.getClass())
51
			return false;
66
			return false;
52
		NotBuyBack other = (NotBuyBack) obj;
67
		NotBuyBack other = (NotBuyBack) obj;
53
		if (id != other.id)
68
		if (itemId != other.itemId)
-
 
69
			return false;
-
 
70
		if (transactionId != other.transactionId)
54
			return false;
71
			return false;
55
		return true;
72
		return true;
56
	}
73
	}
-
 
74
 
57
	@Override
75
	@Override
58
	public String toString() {
76
	public String toString() {
59
		return "NotBuyBack [id=" + id + "]";
77
		return "NotBuyBack [itemId=" + itemId + ", transactionId=" + transactionId + "]";
60
	}
78
	}
-
 
79
	
61
        
80
        
62
}
81
}
63
82