Subversion Repositories SmartDukaan

Rev

Rev 1061 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 shop2020 1
/**
2
 * 
3
 */
4
package in.shop2020.metamodel.core;
5
 
6
import in.shop2020.metamodel.util.MetaModelComponent;
7
 
8
 
9
/**
45 naveen 10
 * Represents structured data and un-structured content about a Feature. 
11
 * It is the leaf component of shop2020 Content Meta-model hierarchy. 
10 shop2020 12
 * 
13
 * @author naveen
14
 *
15
 */
16
public class Bullet extends MetaModelComponent {
17
	/**
18
	 * 
19
	 */
20
	private static final long serialVersionUID = 1L;
45 naveen 21
 
22
	/**
23
	 * Structured data part of the bullet instance
24
	 */
10 shop2020 25
	private BulletDataObject dataObject;
45 naveen 26
 
27
	/**
28
	 * Un-structured free-form part of bullet instance
29
	 */
10 shop2020 30
	private FreeformContent freeformContent;
31
 
32
	/**
99 naveen 33
	 * Reference to Bullet's unit
34
	 */
35
	private long unitID;
36
 
37
	/**
10 shop2020 38
	 * 
45 naveen 39
	 * @param dataObject mandatory structured data instance
10 shop2020 40
	 */
20 naveen 41
	public Bullet(BulletDataObject dataObject) {
42
		this.dataObject = dataObject;
10 shop2020 43
	}
44
 
45
	/**
46
	 * @param dataObject the dataObject to set
47
	 */
48
	public void setDataObject(BulletDataObject dataObject) {
49
		this.dataObject = dataObject;
50
	}
51
 
52
	/**
53
	 * @return the dataObject
54
	 */
55
	public BulletDataObject getDataObject() {
56
		return this.dataObject;
57
	}
58
 
59
    /**
60
     * 
61
     * @return freeformContent
62
     *     
63
     */
64
    public FreeformContent getFreeformContent() {
65
        return this.freeformContent;
66
    }
67
 
8763 amit.gupta 68
    Bullet() {
69
 
70
	}
71
 
72
	/**
10 shop2020 73
     * 
43 naveen 74
     * @param value the FreeformContent to set
10 shop2020 75
     *     
76
     */
77
    public void setFreeformContent(FreeformContent value) {
78
        this.freeformContent = value;
79
    }
80
 
81 naveen 81
 
82
	/**
83
	 * True if BulletDataObject is same
84
	 */
85
	public boolean equals(Object obj) {
86
		if(this.dataObject != null && obj instanceof Bullet) {
87
			return this.dataObject.equals(((Bullet)obj).getDataObject());
88
		}
89
 
90
		return false;
91
	}
99 naveen 92
 
93
	/**
94
	 * @param unitID the unitID to set
95
	 */
96
	public void setUnitID(long unitID) {
97
		this.unitID = unitID;
98
	}
99
 
100
	/**
101
	 * @return the unitID
102
	 */
103
	public long getUnitID() {
104
		return unitID;
105
	}
106
 
20 naveen 107
	/* (non-Javadoc)
108
	 * @see java.lang.Object#toString()
109
	 */
110
	@Override
111
	public String toString() {
112
		return "Bullet [dataObject=" + dataObject + ", freeformContent="
99 naveen 113
				+ freeformContent + ", unitID=" + unitID + "]";
20 naveen 114
	}
115
 
10 shop2020 116
}