Subversion Repositories SmartDukaan

Rev

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

Rev 24 Rev 49
Line 5... Line 5...
5
 
5
 
6
import java.util.ArrayList;
6
import java.util.ArrayList;
7
import java.util.List;
7
import java.util.List;
8
 
8
 
9
/**
9
/**
-
 
10
 * Defines composite type of data object. 
10
 * @author naveen
11
 * @author naveen
11
 *
12
 *
12
 */
13
 */
13
public class CompositeDefinition extends DatatypeDefinition {
14
public class CompositeDefinition extends DatatypeDefinition {
14
 
15
 
15
	/**
16
	/**
16
	 * 
17
	 * 
17
	 */
18
	 */
18
	private static final long serialVersionUID = 1L;
19
	private static final long serialVersionUID = 1L;
-
 
20
	
-
 
21
	/**
-
 
22
	 * Character or String used to separate different parts
-
 
23
	 */
19
	private String separator;
24
	private String separator;
-
 
25
	
-
 
26
	/**
-
 
27
	 * List of parts
-
 
28
	 */
20
	private List<CompositePartDefinition> compositePartDefinitions;
29
	private List<CompositePartDefinition> compositePartDefinitions;
21
 
30
	
22
	/**
31
	/**
-
 
32
	 * 
23
	 * @param newID
33
	 * @param newID 
-
 
34
	 * @param name
-
 
35
	 * @param separator
24
	 */
36
	 */
25
	public CompositeDefinition(long newID, String name, String separator) {
37
	public CompositeDefinition(long newID, String name, String separator) {
26
		super(newID, name);
38
		super(newID, name);
27
		this.separator = separator;
39
		this.separator = separator;
28
	}
40
	}
Line 33... Line 45...
33
	public String getSeparator() {
45
	public String getSeparator() {
34
		return separator;
46
		return separator;
35
	}
47
	}
36
 
48
 
37
	/**
49
	/**
-
 
50
	 * Handy method to add new parts to existing composite definition
38
	 * 
51
	 * 
39
	 * @param partDefinition
52
	 * @param partDefinition Composite Part Definition
40
	 */
53
	 */
41
	public void addCompositePartDefinition(
54
	public void addCompositePartDefinition(
42
			CompositePartDefinition partDefinition) {
55
			CompositePartDefinition partDefinition) {
43
		
56
		
44
		if(this.compositePartDefinitions == null) {
57
		if(this.compositePartDefinitions == null) {