1 2 12 package com.versant.core.ejb; 13 14 import com.versant.core.jdo.VersantPMInternal; 15 import com.versant.core.jdo.VersantPersistenceManager; 16 import com.versant.core.jdo.LifecycleListener; 17 import com.versant.core.server.QueryResultWrapper; 18 import com.versant.core.server.CompiledQuery; 19 import com.versant.core.common.QueryResultContainer; 20 import com.versant.core.common.StatesReturned; 21 import com.versant.core.common.BindingSupportImpl; 22 23 import javax.jdo.Query; 24 import javax.jdo.Transaction; 25 import javax.jdo.Extent; 26 import javax.jdo.PersistenceManagerFactory; 27 import javax.jdo.spi.PersistenceCapable; 28 import java.sql.Connection ; 29 import java.util.List ; 30 import java.util.Collection ; 31 32 35 public class EMProxy implements VersantPersistenceManager, VersantPMInternal { 36 private EntityManagerImp em; 37 38 public EMProxy(EntityManagerImp em) { 39 this.em = em; 40 } 41 42 public EntityManagerImp getEm() { 43 return em; 44 } 45 46 public void detach() { 47 em = null; 48 } 49 50 private void checkClosed() { 51 if (em == null) { 52 throw BindingSupportImpl.getInstance().invalidOperation( 53 "The pm is closed"); 54 } 55 } 56 57 58 public boolean isInterceptDfgFieldAccess() { 59 return false; 60 } 61 62 public void setInterceptDfgFieldAccess(boolean interceptDfgFieldAccess) { 63 } 65 66 public void cancelQueryExecution() { 67 } 69 70 public boolean isDirty() { 71 return em.isDirty(); 72 } 73 74 public Object getObjectByIDString(String value, boolean toValidate) { 75 return null; 76 } 77 78 public Object newObjectIdInstance(Class pcClass, String str, boolean resolved) { 79 return null; 80 } 81 82 public Object getObjectByIDString(String value, boolean toValidate, boolean resolved) { 83 return null; 84 } 85 86 public void loadFetchGroup(Object pc, String name) { 87 } 88 89 public void flush() { 90 em.flush(); 91 } 92 93 public void flush(boolean retainValues) { 94 em.flush(); 95 } 96 97 public Connection getJdbcConnection(String datastore) { 98 return null; 99 } 100 101 public String getConnectionURL(String dataStore) { 102 return null; 103 } 104 105 public String getConnectionDriverName(String dataStore) { 106 return null; 107 } 108 109 public void makeTransientRecursive(Object pc) { 110 } 111 112 public List versantAllDirtyInstances() { 113 return em.versantAllDirtyInstances(); 114 } 115 116 public void setDatastoreTxLocking(int mode) { 117 em.setDatastoreTxLocking(mode); 118 } 119 120 public int getDatastoreTxLocking() { 121 return 0; } 123 124 public Object getObjectByIdFromCache(Object oid) { 125 return null; } 127 128 public boolean isHollow(Object pc) { 129 return false; } 131 132 public boolean hasIdentity(Object pc) { 133 return false; } 135 136 public void logEvent(int level, String description, int ms) { 137 } 139 140 public int getObjectsById(Object [] oids, int length, Object [] data, int stateFieldNo, int classMetaDataIndex) { 141 return 0; } 143 144 public Query versantNewNamedQuery(Class cls, String queryName) { 145 return null; } 147 148 public Collection versantDetachCopy(Collection pcs, String fetchGroup) { 149 return null; } 151 152 public boolean isCheckModelConsistencyOnCommit() { 153 return false; } 155 156 public void setCheckModelConsistencyOnCommit(boolean on) { 157 } 159 160 public void checkModelConsistency() { 161 } 163 164 public Collection versantAttachCopy(Collection detached, boolean makeTransactional) { 165 return null; } 167 168 public Collection versantAttachCopy(Collection detached, boolean makeTransactional, boolean shallow) { 169 return null; } 171 172 public void setPmCacheRefType(Object pc, int type) { 173 } 175 176 public void setPmCacheRefType(Object [] pcs, int type) { 177 } 179 180 public void setPmCacheRefType(Collection col, int type) { 181 } 183 184 public void setPmCacheRefType(int type) { 185 } 187 188 public int getPmCacheRefType() { 189 return 0; } 191 192 public void setRetainConnectionInOptTx(boolean on) { 193 } 195 196 public void evictFromL2CacheAfterCommit(Object o) { 197 } 199 200 public void evictAllFromL2CacheAfterCommit(Object [] a) { 201 } 203 204 public void evictAllFromL2CacheAfterCommit(Collection c) { 205 } 207 208 public void evictAllFromL2CacheAfterCommit(Class cls, boolean includeSubclasses) { 209 } 211 212 public void evictAllFromL2CacheAfterCommit() { 213 } 215 216 public Object getOptimisticLockingValue(Object o) { 217 return null; } 219 220 public void addLifecycleListener(LifecycleListener listener, Class [] classes) { 221 } 223 224 public void removeLifecycleListener(LifecycleListener listener) { 225 } 227 228 public boolean isClosed() { 229 return false; } 231 232 public void close() { 233 } 235 236 public Transaction currentTransaction() { 237 return null; } 239 240 public void evict(Object pc) { 241 } 243 244 public void evictAll(Object [] pcs) { 245 } 247 248 public void evictAll(Collection pcs) { 249 } 251 252 public void evictAll() { 253 } 255 256 public void refresh(Object pc) { 257 } 259 260 public void refreshAll(Object [] pcs) { 261 } 263 264 public void refreshAll(Collection pcs) { 265 } 267 268 public void refreshAll() { 269 } 271 272 public Query newQuery() { 273 return null; } 275 276 public Query newQuery(Object compiled) { 277 return null; } 279 280 public Query newQuery(String language, Object query) { 281 return null; } 283 284 public Query newQuery(Class cls) { 285 return null; } 287 288 public Query newQuery(Extent cln) { 289 return null; } 291 292 public Query newQuery(Class cls, Collection cln) { 293 return null; } 295 296 public Query newQuery(Class cls, String filter) { 297 return null; } 299 300 public Query newQuery(Class cls, Collection cln, String filter) { 301 return null; } 303 304 public Query newQuery(Extent cln, String filter) { 305 return null; } 307 308 public Extent getExtent(Class persistenceCapableClass, boolean subclasses) { 309 return null; } 311 312 public Object getObjectById(Object oid, boolean validate) { 313 return em.getObjectById(oid, validate); 314 } 315 316 public Object getObjectId(Object pc) { 317 return null; } 319 320 public Object getTransactionalObjectId(Object pc) { 321 return null; } 323 324 public Object newObjectIdInstance(Class pcClass, String str) { 325 return null; } 327 328 public void makePersistent(Object pc) { 329 } 331 332 public void makePersistentAll(Object [] pcs) { 333 } 335 336 public void makePersistentAll(Collection pcs) { 337 } 339 340 public void deletePersistent(Object pc) { 341 } 343 344 public void deletePersistentAll(Object [] pcs) { 345 } 347 348 public void deletePersistentAll(Collection pcs) { 349 } 351 352 public void makeTransient(Object pc) { 353 } 355 356 public void makeTransientAll(Object [] pcs) { 357 } 359 360 public void makeTransientAll(Collection pcs) { 361 } 363 364 public void makeTransactional(Object pc) { 365 } 367 368 public void makeTransactionalAll(Object [] pcs) { 369 } 371 372 public void makeTransactionalAll(Collection pcs) { 373 } 375 376 public void makeNontransactional(Object pc) { 377 } 379 380 public void makeNontransactionalAll(Object [] pcs) { 381 } 383 384 public void makeNontransactionalAll(Collection pcs) { 385 } 387 388 public void retrieve(Object pc) { 389 } 391 392 public void retrieveAll(Collection pcs) { 393 } 395 396 public void retrieveAll(Collection pcs, boolean DFGOnly) { 397 } 399 400 public void retrieveAll(Object [] pcs) { 401 } 403 404 public void retrieveAll(Object [] pcs, boolean DFGOnly) { 405 } 407 408 public void setUserObject(Object o) { 409 } 411 412 public Object getUserObject() { 413 return null; } 415 416 public PersistenceManagerFactory getPersistenceManagerFactory() { 417 return null; } 419 420 public Class getObjectIdClass(Class cls) { 421 return null; } 423 424 public void setMultithreaded(boolean flag) { 425 } 427 428 public boolean getMultithreaded() { 429 return false; 430 } 431 432 public void setIgnoreCache(boolean flag) { 433 } 435 436 public boolean getIgnoreCache() { 437 return false; } 439 440 public QueryResultWrapper executeQuery(CompiledQuery cq, Object [] params) { 441 return null; } 443 444 public QueryResultContainer getNextQueryResult(QueryResultWrapper aQrs, int skipAmount) { 445 return null; } 447 448 public void closeQuery(QueryResultWrapper qrw) { 449 } 451 452 public void flushIfDepOn(int[] bits) { 453 em.flushIfDepOn(bits); 454 } 455 456 457 458 459 public void processLocalCacheReferenceQueue() { 460 } 461 462 public void addToCache(StatesReturned container) { 463 em.addToCache(container); 464 } 465 466 public QueryResultContainer getAbsolute(QueryResultWrapper qrsIF, int index, int fetchAmount) { 467 return null; 468 } 469 470 public int getResultCount(QueryResultWrapper qrsIF) { 471 return 0; 472 } 473 474 public int getQueryRowCount(CompiledQuery cq, Object [] params) { 475 return 0; 476 } 477 478 public QueryResultContainer getAllQueryResults(CompiledQuery cq, Object [] params) { 479 return em.getStorageManager().executeQueryAll(em, null, cq, params); 480 } 481 482 public void setMasterOnDetail(PersistenceCapable detail, int managedFieldNo, PersistenceCapable master, boolean removeFromCurrentMaster) { 483 } 484 485 public Object getObjectField(PersistenceCapable pc, int fieldNo) { 486 return null; 487 } 488 } 489 | Popular Tags |