Subversion Repositories SmartDukaan

Rev

Rev 43 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 43 Rev 99
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.metamodel.definitions;
4
package in.shop2020.metamodel.definitions;
5
 
5
 
-
 
6
import java.util.ArrayList;
-
 
7
import java.util.List;
-
 
8
 
6
import in.shop2020.metamodel.util.MetaModelComponent;
9
import in.shop2020.metamodel.util.MetaModelComponent;
7
 
10
 
8
/**
11
/**
9
 * Part of definitions component of shop2020 Content Meta-model. Defines 
12
 * Part of definitions component of shop2020 Content Meta-model. Defines 
10
 * Bullet component.
13
 * Bullet component.
Line 34... Line 37...
34
	 * If set, makes the bullet take more than one value. e.g. 
37
	 * If set, makes the bullet take more than one value. e.g. 
35
	 * Mobile phone "Color" is a mutli-value bullet, manufacturers provide 
38
	 * Mobile phone "Color" is a mutli-value bullet, manufacturers provide 
36
	 * multiple color options per model
39
	 * multiple color options per model
37
	 */
40
	 */
38
	private boolean isMultivalue;
41
	private boolean isMultivalue;
-
 
42
	
39
	/**
43
	/**
40
	 * 
44
	 * True if values are learned
41
	 */
45
	 */
42
	private boolean isLearned;
46
	private boolean isLearned;
-
 
47
	
-
 
48
	/**
-
 
49
	 * List of allowed Unit IDs
-
 
50
	 */
43
	private long unitID;
51
	private List<Long> unitIDs;
44
 
52
 
45
	/**
53
	/**
46
	 * 
54
	 * 
47
	 * @param datatypeDefinitionID 
55
	 * @param datatypeDefinitionID 
48
	 */
56
	 */
Line 109... Line 117...
109
	public boolean isLearned() {
117
	public boolean isLearned() {
110
		return isLearned;
118
		return isLearned;
111
	}
119
	}
112
 
120
 
113
	/**
121
	/**
114
	 * 
-
 
115
	 * @return unitID
122
	 * @param unitIDs the unitIDs to set
116
	 */
123
	 */
117
	public long getUnitID() {
124
	public void setUnitIDs(List<Long> unitIDs) {
118
		return this.unitID;
125
		this.unitIDs = unitIDs;
119
	}
126
	}
120
	
127
	
121
	/**
128
	/**
122
	 * 
129
	 * 
123
	 * @param value
130
	 * @param unitID
-
 
131
	 */
-
 
132
	public void addUnitID(Long unitID) {
-
 
133
		if(this.unitIDs == null) {
-
 
134
			this.unitIDs = new ArrayList<Long>();
-
 
135
		}
-
 
136
		
-
 
137
		this.unitIDs.add(unitID);
-
 
138
	}
-
 
139
	
-
 
140
	/**
-
 
141
	 * @return the unitIDs
124
	 */
142
	 */
125
	public void setUnitID(long value) {
143
	public List<Long> getUnitIDs() {
126
		this.unitID = value;
144
		return unitIDs;
127
	}
145
	}
128
 
146
 
129
	/* (non-Javadoc)
147
	/* (non-Javadoc)
130
	 * @see java.lang.Object#toString()
148
	 * @see java.lang.Object#toString()
131
	 */
149
	 */
132
	@Override
150
	@Override
133
	public String toString() {
151
	public String toString() {
134
		return "BulletDefinition [datatypeDefinitionID=" + datatypeDefinitionID
152
		return "BulletDefinition [datatypeDefinitionID=" + datatypeDefinitionID
135
				+ ", description=" + description + ", isLearned=" + isLearned
153
				+ ", description=" + description + ", isLearned=" + isLearned
136
				+ ", isMultivalue=" + isMultivalue + ", unitID=" + unitID + "]";
154
				+ ", isMultivalue=" + isMultivalue + ", unitIDs=" + unitIDs
-
 
155
				+ "]";
137
	}
156
	}
138
 
157
 
139
}
158
}