Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BdbCollTFactoryDecorator< T > Class Template Reference
[BdbEventStore]

#include <BdbCollTFactoryDecorator.hh>

Inheritance diagram for BdbCollTFactoryDecorator< T >:

BdbCollectionTFactory< T > BdbFetchCollTFactory< T > BdbMetaDataCollTFactory< T > BdbNestedTransCollTFactory< T > List of all members.

Public Methods

 BdbCollTFactoryDecorator (BdbCollectionTFactory< T > &factory)
 BdbCollTFactoryDecorator (BdbCollectionTFactory< T > *factory)
virtual ~BdbCollTFactoryDecorator ()
virtual const char * typeName () const
virtual BdbStatus existsError (const char *theName) const
virtual BdbStatus lockError (const BdbRefAny &persObj) const
virtual BdbStatus nameError () const
virtual BdbStatus authError (const char *theName) const
virtual BdbCollectionTFactory<
T >::Failure 
getResult () const
virtual BdbAbsCollectionT<
T > * 
getCollection (const char *const theCollPath, d_ULong initialSize=0)=0
virtual BdbAbsCollectionT<
T > * 
regetCollection ()=0

Protected Methods

virtual BdbAbstractClusteringHintcollectionHint () const
virtual BdbAbstractClusteringHintnodeHint () const
virtual const char * fullCollName () const
virtual const char * collName () const
virtual void setInstanceHints (BdbAbstractClusteringHint *collectionHint, BdbAbstractClusteringHint *nodeHint)
virtual BdbCollectionTFactory<
T > & 
getFactory ()

Private Methods

 BdbCollTFactoryDecorator ()
 BdbCollTFactoryDecorator (const BdbCollTFactoryDecorator< T > &aRhs)
const BdbCollTFactoryDecorator<
T > & 
operator= (const BdbCollTFactoryDecorator< T > &aRhs)
BdbAbsCollectionT< T > * attemptGet ()

Private Attributes

BdbCollectionTFactory< T > * _factory
bool _ownsFactory

Detailed Description

template<class T>
class BdbCollTFactoryDecorator< T >

The BdbCollTFactoryDecorator decorates a BdbCollectionTFactory such that the decorated factories collections are created in a nested transaction.

Definition at line 64 of file BdbCollTFactoryDecorator.hh.


Constructor & Destructor Documentation

template<class T>
BdbCollTFactoryDecorator< T >::BdbCollTFactoryDecorator BdbCollectionTFactory< T > &    factory
 

Constructs an instance of this class, but do NOT take ownership of the decorated factory

Definition at line 71 of file BdbCollTFactoryDecorator.cc.

References false.

template<class T>
BdbCollTFactoryDecorator< T >::BdbCollTFactoryDecorator BdbCollectionTFactory< T > *    factory
 

Constructs an instance of this class, taking ownership of the decorated factory

Definition at line 78 of file BdbCollTFactoryDecorator.cc.

References true.

template<class T>
BdbCollTFactoryDecorator< T >::~BdbCollTFactoryDecorator   [virtual]
 

Destroys this instance.

Definition at line 99 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory.

template<class T>
BdbCollTFactoryDecorator< T >::BdbCollTFactoryDecorator   [private]
 

stops default

template<class T>
BdbCollTFactoryDecorator< T >::BdbCollTFactoryDecorator const BdbCollTFactoryDecorator< T > &    aRhs [private]
 

stops default


Member Function Documentation

template<class T>
BdbAbsCollectionT< T >* BdbCollTFactoryDecorator< T >::attemptGet   [private]
 

Attempt to get the collection

Reimplemented from BdbCollectionTFactory< T >.

Referenced by BdbFetchCollTFactory< T >::getCollection(), and BdbFetchCollTFactory< T >::regetCollection().

template<class T>
BdbStatus BdbCollTFactoryDecorator< T >::authError const char *    theName const [virtual]
 

action to take when there is an authorization failure

Implements BdbCollectionTFactory< T >.

Definition at line 205 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, BdbcUserError, BdbSignal, BdbCollectionTFactory< T >::getResult(), and BdbCollectionTFactory< T >::kAuthFailure.

Referenced by BdbFetchCollTFactory< T >::attemptGet().

template<class T>
BdbAbstractClusteringHint * BdbCollTFactoryDecorator< T >::collectionHint   [protected, virtual]
 

Returns:
the hint to be used for the creation of the collection

Reimplemented from BdbCollectionTFactory< T >.

Reimplemented in BdbNestedTransCollTFactory< T >.

Definition at line 121 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, and BdbCollectionTFactory< T >::factoryCollectionHint().

template<class T>
const char * BdbCollTFactoryDecorator< T >::collName   [protected, virtual]
 

Returns:
the collection name last used to get or reget the collection

Reimplemented from BdbCollectionTFactory< T >.

Definition at line 142 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, and BdbCollectionTFactory< T >::factoryCollName().

template<class T>
BdbStatus BdbCollTFactoryDecorator< T >::existsError const char *    theName const [virtual]
 

action to take when the collection already exists

Implements BdbCollectionTFactory< T >.

Definition at line 156 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, BdbcUserError, BdbSignal, BdbCollectionTFactory< T >::getResult(), and BdbCollectionTFactory< T >::kExistsFailure.

template<class T>
const char * BdbCollTFactoryDecorator< T >::fullCollName   [protected, virtual]
 

Returns:
the full collection name last used to get or reget the collection

Reimplemented from BdbCollectionTFactory< T >.

Definition at line 135 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, and BdbCollectionTFactory< T >::factoryFullCollName().

template<class T>
virtual BdbAbsCollectionT< T >* BdbCollTFactoryDecorator< T >::getCollection const char *const    theCollPath,
d_ULong    initialSize = 0
[pure virtual]
 

Returns:
BdbcSuccess if the collections is succesfully created

Reimplemented from BdbCollectionTFactory< T >.

Implemented in BdbFetchCollTFactory< T >, BdbMetaDataCollTFactory< T >, and BdbNestedTransCollTFactory< T >.

template<class T>
BdbCollectionTFactory< T > & BdbCollTFactoryDecorator< T >::getFactory   [protected, virtual]
 

Returns:
the factory being decorated

Definition at line 243 of file BdbCollTFactoryDecorator.cc.

Referenced by BdbFetchCollTFactory< T >::attemptGet(), BdbFetchCollTFactory< T >::attemptRegets(), BdbNestedTransCollTFactory< T >::getCollection(), BdbMetaDataCollTFactory< T >::getCollection(), BdbNestedTransCollTFactory< T >::regetCollection(), BdbMetaDataCollTFactory< T >::regetCollection(), and BdbFetchCollTFactory< T >::regetCollection().

template<class T>
BdbCollectionTFactory< T >::Failure BdbCollTFactoryDecorator< T >::getResult   [virtual]
 

Returns:
the result of the last 'getCollection' attempted

Reimplemented from BdbCollectionTFactory< T >.

Definition at line 219 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, BdbCollectionTFactory< T >::getResult(), and BdbCollectionTFactory< T >::kNoFailure.

Referenced by BdbFetchCollTFactory< T >::attemptGet(), BdbFetchCollTFactory< T >::attemptRegets(), and BdbCollTFactoryDecorator< T >::nameError().

template<class T>
BdbStatus BdbCollTFactoryDecorator< T >::lockError const BdbRefAny &    persObj const [virtual]
 

action to take when the collection can not be updated

Implements BdbCollectionTFactory< T >.

Definition at line 170 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, BdbcUserError, BdbRefAny, BdbSignal, BdbCollectionTFactory< T >::getResult(), and BdbCollectionTFactory< T >::kLockFailure.

template<class T>
BdbStatus BdbCollTFactoryDecorator< T >::nameError   [virtual]
 

action to take when no name is specfied for a collection

Implements BdbCollectionTFactory< T >.

Definition at line 192 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, BdbcUserError, BdbSignal, BdbCollTFactoryDecorator< T >::getResult(), and BdbCollectionTFactory< T >::kNameFailure.

template<class T>
BdbAbstractClusteringHint * BdbCollTFactoryDecorator< T >::nodeHint   [protected, virtual]
 

Returns:
the hint to be used for the creation of the tree node

Reimplemented from BdbCollectionTFactory< T >.

Reimplemented in BdbNestedTransCollTFactory< T >.

Definition at line 128 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, and BdbCollectionTFactory< T >::factoryNodeHint().

template<class T>
const BdbCollTFactoryDecorator< T >& BdbCollTFactoryDecorator< T >::operator= const BdbCollTFactoryDecorator< T > &    aRhs [private]
 

stops default

template<class T>
virtual BdbAbsCollectionT< T >* BdbCollTFactoryDecorator< T >::regetCollection   [pure virtual]
 

Returns:
Collection, if re-attempt to get collection is succesful

Reimplemented from BdbCollectionTFactory< T >.

Implemented in BdbFetchCollTFactory< T >, BdbMetaDataCollTFactory< T >, and BdbNestedTransCollTFactory< T >.

template<class T>
void BdbCollTFactoryDecorator< T >::setInstanceHints BdbAbstractClusteringHint   collectionHint,
BdbAbstractClusteringHint   nodeHint
[protected, virtual]
 

Set the hints to be used by this instance.

Reimplemented from BdbCollectionTFactory< T >.

Reimplemented in BdbNestedTransCollTFactory< T >.

Definition at line 233 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory, and BdbCollectionTFactory< T >::setHints().

template<class T>
const char * BdbCollTFactoryDecorator< T >::typeName   [virtual]
 

Returns:
the name of the type of collection this factory creates

Implements BdbCollectionTFactory< T >.

Definition at line 149 of file BdbCollTFactoryDecorator.cc.

References BdbCollTFactoryDecorator< T >::_factory.


Member Data Documentation

template<class T>
BdbCollectionTFactory< T >* BdbCollTFactoryDecorator< T >::_factory [private]
 

Definition at line 200 of file BdbCollTFactoryDecorator.hh.

Referenced by BdbCollTFactoryDecorator< T >::authError(), BdbCollTFactoryDecorator< T >::collectionHint(), BdbCollTFactoryDecorator< T >::collName(), BdbCollTFactoryDecorator< T >::existsError(), BdbCollTFactoryDecorator< T >::fullCollName(), BdbCollTFactoryDecorator< T >::getResult(), BdbCollTFactoryDecorator< T >::lockError(), BdbCollTFactoryDecorator< T >::nameError(), BdbCollTFactoryDecorator< T >::nodeHint(), BdbCollTFactoryDecorator< T >::setInstanceHints(), BdbCollTFactoryDecorator< T >::typeName(), and BdbCollTFactoryDecorator< T >::~BdbCollTFactoryDecorator().

template<class T>
bool BdbCollTFactoryDecorator< T >::_ownsFactory [private]
 

Definition at line 201 of file BdbCollTFactoryDecorator.hh.


The documentation for this class was generated from the following files:

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002