1 5 package com.tc.objectserver.core.api; 6 7 import com.tc.object.ObjectID; 8 import com.tc.object.dna.api.DNA; 10 import com.tc.object.dna.api.DNACursor; 11 import com.tc.object.dna.api.DNAException; 12 13 16 public class TestDNA implements DNA { 17 public DNACursor cursor; 18 public ObjectID objectID; 19 public long version; 20 public String typeName = "SomeClassName"; 21 public ObjectID parentObjectID = ObjectID.NULL_ID; 22 private boolean isDelta; 23 public String loaderDesc = "system.loader"; 24 25 public TestDNA(DNACursor cursor) { 26 this.cursor = cursor; 27 } 28 29 public TestDNA(DNACursor cursor, String className) { 30 this.cursor = cursor; 31 this.typeName = className; 32 } 33 34 public TestDNA(ObjectID oid) { 35 this.objectID = oid; 36 37 } 38 39 public TestDNA(ObjectID id, boolean isDelta) { 40 this.objectID = id; 41 this.isDelta = isDelta; 42 } 43 44 47 48 public String getTypeName() { 49 return typeName; 50 } 51 52 public ObjectID getObjectID() throws DNAException { 53 return objectID; 54 } 55 56 public DNACursor getCursor() { 57 return cursor; 58 } 59 60 public boolean hasLength() { 61 return false; 62 } 63 64 public int getArraySize() { 65 return 0; 66 } 67 68 public String getDefiningLoaderDescription() { 69 return loaderDesc; 70 } 71 72 public ObjectID getParentObjectID() throws DNAException { 73 return parentObjectID; 74 } 75 76 public void setHeaderInformation(ObjectID id, ObjectID parentID, String type, int length, long version) 77 throws DNAException { 78 return; 79 } 80 81 public void addPhysicalAction(String field, Object value) throws DNAException { 82 return; 83 } 84 85 public void addLogicalAction(int method, Object [] parameters) { 86 return; 87 } 88 89 public long getVersion() { 90 return this.version; 91 } 92 93 public boolean isDelta() { 94 return isDelta; 95 } 96 97 public String toString() { 98 return "TestDNA(" + objectID + ", version = " + version + ")"; 99 } 100 } 101 | Popular Tags |