1 4 package com.tc.object; 5 6 import com.tc.object.cache.Cacheable; 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 public interface TCObject extends Cacheable { 14 public static final Long NULL_OBJECT_ID = new Long (-1); 15 public static final int NULL_INDEX = -1; 16 17 public void setNext(TLinkable link); 18 19 public void setPrevious(TLinkable link); 20 21 public TLinkable getNext(); 22 23 public TLinkable getPrevious(); 24 25 public ObjectID getObjectID(); 26 27 public boolean isShared(); 28 29 32 public Object getPeerObject(); 33 34 37 public TCClass getTCClass(); 38 39 43 public int clearReferences(int toClear); 44 45 public Object getResolveLock(); 46 47 public void objectFieldChanged(String classname, String fieldname, Object newValue, int index); 48 49 public void booleanFieldChanged(String classname, String fieldname, boolean newValue, int index); 50 51 public void byteFieldChanged(String classname, String fieldname, byte newValue, int index); 52 53 public void charFieldChanged(String classname, String fieldname, char newValue, int index); 54 55 public void doubleFieldChanged(String classname, String fieldname, double newValue, int index); 56 57 public void floatFieldChanged(String classname, String fieldname, float newValue, int index); 58 59 public void intFieldChanged(String classname, String fieldname, int newValue, int index); 60 61 public void longFieldChanged(String classname, String fieldname, long newValue, int index); 62 63 public void shortFieldChanged(String classname, String fieldname, short newValue, int index); 64 65 public void objectArrayChanged(int startPos, Object [] array, int length); 66 67 public void primitiveArrayChanged(int startPos, Object array, int length); 68 69 public void literalValueChanged(Object newValue, Object oldValue); 70 71 public void setLiteralValue(Object newValue); 72 73 79 public void hydrate(DNA from, boolean force) throws ClassNotFoundException ; 80 81 public ArrayIndexOutOfBoundsException checkArrayIndex(int index); 82 83 public void resolveReference(String fieldName); 84 85 public void resolveArrayReference(int index); 86 87 public void resolveAllReferences(); 88 89 public void setReference(String fieldName, ObjectID id); 90 91 public void clearReference(String fieldName); 92 93 public void setValue(String fieldName, Object obj); 94 95 public long getVersion(); 96 97 public void setVersion(long version); 98 99 102 public void dehydrate(DNAWriter writer) throws DNAException; 103 104 public boolean getAndResetNew(); 105 106 public void setIsNew(); 107 108 public boolean isNew(); 109 110 public void objectFieldChangedByOffset(String classname, long fieldOffset, Object newValue, int index); 111 112 public String getFieldNameByOffset(long fieldOffset); 113 114 public void logicalInvoke(int method, String methodSignature, Object [] params); 115 116 public void disableAutoLocking(); 117 118 public boolean autoLockingDisabled(); 119 } 120 121 122 | Popular Tags |