1 5 package com.tc.object; 6 7 import com.tc.exception.ImplementMe; 8 import com.tc.object.applicator.ChangeApplicator; 9 import com.tc.object.dna.api.DNA; 10 import com.tc.object.dna.api.DNAWriter; 11 import com.tc.object.field.TCField; 12 import com.tc.object.tx.optimistic.OptimisticTransactionManager; 13 14 import java.lang.reflect.Constructor ; 15 import java.lang.reflect.Field ; 16 import java.util.Map ; 17 18 public class TestClassFactory implements TCClassFactory { 19 20 public TCClass getOrCreate(Class clazz, ClientObjectManager objectManager) { 21 return new MockTCClass(); 22 } 23 24 public ChangeApplicator createApplicatorFor(TCClass clazz, boolean indexed) { 25 throw new ImplementMe(); 26 } 27 28 public static class MockTCClass implements TCClass { 29 30 public boolean hasOnLoadExecuteScript() { 31 return false; 32 } 33 34 public boolean hasOnLoadMethod() { 35 return false; 36 } 37 38 public String getOnLoadMethod() { 39 return null; 40 } 41 42 public String getOnLoadExecuteScript() { 43 return null; 44 } 45 46 public Field getParentField() { 47 return null; 48 } 49 50 public String getParentFieldName() { 51 return null; 52 } 53 54 public TCField[] getPortableFields() { 55 return null; 56 } 57 58 public TraversedReferences getPortableObjects(Object pojo, TraversedReferences addTo) { 59 return addTo; 60 } 61 62 public Constructor getConstructor() { 63 return null; 64 } 65 66 public String getName() { 67 return null; 68 } 69 70 public Class getComponentType() { 71 return null; 72 } 73 74 public boolean isLogical() { 75 return false; 76 } 77 78 public TCClass getSuperclass() { 79 return null; 80 } 81 82 public boolean isNonStaticInner() { 83 return false; 84 } 85 86 public boolean isPortable() { 87 return false; 88 } 89 90 public TCField getField(String name) { 91 return null; 92 } 93 94 public boolean isIndexed() { 95 return false; 96 } 97 98 public void hydrate(TCObject tcObject, DNA dna, Object pojo, boolean force) { 99 } 101 102 public void dehydrate(TCObject tcObject, DNAWriter writer, Object pojo) { 103 } 105 106 public String getDefiningLoaderDescription() { 107 return null; 108 } 109 110 public TCObject createTCObject(ObjectID id, Object peer) { 111 return null; 112 } 113 114 public boolean isUseNonDefaultConstructor() { 115 return false; 116 } 117 118 public Object getNewInstanceFromNonDefaultConstructor(DNA dna) { 119 return null; 120 } 121 122 public Class getPeerClass() { 123 throw new ImplementMe(); 124 } 125 126 public Map connectedCopy(Object source, Object dest, Map visited, OptimisticTransactionManager txManager) { 127 throw new ImplementMe(); 128 } 129 130 public String getFieldNameByOffset(long fieldOffset) { 131 throw new ImplementMe(); 132 } 133 134 public ClientObjectManager getObjectManager() { 135 throw new ImplementMe(); 136 } 137 138 public boolean isProxyClass() { 139 return false; 140 } 141 142 public String getExtendingClassName() { 143 return getName(); 144 } 145 146 public boolean isEnum() { 147 return false; 148 } 149 150 } 151 } 152 | Popular Tags |