Subversion Repositories SmartDukaan

Rev

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

Rev 33 Rev 49
Line 14... Line 14...
14
import in.shop2020.metamodel.definitions.CompositeDefinition;
14
import in.shop2020.metamodel.definitions.CompositeDefinition;
15
import in.shop2020.metamodel.definitions.DefinitionsContainer;
15
import in.shop2020.metamodel.definitions.DefinitionsContainer;
16
import in.shop2020.metamodel.definitions.EnumValue;
16
import in.shop2020.metamodel.definitions.EnumValue;
17
 
17
 
18
/**
18
/**
-
 
19
 * Utility class to support core Bullet class. All related objects are fetched 
-
 
20
 * from database and aggregated here.
-
 
21
 * 
19
 * @author naveen
22
 * @author naveen
20
 *
23
 *
21
 */
24
 */
22
public class ExpandedBullet extends Bullet {
25
public class ExpandedBullet extends Bullet {
-
 
26
	
-
 
27
	/**
-
 
28
	 * 
-
 
29
	 */
-
 
30
	private static final long serialVersionUID = 1L;
-
 
31
 
-
 
32
	/**
-
 
33
	 * Expanded version of BulletDefinition object
-
 
34
	 */
23
	private ExpandedBulletDefinition expandedBulletDefinition;
35
	private ExpandedBulletDefinition expandedBulletDefinition;
-
 
36
	
-
 
37
	/**
-
 
38
	 * Expanded version of EnumDataObject
-
 
39
	 */
24
	private ExpandedEnumDataObject expandedEnumDataObject;
40
	private ExpandedEnumDataObject expandedEnumDataObject;
-
 
41
	
-
 
42
	/**
-
 
43
	 * If bullet contains shop2020 primitive structured data
-
 
44
	 */
25
	private boolean primitive;
45
	private boolean primitive;
26
	private boolean enumerated;
-
 
27
	private boolean composite;
-
 
28
	
46
	
-
 
47
	/**
-
 
48
	 * If bullet contains enumerated type structured data
-
 
49
	 */
-
 
50
	private boolean enumerated;
29
	
51
	
30
	/**
52
	/**
31
	 * 
-
 
-
 
53
	 * If bullet contains composite type structured data
32
	 */
54
	 */
33
	private static final long serialVersionUID = 1L;
55
	private boolean composite;
34
 
56
 
35
	/**
57
	/**
-
 
58
	 * Expands references in Bullet object based on BulletDefinition object
-
 
59
	 * 
36
	 * @param dataObject
60
	 * @param bullet
-
 
61
	 * @param bulletDefinition
37
	 * @throws Exception 
62
	 * @throws Exception
38
	 */
63
	 */
39
	public ExpandedBullet(Bullet bullet, BulletDefinition bulletDefinition) 
64
	public ExpandedBullet(Bullet bullet, BulletDefinition bulletDefinition) 
40
		throws Exception {
65
		throws Exception {
41
		super(bullet.getDataObject());
66
		super(bullet.getDataObject());
42
		
67
		
Line 104... Line 129...
104
	public boolean isComposite() {
129
	public boolean isComposite() {
105
		return composite;
130
		return composite;
106
	}
131
	}
107
 
132
 
108
	/**
133
	/**
-
 
134
	 * Encapsulates logic to come up with display-able text out of Bullet object
109
	 * 
135
	 * 
110
	 * @return String
136
	 * @return String Display-able text
111
	 */
137
	 */
112
	public String displayText() {
138
	public String displayText() {
113
		String displayText = "";
139
		String displayText = "";
114
		
140
		
115
		// Enumerated
141
		// Enumerated