Subversion Repositories SmartDukaan

Rev

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

Rev 29222 Rev 30220
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.logistics;
1
package com.spice.profitmandi.dao.entity.logistics;
2
 
2
 
3
import java.io.Serializable;
3
import in.shop2020.logistics.PickUpType;
4
 
4
 
5
import javax.persistence.Column;
-
 
6
import javax.persistence.Entity;
-
 
7
import javax.persistence.GeneratedValue;
-
 
8
import javax.persistence.GenerationType;
-
 
9
import javax.persistence.Id;
5
import javax.persistence.*;
10
import javax.persistence.Table;
6
import java.io.Serializable;
11
 
7
 
12
/**
8
/**
13
 * This class basically contains address details
9
 * This class basically contains address details
14
 * 
-
 
15
 * @author ashikali
-
 
16
 *
10
 *
-
 
11
 * @author ashikali
17
 */
12
 */
18
@Entity
13
@Entity
19
@Table(name="logistics.provider", schema = "logistics")
14
@Table(name = "logistics.provider", schema = "logistics")
20
public class Provider implements Serializable{
15
public class Provider implements Serializable {
21
	
16
 
22
	private static final long serialVersionUID = 1L;
17
	private static final long serialVersionUID = 1L;
23
	
18
 
24
	public Provider() {
19
	public Provider() {
25
	}
20
	}
26
	
21
 
27
	@Id
22
	@Id
28
	@Column(name="id", unique=true, updatable=false)
23
	@Column(name = "id", unique = true, updatable = false)
29
	@GeneratedValue(strategy = GenerationType.IDENTITY)
24
	@GeneratedValue(strategy = GenerationType.IDENTITY)
30
	private int id;
25
	private int id;
31
	
26
 
32
	@Column(name="name", length = 100)
27
	@Column(name = "name", length = 100)
33
	private String name;
28
	private String name;
34
	
29
 
35
	@Column(name = "isActive", columnDefinition = "tinyint(1) default 1")
30
	@Column(name = "isActive", columnDefinition = "tinyint(1) default 1")
36
	private boolean active;
31
	private boolean active;
37
	
32
 
38
	@Column(name = "pickup")
33
	@Column(name = "pickup")
-
 
34
	@Enumerated(EnumType.ORDINAL)
39
	private int pickup;
35
	private PickUpType pickupType;
40
	
36
 
41
	@Column(name = "bundleWeightLimit")
37
	@Column(name = "bundleWeightLimit")
42
	private float bundleWeightLimit;
38
	private float bundleWeightLimit;
43
	
39
 
44
	@Column(name = "groupShipmentAllowed", columnDefinition = "tinyint(1) default 0")
40
	@Column(name = "groupShipmentAllowed", columnDefinition = "tinyint(1) default 0")
45
	private boolean groupShipmentAllowed;
41
	private boolean groupShipmentAllowed;
46
	
42
 
47
	@Column(name = "maxCodLimit")
43
	@Column(name = "maxCodLimit")
48
	private float maxCODLimit;
44
	private float maxCODLimit;
49
	
45
 
50
	
46
 
51
	public int getId() {
47
	public int getId() {
52
		return id;
48
		return id;
53
	}
49
	}
-
 
50
 
54
	public void setId(int id) {
51
	public void setId(int id) {
55
		this.id = id;
52
		this.id = id;
56
	}
53
	}
-
 
54
 
-
 
55
	public String getName() {
-
 
56
		return name;
-
 
57
	}
-
 
58
 
57
	public void setName(String name) {
59
	public void setName(String name) {
58
        this.name = name;
60
		this.name = name;
59
    }
-
 
60
    public String getName() {
-
 
61
        return name;
-
 
62
    }
61
	}
63
 
62
 
64
	public boolean isActive() {
63
	public boolean isActive() {
65
		return active;
64
		return active;
66
	}
65
	}
-
 
66
 
67
    public void setActive(boolean active) {
67
	public void setActive(boolean active) {
68
		this.active = active;
68
		this.active = active;
69
	}
69
	}
70
    
70
 
71
    public int getPickup() {
71
	public PickUpType getPickupType() {
72
		return pickup;
72
		return pickupType;
73
	}
73
	}
-
 
74
 
74
    public void setPickup(int pickup) {
75
	public void setPickupType(PickUpType pickUpType) {
75
		this.pickup = pickup;
76
		this.pickupType = pickUpType;
76
	}
77
	}
-
 
78
 
77
    public float getBundleWeightLimit() {
79
	public float getBundleWeightLimit() {
78
		return bundleWeightLimit;
80
		return bundleWeightLimit;
79
	}
81
	}
-
 
82
 
80
    public void setBundleWeightLimit(float bundleWeightLimit) {
83
	public void setBundleWeightLimit(float bundleWeightLimit) {
81
		this.bundleWeightLimit = bundleWeightLimit;
84
		this.bundleWeightLimit = bundleWeightLimit;
82
	}
85
	}
83
    
86
 
84
    public boolean isGroupShipmentAllowed() {
87
	public boolean isGroupShipmentAllowed() {
85
		return groupShipmentAllowed;
88
		return groupShipmentAllowed;
86
	}
89
	}
-
 
90
 
87
    public void setGroupShipmentAllowed(boolean groupShipmentAllowed) {
91
	public void setGroupShipmentAllowed(boolean groupShipmentAllowed) {
88
		this.groupShipmentAllowed = groupShipmentAllowed;
92
		this.groupShipmentAllowed = groupShipmentAllowed;
89
	}
93
	}
-
 
94
 
90
    public float getMaxCODLimit() {
95
	public float getMaxCODLimit() {
91
		return maxCODLimit;
96
		return maxCODLimit;
92
	}
97
	}
-
 
98
 
93
    public void setMaxCODLimit(float maxCODLimit) {
99
	public void setMaxCODLimit(float maxCODLimit) {
94
		this.maxCODLimit = maxCODLimit;
100
		this.maxCODLimit = maxCODLimit;
95
	}
101
	}
96
    
102
 
97
	@Override
103
	@Override
98
	public int hashCode() {
104
	public int hashCode() {
99
		final int prime = 31;
105
		final int prime = 31;
100
		int result = 1;
106
		int result = 1;
101
		result = prime * result + id;
107
		result = prime * result + id;
102
		return result;
108
		return result;
103
	}
109
	}
-
 
110
 
104
	@Override
111
	@Override
105
	public boolean equals(Object obj) {
112
	public boolean equals(Object obj) {
106
		if (this == obj)
113
		if (this == obj)
107
			return true;
114
			return true;
108
		if (obj == null)
115
		if (obj == null)
Line 112... Line 119...
112
		Provider other = (Provider) obj;
119
		Provider other = (Provider) obj;
113
		if (id != other.id)
120
		if (id != other.id)
114
			return false;
121
			return false;
115
		return true;
122
		return true;
116
	}
123
	}
-
 
124
 
117
	@Override
125
	@Override
118
	public String toString() {
126
	public String toString() {
119
		return "Provider [id=" + id + ", name=" + name + ", active=" + active + ", pickup=" + pickup
127
		return "Provider [id=" + id + ", name=" + name + ", active=" + active + ", pickup=" + pickupType
120
				+ ", bundleWeightLimit=" + bundleWeightLimit + ", groupShipmentAllowed=" + groupShipmentAllowed
128
				+ ", bundleWeightLimit=" + bundleWeightLimit + ", groupShipmentAllowed=" + groupShipmentAllowed
121
				+ ", maxCODLimit=" + maxCODLimit + "]";
129
				+ ", maxCODLimit=" + maxCODLimit + "]";
122
	}
130
	}
123
	
131
 
124
    
132
 
125
    
-
 
126
}
133
}
127
134