1 package org.apache.ojb.broker; 2 3 17 18 import org.apache.ojb.broker.accesslayer.ConnectionManagerIF; 19 import org.apache.ojb.broker.accesslayer.JdbcAccess; 20 import org.apache.ojb.broker.accesslayer.StatementManagerIF; 21 import org.apache.ojb.broker.accesslayer.sql.SqlGenerator; 22 import org.apache.ojb.broker.cache.ObjectCache; 23 import org.apache.ojb.broker.metadata.ClassDescriptor; 24 import org.apache.ojb.broker.metadata.DescriptorRepository; 25 import org.apache.ojb.broker.query.Query; 26 import org.apache.ojb.broker.util.BrokerHelper; 27 import org.apache.ojb.broker.util.ObjectModification; 28 import org.apache.ojb.broker.util.configuration.Configurable; 29 import org.apache.ojb.broker.util.sequence.SequenceManager; 30 import org.odbms.ObjectContainer; 31 32 import java.util.Collection ; 33 import java.util.Enumeration ; 34 import java.util.Iterator ; 35 36 47 public interface PersistenceBroker extends Configurable, ObjectContainer 48 { 49 53 58 public StatementManagerIF serviceStatementManager(); 59 60 65 public ConnectionManagerIF serviceConnectionManager(); 66 67 72 public SqlGenerator serviceSqlGenerator(); 73 74 79 public JdbcAccess serviceJdbcAccess(); 80 81 86 public SequenceManager serviceSequenceManager(); 87 88 94 public BrokerHelper serviceBrokerHelper(); 95 96 102 public ObjectCache serviceObjectCache(); 103 104 109 public IdentityFactory serviceIdentity(); 110 111 112 116 121 public void fireBrokerEvent(PersistenceBrokerEvent event); 122 123 128 public void fireBrokerEvent(PBLifeCycleEvent event); 129 130 135 public void fireBrokerEvent(PBStateEvent event); 136 137 143 public void removeAllListeners() throws PersistenceBrokerException; 144 145 153 public void removeAllListeners(boolean permanent) throws PersistenceBrokerException; 154 155 156 164 public void addListener(PBListener listener) throws PersistenceBrokerException; 165 166 183 public void addListener(PBListener listener, boolean permanent) throws PersistenceBrokerException; 184 185 190 public void removeListener(PBListener listener) throws PersistenceBrokerException; 191 192 193 197 203 public void abortTransaction() throws TransactionNotInProgressException; 204 205 210 public void beginTransaction() throws TransactionInProgressException, TransactionAbortedException; 211 212 220 public void commitTransaction() throws TransactionNotInProgressException, TransactionAbortedException; 221 222 227 public boolean isInTransaction() throws PersistenceBrokerException; 228 229 235 public boolean close(); 236 237 242 public boolean isClosed(); 243 244 245 246 250 255 public DescriptorRepository getDescriptorRepository(); 256 257 262 public PBKey getPBKey(); 263 264 273 public ClassDescriptor getClassDescriptor(Class clazz) throws PersistenceBrokerException; 274 275 282 public boolean hasClassDescriptor(Class clazz); 283 284 294 public Class getTopLevelClass(Class clazz) throws PersistenceBrokerException; 295 296 300 303 public void clearCache() throws PersistenceBrokerException; 304 305 313 public void removeFromCache(Object objectOrIdentity) throws PersistenceBrokerException; 314 315 322 public void store(Object obj, 323 ObjectModification modification) throws PersistenceBrokerException; 324 325 331 public void store(Object obj) throws PersistenceBrokerException; 332 333 339 public void delete(Object obj) throws PersistenceBrokerException; 340 341 353 public void deleteMtoNImplementor(MtoNImplementor m2nImpl) throws PersistenceBrokerException; 354 355 364 public void addMtoNImplementor(MtoNImplementor m2nImpl) throws PersistenceBrokerException; 365 366 374 public void deleteByQuery(Query query) throws PersistenceBrokerException; 375 376 380 386 public void retrieveAllReferences(Object obj) throws PersistenceBrokerException; 387 388 394 public void retrieveReference(Object obj, String attrName) throws PersistenceBrokerException; 395 396 402 public int getCount(Query query) throws PersistenceBrokerException; 403 404 411 public Collection getCollectionByQuery(Query query) throws PersistenceBrokerException; 412 413 423 public ManageableCollection getCollectionByQuery(Class collectionClass, Query query) 424 throws PersistenceBrokerException; 425 426 435 public Iterator getIteratorByQuery(Query query) throws PersistenceBrokerException; 436 437 445 public Iterator getReportQueryIteratorByQuery(Query query) throws PersistenceBrokerException; 446 447 455 public Object getObjectByIdentity(Identity id) throws PersistenceBrokerException; 456 457 464 public Object getObjectByQuery(Query query) throws PersistenceBrokerException; 465 466 475 public Enumeration getPKEnumerationByQuery(Class pkClass, Query query) 476 throws PersistenceBrokerException; 477 } 478 | Popular Tags |