Subversion Repositories SmartDukaan

Rev

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

Rev 10 Rev 16
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;
6
import java.util.List;
7
import java.util.List;
7
 
8
 
8
/**
9
/**
9
 * @author naveen
10
 * @author naveen
10
 *
11
 *
Line 18... Line 19...
18
	private List<CompositePartDefinition> compositePartDefinitions;
19
	private List<CompositePartDefinition> compositePartDefinitions;
19
 
20
 
20
	/**
21
	/**
21
	 * @param newID
22
	 * @param newID
22
	 */
23
	 */
23
	public CompositeDefinition(long newID) {
24
	public CompositeDefinition(long newID, String name) {
24
		super(newID);
25
		super(newID, name);
25
		// TODO Auto-generated constructor stub
-
 
26
	}
26
	}
27
 
27
 
28
	/**
28
	/**
-
 
29
	 * 
-
 
30
	 * @param partDefinition
-
 
31
	 */
-
 
32
	public void addCompositePartDefinition(
-
 
33
			CompositePartDefinition partDefinition) {
-
 
34
		
-
 
35
		if(this.compositePartDefinitions == null) {
-
 
36
			this.compositePartDefinitions = 
-
 
37
				new ArrayList<CompositePartDefinition>();
-
 
38
		}
-
 
39
		
-
 
40
		this.compositePartDefinitions.add(partDefinition);
-
 
41
	}
-
 
42
	
-
 
43
	/**
29
	 * @param compositePartDefinitions the compositePartDefinitions to set
44
	 * @param compositePartDefinitions the compositePartDefinitions to set
30
	 */
45
	 */
31
	public void setCompositePartDefinitions(List<CompositePartDefinition> compositePartDefinitions) {
46
	public void setCompositePartDefinitions(List<CompositePartDefinition> compositePartDefinitions) {
32
		this.compositePartDefinitions = compositePartDefinitions;
47
		this.compositePartDefinitions = compositePartDefinitions;
33
	}
48
	}
Line 37... Line 52...
37
	 */
52
	 */
38
	public List<CompositePartDefinition> getCompositePartDefinitions() {
53
	public List<CompositePartDefinition> getCompositePartDefinitions() {
39
		return compositePartDefinitions;
54
		return compositePartDefinitions;
40
	}
55
	}
41
 
56
 
-
 
57
	/* (non-Javadoc)
-
 
58
	 * @see java.lang.Object#toString()
-
 
59
	 */
-
 
60
	@Override
-
 
61
	public String toString() {
-
 
62
		return "CompositeDefinition [compositePartDefinitions="
-
 
63
				+ compositePartDefinitions + ", getDescription()="
-
 
64
				+ getDescription() + ", getName()=" + getName() + ", getID()="
-
 
65
				+ getID() + "]";
-
 
66
	}
42
}
67
}