org.apache.ojb.broker.core
Class PersistenceBrokerHandle

java.lang.Object
  extended byorg.apache.ojb.broker.core.DelegatingPersistenceBroker
      extended byorg.apache.ojb.broker.core.PersistenceBrokerHandle
All Implemented Interfaces:
org.apache.ojb.broker.util.configuration.Configurable, ObjectContainer, PBState, PersistenceBroker, PersistenceBrokerInternal

public class PersistenceBrokerHandle
extends DelegatingPersistenceBroker


Constructor Summary
PersistenceBrokerHandle(PersistenceBrokerInternal broker)
          Constructor for the handle, set itself in PersistenceBrokerThreadMapping.setCurrentPersistenceBroker(org.apache.ojb.broker.PBKey, org.apache.ojb.broker.PersistenceBrokerInternal)
 
Method Summary
 boolean close()
          Destroy this handle and return the underlying (wrapped) PB instance to pool (when using default implementation of PersistenceBrokerFactory), unset this instance from PersistenceBrokerThreadMapping.
 boolean isClosed()
          Determines whether this broker is closed.
 boolean isInTransaction()
          Determines whether there is currently a transaction in progress.
 
Methods inherited from class org.apache.ojb.broker.core.DelegatingPersistenceBroker
abortTransaction, addListener, addListener, addMtoNImplementor, beginTransaction, checkRefreshRelationships, clearCache, commitTransaction, configure, createProxy, delete, delete, deleteByQuery, deleteMtoNImplementor, fireBrokerEvent, fireBrokerEvent, fireBrokerEvent, getClassDescriptor, getCollectionByQuery, getCollectionByQuery, getCount, getDelegate, getDescriptorRepository, getInnermostDelegate, getIteratorByQuery, getObjectByIdentity, getObjectByQuery, getPBKey, getPKEnumerationByQuery, getProxyFactory, getReferenceBroker, getRelationshipPrefetcherFactory, getReportQueryIteratorByQuery, getTopLevelClass, hasClassDescriptor, isManaged, query, removeAllListeners, removeAllListeners, removeFromCache, removeListener, retrieveAllReferences, retrieveReference, serviceBrokerHelper, serviceConnectionManager, serviceIdentity, serviceJdbcAccess, serviceObjectCache, serviceSequenceManager, serviceSqlGenerator, serviceStatementManager, setClosed, setDelegate, setManaged, store, store, store
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceBrokerHandle

public PersistenceBrokerHandle(PersistenceBrokerInternal broker)
Constructor for the handle, set itself in PersistenceBrokerThreadMapping.setCurrentPersistenceBroker(org.apache.ojb.broker.PBKey, org.apache.ojb.broker.PersistenceBrokerInternal)

Method Detail

isClosed

public boolean isClosed()
Description copied from interface: PersistenceBroker
Determines whether this broker is closed.

Specified by:
isClosed in interface PersistenceBroker
Overrides:
isClosed in class DelegatingPersistenceBroker

isInTransaction

public boolean isInTransaction()
                        throws PersistenceBrokerException
Description copied from interface: PersistenceBroker
Determines whether there is currently a transaction in progress.

Specified by:
isInTransaction in interface PersistenceBroker
Overrides:
isInTransaction in class DelegatingPersistenceBroker
Throws:
PersistenceBrokerException

close

public boolean close()
Destroy this handle and return the underlying (wrapped) PB instance to pool (when using default implementation of PersistenceBrokerFactory), unset this instance from PersistenceBrokerThreadMapping.

Specified by:
close in interface PersistenceBroker
Overrides:
close in class DelegatingPersistenceBroker


(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30