KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > TestTCObject


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object;
5
6 import com.tc.exception.ImplementMe;
7 import com.tc.object.dna.api.DNA;
8 import com.tc.object.dna.api.DNAException;
9 import com.tc.object.dna.api.DNAWriter;
10
11 import gnu.trove.TLinkable;
12
13 /**
14  * This is a plain vanilla mock object with no internal behavior, unlinke MockTCObject
15  */

16 public class TestTCObject implements TCObject {
17
18   private final Object JavaDoc peerObject;
19   private boolean isNew = false;
20   private TCClass tcClass;
21
22   public TestTCObject(Object JavaDoc myObject) {
23     this.peerObject = myObject;
24   }
25
26   public void setNext(TLinkable link) {
27     throw new ImplementMe();
28
29   }
30
31   public void setPrevious(TLinkable link) {
32     throw new ImplementMe();
33
34   }
35
36   public TLinkable getNext() {
37     throw new ImplementMe();
38   }
39
40   public TLinkable getPrevious() {
41     throw new ImplementMe();
42   }
43
44   public ObjectID getObjectID() {
45     return null;
46   }
47
48   public Object JavaDoc getPeerObject() {
49     return peerObject;
50   }
51
52   public void setTCClass(TCClass clazz) {
53     this.tcClass = clazz;
54   }
55
56   public TCClass getTCClass() {
57     return this.tcClass;
58   }
59
60   public int clearReferences(int toClear) {
61     throw new ImplementMe();
62   }
63
64   public Object JavaDoc getResolveLock() {
65     throw new ImplementMe();
66   }
67
68   public void objectFieldChanged(String JavaDoc classname, String JavaDoc fieldname, Object JavaDoc newValue, int index) {
69     throw new ImplementMe();
70
71   }
72
73   public void booleanFieldChanged(String JavaDoc classname, String JavaDoc fieldname, boolean newValue, int index) {
74     throw new ImplementMe();
75
76   }
77
78   public void byteFieldChanged(String JavaDoc classname, String JavaDoc fieldname, byte newValue, int index) {
79     throw new ImplementMe();
80
81   }
82
83   public void charFieldChanged(String JavaDoc classname, String JavaDoc fieldname, char newValue, int index) {
84     throw new ImplementMe();
85
86   }
87
88   public void doubleFieldChanged(String JavaDoc classname, String JavaDoc fieldname, double newValue, int index) {
89     throw new ImplementMe();
90
91   }
92
93   public void floatFieldChanged(String JavaDoc classname, String JavaDoc fieldname, float newValue, int index) {
94     throw new ImplementMe();
95
96   }
97
98   public void intFieldChanged(String JavaDoc classname, String JavaDoc fieldname, int newValue, int index) {
99     throw new ImplementMe();
100
101   }
102
103   public void longFieldChanged(String JavaDoc classname, String JavaDoc fieldname, long newValue, int index) {
104     throw new ImplementMe();
105
106   }
107
108   public void shortFieldChanged(String JavaDoc classname, String JavaDoc fieldname, short newValue, int index) {
109     throw new ImplementMe();
110
111   }
112
113   public void logicalInvoke(int method, String JavaDoc methodName, Object JavaDoc[] parameters) {
114     throw new ImplementMe();
115
116   }
117
118   public void hydrate(DNA from, boolean force) throws DNAException {
119     throw new ImplementMe();
120
121   }
122
123   public void resolveReference(String JavaDoc fieldName) {
124     throw new ImplementMe();
125
126   }
127
128   public void resolveArrayReference(int index) {
129     throw new ImplementMe();
130
131   }
132
133   public void setReference(String JavaDoc fieldName, ObjectID id) {
134     throw new ImplementMe();
135
136   }
137
138   public void clearReference(String JavaDoc fieldName) {
139     throw new ImplementMe();
140
141   }
142
143   public void setValue(String JavaDoc fieldName, Object JavaDoc obj) {
144     throw new ImplementMe();
145
146   }
147
148   public long getVersion() {
149     throw new ImplementMe();
150   }
151
152   public void setVersion(long version) {
153     throw new ImplementMe();
154
155   }
156
157   public void dehydrate(DNAWriter writer) throws DNAException {
158     throw new ImplementMe();
159
160   }
161
162   public void markAccessed() {
163     throw new ImplementMe();
164
165   }
166
167   public void clearAccessed() {
168     throw new ImplementMe();
169
170   }
171
172   public boolean recentlyAccessed() {
173     throw new ImplementMe();
174   }
175
176   public void resolveAllReferences() {
177     throw new ImplementMe();
178   }
179
180   public boolean getAndResetNew() {
181     boolean rv = isNew;
182     this.isNew = false;
183     return rv;
184   }
185
186   public void setIsNew() {
187     this.isNew = true;
188   }
189
190   public boolean isNew() {
191     return this.isNew;
192   }
193
194   public boolean isShared() {
195     return true;
196   }
197
198   public void objectFieldChangedByOffset(String JavaDoc classname, long fieldOffset, Object JavaDoc newValue, int index) {
199     throw new ImplementMe();
200   }
201
202   public void logicalInvoke(Object JavaDoc object, String JavaDoc methodSignature, Object JavaDoc[] params) {
203     throw new ImplementMe();
204   }
205
206   public void disableAutoLocking() {
207     throw new ImplementMe();
208   }
209
210   public boolean autoLockingDisabled() {
211     return false;
212   }
213
214   public String JavaDoc getFieldNameByOffset(long fieldOffset) {
215     throw new ImplementMe();
216   }
217
218   public boolean canEvict() {
219     throw new ImplementMe();
220   }
221
222   public void objectArrayChanged(int startPos, Object JavaDoc[] array, int length) {
223     throw new ImplementMe();
224   }
225
226   public void primitiveArrayChanged(int startPos, Object JavaDoc array, int length) {
227     throw new ImplementMe();
228   }
229
230   public int accessCount(int factor) {
231     throw new ImplementMe();
232   }
233
234   public void literalValueChanged(Object JavaDoc newValue, Object JavaDoc oldValue) {
235     throw new ImplementMe();
236   }
237
238   public void setLiteralValue(Object JavaDoc newValue) {
239     throw new ImplementMe();
240   }
241
242   public ArrayIndexOutOfBoundsException JavaDoc checkArrayIndex(int index) {
243     throw new ImplementMe();
244   }
245 }
246
Popular Tags