01: package org.osbl.inventory.model;
02:
03: import org.osbl.identity.model.Identity;
04: import org.conform.Property;
05: import org.conform.validator.NumberRange;
06:
07: import java.math.BigDecimal;
08:
09: public class Allocation {
10: String key;
11: @Property(mandatory="true")
12: Identity costCenter;
13: @Property(mandatory="true")
14: @NumberRange(from="0",fromInclusive=false,until="100",untilInclusive=true)
15: BigDecimal percentage;
16: @Property(mandatory="true")
17: @NumberRange(from="0",fromInclusive=false)
18: BigDecimal amount;
19:
20: public String getKey() {
21: return key;
22: }
23:
24: public void setKey(String key) {
25: this .key = key;
26: }
27:
28: public Identity getCostCenter() {
29: return costCenter;
30: }
31:
32: public void setCostCenter(Identity costCenter) {
33: this .costCenter = costCenter;
34: }
35:
36: public BigDecimal getPercentage() {
37: return percentage;
38: }
39:
40: public void setPercentage(BigDecimal percentage) {
41: this .percentage = percentage;
42: }
43:
44: public BigDecimal getAmount() {
45: return amount;
46: }
47:
48: public void setAmount(BigDecimal amount) {
49: this.amount = amount;
50: }
51: }
|