ATLAS Offline Software
ImplicitCollection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INCLUDE_IMPLICITCOLLECTION_IMPLICITCOLLECTION_H
6 #define INCLUDE_IMPLICITCOLLECTION_IMPLICITCOLLECTION_H
7 
10 
12 #include "Gaudi/PluginService.h"
13 
14 namespace pool {
15 
16  // forward declarations
17  class ISession;
18  class IContainer;
19  class ICollectionSchemaEditor;
21  class ICollectionQuery;
22  class ICollectionIterator;
23  class ImplicitCollectionIterator;
24 
27  // ^ due to not thread-safe ImplicitCollectionIterator
28  {
29  public:
30  typedef Gaudi::PluginService::Factory<ICollection*( const ICollectionDescription*, ICollection::OpenMode, ISession*)> Factory;
31 
40  const std::string& connection,
41  const std::string& name,
43 
48  ISession* session );
49 
52 
54  ImplicitCollection& operator= (const ImplicitCollection&) = delete;
55 
57  virtual ICollection::OpenMode openMode() const;
58 
59 
66  ImplicitCollectionIterator* select( const std::string & primaryQuery = "",
67  std::string secondaryQuery = "",
68  std::string options = "" );
69 
71  void commit(bool reopen=false);
72 
74  void rollback();
75 
77  void close();
78 
80  void open();
81 
83  bool isOpen() const;
84 
85 
87  virtual const ICollectionDescription& description() const;
88 
92 
96 
99 
100  protected:
101 
103 
104 
105  private:
108 
110  };
111 }
112 
113 #endif
pool::IContainer
Definition: IContainer.h:23
pool::ICollectionQuery
Definition: ICollectionQuery.h:27
pool::ImplicitCollection::schemaEditor
virtual ICollectionSchemaEditor & schemaEditor()
Returns an object used to modify the collection schema.
pool::ICollectionSchemaEditor
Definition: ICollectionSchemaEditor.h:22
CollectionDescription.h
pool
pool namespace
Definition: libname.h:15
pool::ImplicitCollection::select
ImplicitCollectionIterator * select(const std::string &primaryQuery="", std::string secondaryQuery="", std::string options="")
Method that returns collection's iterator Throws POOL exception.
ICollectionDataEditor
pool::ImplicitCollection::newQuery
virtual ICollectionQuery * newQuery()
Returns an object used to query the collection.
pool::ISession
Definition: ISession.h:31
pool::ImplicitCollection::description
virtual const ICollectionDescription & description() const
Returns an object used to describe the collection properties.
pool::ImplicitCollection::dataEditor
virtual ICollectionDataEditor & dataEditor()
Returns an object used to add, update or delete rows of the collection.
pool::ImplicitCollection::close
void close()
no-op at the moment
pool::ImplicitCollection::~ImplicitCollection
~ImplicitCollection()
Destructor.
pool::ImplicitCollection::Factory
Gaudi::PluginService::Factory< ICollection *(const ICollectionDescription *, ICollection::OpenMode, ISession *)> Factory
Definition: ImplicitCollection.h:30
pool::ImplicitCollection::ImplicitCollection
ImplicitCollection(const ICollectionDescription *description, ICollection::OpenMode mode, ISession *session)
Constructor compying to the new Collections API parameters as above, but name and connection passed i...
pool::ImplicitCollectionIterator
Definition: ImplicitCollectionIterator.h:41
pool::ImplicitCollection::open
void open(ICollection::OpenMode mode, ISession *session)
pool::ICollection::OpenMode
OpenMode
Enumeration of the possible open modes of the collection.
Definition: ICollection.h:27
pool::CollectionDescription
Definition: CollectionDescription.h:29
ICollection.h
Preparation.mode
mode
Definition: Preparation.py:94
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
pool::ImplicitCollection::m_description
CollectionDescription m_description
Definition: ImplicitCollection.h:109
pool::ImplicitCollection::ImplicitCollection
ImplicitCollection(ISession *session, const std::string &connection, const std::string &name, ICollection::OpenMode mode)
Constructor - old style Throws POOL exception.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
pool::ImplicitCollection::open
void open()
no-op at the moment
pool::ImplicitCollection::openMode
virtual ICollection::OpenMode openMode() const
Return openMode.
pool::ATLAS_NOT_THREAD_SAFE
DbStatus DbObjectHandle< T >::makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
Definition: DbObject.h:220
pool::ImplicitCollection::commit
void commit(bool reopen=false)
Commits the last changes made to the collection. Will always return true.
pool::ImplicitCollection
An implicit collection implementation of the ICollection interface.
Definition: ImplicitCollection.h:28
checker_macros.h
Define macros for attributes used to control the static checker.
pool::ImplicitCollection::ImplicitCollection
ImplicitCollection(const ImplicitCollection &)=delete
pool::ImplicitCollection::isOpen
bool isOpen() const
Checks if the collection is open.
pool::ICollection
Definition: ICollection.h:24
pool::ImplicitCollection::rollback
void rollback()
Aborts the last changes made to the collection. Will always return true.
pool::ImplicitCollection::m_container
IContainer * m_container
The underlying container handle.
Definition: ImplicitCollection.h:107
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
pool::ICollectionDataEditor
Definition: ICollectionDataEditor.h:26