1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.caleigo.core;
19
20 /*** <Description of ContainedAbstractEntity>
21 *
22 * @author Dennis Zikovic
23 * @version 1.00
24 *
25 *//*
26 *
27 * WHEN WHO WHY & WHAT
28 * ------------------------------------------------------------------------------
29 * 2001-07-9 Dennis Zikovic Creation
30 */
31 public abstract class AbstractDataObjectEntity extends AbstractEntity
32 {
33
34 private Object[] mFieldData;
35
36
37
38 public AbstractDataObjectEntity()
39 {
40 }
41
42 public AbstractDataObjectEntity(Qualifier identityQualifier)
43 {
44 super(identityQualifier);
45 }
46
47
48
49 /*** Return the entity objects IEntityDescriptor that defines it's type and
50 * structure. Enables extended means of reflection for the entity.
51 */
52 public abstract IEntityDescriptor getEntityDescriptor();
53
54
55
56 /*** Return the contained indexed data avoidinng any convertions
57 * or formating. Note the package scope used to avoid missuse.
58 */
59 Object getRawData(int index)
60 {
61 if(mFieldData==null)
62 mFieldData = new Object[this.getEntityDescriptor().getDataFieldCount()];
63 return mFieldData[index];
64 }
65
66 /*** Sets the indexed data avoiding any convertions or format changes.
67 * Does not update any flags or fire any event handled by the
68 * AbstractEntityDescriptor. Note the package scope used to avoid missuse.
69 */
70 void setRawData(int index, Object data)
71 {
72 if(mFieldData==null)
73 mFieldData = new Object[this.getEntityDescriptor().getDataFieldCount()];
74 mFieldData[index] = data;
75 }
76 }