Subversion Repositories SmartDukaan

Rev

Rev 323 | Go to most recent revision | 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
 
68
    /**
69
     * 
43 naveen 70
     * @param value the FreeformContent to set
10 shop2020 71
     *     
72
     */
73
    public void setFreeformContent(FreeformContent value) {
74
        this.freeformContent = value;
75
    }
76
 
81 naveen 77
 
78
	/**
79
	 * True if BulletDataObject is same
80
	 */
81
	public boolean equals(Object obj) {
82
		if(this.dataObject != null && obj instanceof Bullet) {
83
			return this.dataObject.equals(((Bullet)obj).getDataObject());
84
		}
85
 
86
		return false;
87
	}
99 naveen 88
 
89
	/**
90
	 * @param unitID the unitID to set
91
	 */
92
	public void setUnitID(long unitID) {
93
		this.unitID = unitID;
94
	}
95
 
96
	/**
97
	 * @return the unitID
98
	 */
99
	public long getUnitID() {
100
		return unitID;
101
	}
102
 
20 naveen 103
	/* (non-Javadoc)
104
	 * @see java.lang.Object#toString()
105
	 */
106
	@Override
107
	public String toString() {
108
		return "Bullet [dataObject=" + dataObject + ", freeformContent="
99 naveen 109
				+ freeformContent + ", unitID=" + unitID + "]";
20 naveen 110
	}
111
 
10 shop2020 112
}