Subversion Repositories SmartDukaan

Rev

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

Rev 26675 Rev 31903
Line 1... Line 1...
1
package com.spice.profitmandi.dao.model;
1
package com.spice.profitmandi.dao.model;
2
 
2
 
3
public class AmountMarginModel {
3
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
4
 
4
 
5
	private int value;
5
import java.util.Objects;
6
	private double margin;
-
 
7
 
6
 
-
 
7
public class AmountModel {
-
 
8
 
-
 
9
	private double amount;
-
 
10
	private AmountType amountType;
-
 
11
	private double value;
-
 
12
 
-
 
13
	public AmountModel() {
-
 
14
	}
-
 
15
 
-
 
16
	public AmountModel(double amount, AmountType amountType) {
-
 
17
		this.amount = amount;
-
 
18
		this.amountType = amountType;
-
 
19
	}
-
 
20
 
8
	public int getValue() {
21
	public double getValue() {
9
		return value;
22
		return value;
10
	}
23
	}
11
 
24
 
12
	public void setValue(int value) {
25
	public void setValue(double value) {
13
		this.value = value;
26
		this.value = value;
14
	}
27
	}
15
 
28
 
-
 
29
	@Override
16
	public double getMargin() {
30
	public String toString() {
17
		return margin;
31
		return "AmountModel{" +
-
 
32
				"amount=" + amount +
-
 
33
				", amountType=" + amountType +
-
 
34
				'}';
18
	}
35
	}
19
 
36
 
-
 
37
	@Override
20
	public void setMargin(double margin) {
38
	public boolean equals(Object o) {
21
		this.margin = margin;
39
		if (this == o) return true;
-
 
40
		if (o == null || getClass() != o.getClass()) return false;
-
 
41
		AmountModel that = (AmountModel) o;
-
 
42
		return Double.compare(that.amount, amount) == 0 && amountType == that.amountType;
22
	}
43
	}
23
 
44
 
-
 
45
	@Override
-
 
46
	public int hashCode() {
-
 
47
		return Objects.hash(amount, amountType);
-
 
48
	}
24
 
49
 
-
 
50
	public double getAmount() {
-
 
51
		return amount;
-
 
52
	}
-
 
53
 
-
 
54
	public void setAmount(double amount) {
-
 
55
		this.amount = amount;
-
 
56
	}
25
 
57
 
-
 
58
	public AmountType getAmountType() {
-
 
59
		return amountType;
-
 
60
	}
-
 
61
 
-
 
62
	public void setAmountType(AmountType amountType) {
-
 
63
		this.amountType = amountType;
-
 
64
	}
26
}
65
}