001: package org.osbl.inventory.model;
002:
003: import org.osbl.persistence.model.Entity;
004: import org.osbl.identity.model.Identity;
005: import org.conform.Property;
006: import org.conform.validator.NumberRange;
007:
008: import java.sql.Date;
009: import java.math.BigDecimal;
010: import java.util.List;
011:
012: public class Inventory extends Entity {
013: String barcode;
014: @Property(mandatory="true")
015: String name;
016: String description;
017:
018: List<Allocation> allocations;
019: @Property(mandatory="true")
020: CostType costType;
021: Identity employee;
022: Location location;
023:
024: Identity supplier;
025: Date guarantee;
026: @Property(mandatory="true")
027: @NumberRange(from="0",fromInclusive=true)
028: BigDecimal costs;
029: boolean recurringCosts;
030:
031: State state;
032:
033: public String getBarcode() {
034: return barcode;
035: }
036:
037: public void setBarcode(String barcode) {
038: this .barcode = barcode;
039: }
040:
041: public String getName() {
042: return name;
043: }
044:
045: public void setName(String name) {
046: this .name = name;
047: }
048:
049: public String getDescription() {
050: return description;
051: }
052:
053: public void setDescription(String description) {
054: this .description = description;
055: }
056:
057: public List<Allocation> getAllocations() {
058: return allocations;
059: }
060:
061: public void setAllocations(List<Allocation> allocations) {
062: this .allocations = allocations;
063: }
064:
065: public CostType getCostType() {
066: return costType;
067: }
068:
069: public void setCostType(CostType costType) {
070: this .costType = costType;
071: }
072:
073: public Identity getEmployee() {
074: return employee;
075: }
076:
077: public void setEmployee(Identity employee) {
078: this .employee = employee;
079: }
080:
081: public Location getLocation() {
082: return location;
083: }
084:
085: public void setLocation(Location location) {
086: this .location = location;
087: }
088:
089: public Identity getSupplier() {
090: return supplier;
091: }
092:
093: public void setSupplier(Identity supplier) {
094: this .supplier = supplier;
095: }
096:
097: public Date getGuarantee() {
098: return guarantee;
099: }
100:
101: public void setGuarantee(Date guarantee) {
102: this .guarantee = guarantee;
103: }
104:
105: public BigDecimal getCosts() {
106: return costs;
107: }
108:
109: public void setCosts(BigDecimal costs) {
110: this .costs = costs;
111: }
112:
113: public boolean isRecurringCosts() {
114: return recurringCosts;
115: }
116:
117: public void setRecurringCosts(boolean recurringCosts) {
118: this .recurringCosts = recurringCosts;
119: }
120:
121: public State getState() {
122: return state;
123: }
124:
125: public void setState(State state) {
126: this.state = state;
127: }
128: }
|