1 16 17 21 22 package javax.jdo; 23 24 import java.util.Collection ; 25 26 import javax.jdo.datastore.JDOConnection; 27 import javax.jdo.datastore.Sequence; 28 29 import javax.jdo.listener.InstanceLifecycleListener; 30 31 41 42 public interface PersistenceManager { 43 48 boolean isClosed (); 49 50 62 void close (); 63 64 71 Transaction currentTransaction(); 72 73 80 void evict (Object pc); 81 82 86 void evictAll (Object [] pcs); 87 88 92 void evictAll (Collection pcs); 93 94 100 void evictAll (); 101 102 111 void refresh (Object pc); 112 113 118 void refreshAll (Object [] pcs); 119 120 125 void refreshAll (Collection pcs); 126 127 133 void refreshAll (); 134 135 140 void refreshAll (JDOException jdoe); 141 142 145 Query newQuery (); 146 147 156 Query newQuery (Object compiled); 157 158 164 Query newQuery (String query); 165 166 171 Query newQuery (String language, Object query); 172 173 177 Query newQuery (Class cls); 178 179 184 Query newQuery (Extent cln); 185 186 192 Query newQuery (Class cls, Collection cln); 193 194 200 Query newQuery (Class cls, String filter); 201 202 209 Query newQuery (Class cls, Collection cln, String filter); 210 211 218 Query newQuery (Extent cln, String filter); 219 220 228 Query newNamedQuery (Class cls, String queryName); 229 230 242 Extent getExtent (Class persistenceCapableClass, boolean subclasses); 243 244 250 Extent getExtent (Class persistenceCapableClass); 251 252 309 Object getObjectById (Object oid, boolean validate); 310 311 319 Object getObjectById (Class cls, Object key); 320 321 327 Object getObjectById (Object oid); 328 329 363 Object getObjectId (Object pc); 364 365 380 Object getTransactionalObjectId (Object pc); 381 382 389 Object newObjectIdInstance (Class pcClass, Object key); 390 391 401 Collection getObjectsById (Collection oids, boolean validate); 402 403 413 Collection getObjectsById (Collection oids); 414 415 425 Object [] getObjectsById (Object [] oids, boolean validate); 426 427 437 Object [] getObjectsById (Object [] oids); 438 439 452 void makePersistent (Object pc); 453 454 458 void makePersistentAll (Object [] pcs); 459 460 464 void makePersistentAll (Collection pcs); 465 466 478 void deletePersistent (Object pc); 479 480 484 void deletePersistentAll (Object [] pcs); 485 486 490 void deletePersistentAll (Collection pcs); 491 492 499 void makeTransient (Object pc); 500 501 508 void makeTransientAll (Object [] pcs); 509 510 517 void makeTransientAll (Collection pcs); 518 519 534 void makeTransactional (Object pc); 535 536 540 void makeTransactionalAll (Object [] pcs); 541 542 546 void makeTransactionalAll (Collection pcs); 547 548 557 void makeNontransactional (Object pc); 558 559 564 void makeNontransactionalAll (Object [] pcs); 565 566 571 void makeNontransactionalAll (Collection pcs); 572 573 580 void retrieve (Object pc); 581 582 589 void retrieveAll (Collection pcs); 590 591 602 void retrieveAll (Collection pcs, boolean DFGOnly); 603 604 611 void retrieveAll (Object [] pcs); 612 613 624 void retrieveAll (Object [] pcs, boolean DFGOnly); 625 626 632 void setUserObject (Object o); 633 634 640 Object getUserObject (); 641 642 647 PersistenceManagerFactory getPersistenceManagerFactory(); 648 649 662 Class getObjectIdClass(Class cls); 663 664 672 void setMultithreaded (boolean flag); 673 674 678 boolean getMultithreaded(); 679 680 686 void setIgnoreCache(boolean flag); 687 688 694 boolean getIgnoreCache(); 695 702 Object detachCopy (Object pc); 703 704 711 Collection detachCopyAll (Collection pcs); 712 713 733 Object [] detachCopyAll (Object [] pcs); 734 735 746 Object attachCopy (Object pc, boolean makeTransactional); 747 748 759 Collection attachCopyAll (Collection pcs, boolean makeTransactional); 760 761 776 Object [] attachCopyAll (Object [] pcs, boolean makeTransactional); 777 778 782 Object putUserObject (Object key, Object val); 783 784 790 Object getUserObject (Object key); 791 792 797 Object removeUserObject (Object key); 798 799 815 void flush (); 816 817 837 void checkConsistency (); 838 839 845 FetchPlan getFetchPlan (); 846 847 855 Object newInstance (Class pcClass); 856 857 863 Sequence getSequence (String name); 864 865 874 JDOConnection getDataStoreConnection (); 875 876 889 void addInstanceLifecycleListener (InstanceLifecycleListener listener, 890 Class [] classes); 891 892 897 void removeInstanceLifecycleListener (InstanceLifecycleListener listener); 898 } 899 | Popular Tags |