|
| CollectionService () |
| Constructor: More...
|
|
virtual | ~CollectionService () |
| Default destructor. More...
|
|
virtual ICollection * | create (const ICollectionDescription &description, bool overwrite=false) |
| Creates or overwrites a collection or collection fragment, given a description of its properties. More...
|
|
virtual ICollection * | createAndRegister (const ICollectionDescription &description, bool overwrite=false, std::string logicalName="") |
| Creates or overwrites a collection, given a description of its properties, and registers it in a collection catalog managed by the collection service. More...
|
|
virtual ICollection * | open (const std::string &name, const std::string &type, std::string connection="", bool readOnly=true) const |
|
virtual bool | registerExisting (const std::string &name, const std::string &type, std::string connection="", std::string logicalName="") |
| Registers an existing collection in a collection catalog managed by the collection service, given its name, storage technology type and database connection string. More...
|
|
virtual bool | registerExisting (ICollection *collection, bool overwrite=false, std::string logicalName="") |
| Registers an existing collection in a collection catalog managed by the collection service. More...
|
|
virtual ICollection * | handle (const std::string &name, const std::string &type, std::string connection="", bool readOnly=true, ISession *session=0) const |
| Retrieves a handle to an existing collection or collection fragment for read or update transactions, given the collection or collection fragment's name, storage technology type and database connection string. More...
|
|
virtual ICollection * | openWithPhysicalName (const std::string &physicalName, pool::ICollection::OpenMode openMode=pool::ICollection::READ) |
| Retrieves a handle to an existing collection for read or update transactions, given the physical name used to register the collection in a collection catalog managed by the collection service. More...
|
|
virtual ICollection * | openWithLogicalName (const std::string &logicalName, bool readOnly=true) |
| Retrieves a handle to an existing collection for read or update transactions, given the logical name used to register the collection in a collection catalog managed by the collection service. More...
|
|
virtual ICollection * | openWithGuid (const std::string &guid, bool readOnly=true) |
| Retrieves a handle to an existing collection for read or update transactions, given the globally unique identifier used to register the collection in a collection catalog managed by the collection service. More...
|
|
virtual bool | setDefaultCatalog () |
| Sets default values for the write and read collection catalogs. More...
|
|
virtual void | setCatalog (IFileCatalog *collCat) |
| Forces the service to use externally provided file catalogs The catalogs are not deleted by the service. More...
|
|
virtual bool | setWriteCatalog (const std::string &name) |
| Sets the name of the catalog in which to register new collections. More...
|
|
virtual bool | addReadCatalog (const std::string &name) |
| Adds a catalog to the list of catalogs in which to search for registered collections. More...
|
|
virtual IFileCatalog * | getCatalog () |
| Returns the collection catalog used by the service. More...
|
|
A service for creating, accessing and managing an ensemble of collections of event references. In many cases, the individual unit managed by the service may simply consist of a collection fragment containing only a subset of the metadata of an existing collection. Note that a class that inherits from this interface must also inherit from the SEAL Service base class.
Definition at line 25 of file CollectionService.h.
Creates or overwrites a collection, given a description of its properties, and registers it in a collection catalog managed by the collection service.
Throws an exception if the collection has been replicated, if an attempt is being made to overwrite an existing collection when the overwrite input argument has been set to "false" or if the object being registered is a collection fragment.
- Parameters
-
description | Specification of collection properties. |
overwrite | Flag to distinguish creation and overwrite open modes. |
Implements pool::ICollectionService.
virtual ICollection* pool::CollectionService::handle |
( |
const std::string & |
name, |
|
|
const std::string & |
type, |
|
|
std::string |
connection = "" , |
|
|
bool |
readOnly = true , |
|
|
ISession * |
session = 0 |
|
) |
| const |
|
virtual |
Retrieves a handle to an existing collection or collection fragment for read or update transactions, given the collection or collection fragment's name, storage technology type and database connection string.
A reference to a POOL database session object must be provided as input for the case where the collection being accessed is of type "ImplicitCollection".
- Parameters
-
name | Name of collection or collection fragment. |
type | Storage technology type of collection or collection fragment. |
connection | Connection to database containing collection or collection fragment. |
readOnly | Flag to distinguish read and update open modes. |
session | Reference to database session (need only be set for implicit collections). |
Implements pool::ICollectionService.
virtual bool pool::CollectionService::registerExisting |
( |
const std::string & |
name, |
|
|
const std::string & |
type, |
|
|
std::string |
connection = "" , |
|
|
std::string |
logicalName = "" |
|
) |
| |
|
virtual |
Registers an existing collection in a collection catalog managed by the collection service, given its name, storage technology type and database connection string.
Throws an exception if the collection does not exist, if a collection has already been registered in the collection catalog with identical physical name or if the object being registered is a collection fragment.
- Parameters
-
name | Name of collection. |
type | Storage technology type of collection. |
connection | Connection to database containing collection. |
Implements pool::ICollectionService.