5#ifndef COLLECTIONSVC_COLLECTIONDESCRIPTION_H
6#define COLLECTIONSVC_COLLECTIONDESCRIPTION_H
40 const std::string&
type,
110 const std::string& columnName,
111 const std::string& columnType,
113 bool sizeIsFixed =
true );
121 const std::string& columnName);
125 virtual const std::string&
name()
const;
128 virtual const std::string&
type()
const;
166 virtual int setColumnId(
const std::string& columnName,
int id,
const std::string& methodName );
An implementation of the ICollectionColumn interface for retrieving a description of a column of a co...
virtual const std::string & name() const
Returns the name of the collection and the top level collection fragment.
virtual int setColumnId(pool::CollectionColumn *column, int id=-1)
virtual int numberOfTokenColumns() const
Returns the number of Token columns (including the event reference column if it is used)
virtual const pool::CollectionColumn * column(const std::string &columnName, const std::string &methodName) const
virtual const std::string & connection() const
Returns the connection to the database containing the collection.
CollectionDescription & operator=(const ICollectionDescription &rhs)
Assignment operator.
virtual const std::string & eventReferenceColumnName() const
Returns the name reserved for the event reference Token column.
ColumnByName m_attributeColumnForColumnName
Map of Attribute CollectionColumn objects using column names as keys.
virtual const ICollectionColumn & insertTokenColumn(const std::string &columnName)
Adds a new column of type pool::Token to the collection.
std::string m_name
Name of the collection.
virtual int numberOfAttributeColumns() const
Returns the number of Attribute columns in the collection.
virtual void copyFrom(const ICollectionDescription &rhs)
make this description a copy of 'rhs'
virtual void setConnection(const std::string &connection)
Sets the connection to the database containing the collection.
virtual ~CollectionDescription()
Default destructor.
virtual const ICollectionColumn & tokenColumn(int columnId) const
Returns a description object for a Token column of the collection, given the position of the column.
virtual const std::string & type() const
Returns the storage technology type of the collection.
std::map< std::string, int > m_columnIdForColumnName
Map of column ID numbers for column names IDs are unique in the collection.
CollectionDescription(const ICollectionDescription &rhs)
Copy constructor.
CollectionDescription(CollectionDescription &&)=default
virtual const ICollectionColumn & attributeColumn(int columnId) const
Returns a description object for an Attribute column of the collection, given the position of the col...
std::vector< pool::CollectionColumn * > m_attributeColumns
Attribute column description objects.
CollectionDescription(const std::string &name, const std::string &type, const std::string &connection="", const std::string &eventReferenceColumnName="")
Constructor that takes as input the minimum amount of properties needed to describe the collection.
std::string m_connection
Connection to database containing collection.
std::map< std::string, CollectionColumn * > ColumnByName
ColumnByName m_tokenColumnForColumnName
Map of Token CollectionColumn objects using column names as keys.
virtual void setName(const std::string &name)
Sets the name of the collection.
std::string m_type
Storage technology type of collection.
CollectionDescription(const CollectionDescription &rhs)
CollectionDescription & operator=(const CollectionDescription &rhs)
virtual int setColumnId(const std::string &columnName, int id, const std::string &methodName)
std::vector< pool::CollectionColumn * > m_tokenColumns
virtual const ICollectionColumn & insertColumn(const std::string &columnName, const std::string &columnType, int maxSize=0, bool sizeIsFixed=true)
Adds a new column to the collection.
virtual void setEventReferenceColumnName(const std::string &columnName)
Sets the name of the event reference Token column.
virtual void checkNewColumnName(const std::string &name, const std::string &method) const
virtual void setType(const std::string &type)
Sets the storage technology type of the collection.
virtual pool::CollectionColumn * column(const std::string &columnName, const std::string &methodName)
std::string m_eventReferenceColumnName
Name of event reference column.
An interface for retrieving a description of a column of a collection.
ICollectionDescription()=default