Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 shop2020 1
/**
2
 * 
3
 */
4
package in.shop2020.metamodel.definitions;
5
 
16 naveen 6
import java.util.ArrayList;
10 shop2020 7
import java.util.List;
8
 
9
/**
10
 * @author naveen
11
 *
12
 */
13
public class CompositeDefinition extends DatatypeDefinition {
14
 
15
	/**
16
	 * 
17
	 */
18
	private static final long serialVersionUID = 1L;
19
	private List<CompositePartDefinition> compositePartDefinitions;
20
 
21
	/**
22
	 * @param newID
23
	 */
16 naveen 24
	public CompositeDefinition(long newID, String name) {
25
		super(newID, name);
10 shop2020 26
	}
27
 
28
	/**
16 naveen 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
	/**
10 shop2020 44
	 * @param compositePartDefinitions the compositePartDefinitions to set
45
	 */
46
	public void setCompositePartDefinitions(List<CompositePartDefinition> compositePartDefinitions) {
47
		this.compositePartDefinitions = compositePartDefinitions;
48
	}
49
 
50
	/**
51
	 * @return the compositePartDefinitions
52
	 */
53
	public List<CompositePartDefinition> getCompositePartDefinitions() {
54
		return compositePartDefinitions;
55
	}
56
 
16 naveen 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
	}
10 shop2020 67
}