1 18 package org.objectweb.speedo.mim.api; 19 20 import org.objectweb.jorm.api.PClassMapping; 21 import org.objectweb.jorm.util.api.Loggable; 22 import org.objectweb.perseus.persistence.api.TransactionalPersistenceManager; 23 import org.objectweb.speedo.pm.api.ProxyManager; 24 import org.objectweb.speedo.pm.api.ProxyManagerFactory; 25 import org.objectweb.speedo.query.api.QueryDefinition; 26 import org.objectweb.speedo.usercache.api.UserCacheManager; 27 28 import java.util.Collection ; 29 import java.util.Map ; 30 import java.util.Properties ; 31 32 import javax.jdo.listener.InstanceLifecycleListener; 33 34 35 41 public interface SpeedoHome extends PClassMapping, UserCacheManager, Loggable { 42 43 String getProjectName(); 44 45 48 boolean isDetachable(); 49 50 55 boolean isCacheable(); 56 57 boolean hasToFix(); 58 59 boolean allLoaded(); 60 61 65 void setCachePolicy(byte v); 66 byte NO_CACHE = 0; 67 byte CACHED = 1; 68 byte FIXED = 3; 69 byte ALL = 11; 70 71 75 boolean isFieldLockingLevel(); 76 77 81 void setFieldLockingLevel(boolean val); 82 83 89 byte getVersioningStrategy(); 90 91 95 ProxyManagerFactory getProxyManagerFactory(); 96 97 102 void setProxyManagerFactory(ProxyManagerFactory _pmf); 103 104 105 109 TransactionalPersistenceManager getTransactionalPersistenceManager(); 110 111 116 void setTransactionalPersistenceManager(TransactionalPersistenceManager _tpm); 117 118 127 SpeedoAccessor readIntention(SpeedoProxy sp, long[] fields); 128 129 143 SpeedoAccessor writeIntention(SpeedoProxy sp, long[] fields, Object thinLock); 144 145 SpeedoAccessor writeIntention(SpeedoProxy sp, long[] fields); 146 147 SpeedoAccessor getSpeedoAccessor(SpeedoProxy sp); 148 149 SpeedoProxy detachCopy(SpeedoProxy sp, 150 ProxyManager pm, 151 Map map, 152 Object clone, 153 Collection fgHints) ; 154 155 void attachCopy(SpeedoProxy sp, 156 ProxyManager pm, 157 Map map, 158 Object clone, 159 SpeedoAccessor sa, 160 boolean makeTransactional) ; 161 162 Properties getClassProperties(); 163 164 171 QueryDefinition addNamedQuery(String name, QueryDefinition query); 172 173 178 QueryDefinition removeNamedQuery(String name); 179 180 185 QueryDefinition getNamedQuery(String name); 186 187 188 void initSH(); 189 190 String getPath(); 191 192 196 void setPrefetchOnQuery(boolean prefetch); 197 198 boolean getPrefetchOnQuery(); 199 200 204 void setPrefetchOnExtent(boolean prefetch); 205 206 boolean getPrefetchOnExtent(); 207 208 212 void setPrefetchOnGenClass(boolean prefetch); 213 214 boolean getPrefetchOnGenClass(); 215 216 void addInstanceLifeCycleListener(InstanceLifecycleListener listener); 217 218 void removeInstanceLifeCycleListener(InstanceLifecycleListener listener); 219 220 void sendEvent(int eventType, Object source, Object target, boolean pre); 221 } 222 | Popular Tags |