GlobalObjects
Loading...
Searching...
No Matches
glo::TableReaderInterface Class Reference

An object of this class accesses tables and reads data records (Record) and binary files (eut::Blob). More...

#include <GloTableReaderInterface.h>

Inheritance diagram for glo::TableReaderInterface:

Classes

class  AllSetObjectStrIndexIteratorItem
 Objects of this type are managed in the m_pAllSetObjectStrIndexIteratorMap to ensure that an AllSet with index can be reopened in method TableReaderInterface::setTransactionIndexPool(TransactionIndexPool*). More...
 

Public Member Functions

 TableReaderInterface (const SchemaInterface &rScheme, RealIndexPool *pRealIndexPool)
 
virtual ~TableReaderInterface ()
 
int closeAllSet (NUM_PTR ipClientAllSetAddress)
 
int getAllObjIDs (std::list< ObjID > &rRetValList)
 
int getIndexedObjIdListFromAllSet (std::list< ObjID > &rRetValList, NUM_PTR ipClientAllSetAddress, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp) const
 
int getIndexedObjIdListFromAllSet (std::list< ObjID > &rRetValList, NUM_PTR ipClientAllSetAddress, const std::string &rsIndexSearchValue, EnQueryType eQuerryType) const
 
int getIndexedObjIdListFromAllSet (std::list< ObjID > &rRetValList, NUM_PTR ipClientAllSetAddress, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex) const
 
int getObjectData (Record *&prRetVal, const ObjID &rObjID, ReaderInfo *pReaderInfo)
 
int getObjIdFromAllSet (ObjID &rObjID, NUM_PTR ipClientAllSetAddress, EnSeekMode eMode) const
 
int getObjIDs (std::list< ObjID > &rRetValList, unsigned long ulClassID)
 
int getObjIDs (std::map< ObjID, ObjID, std::less< ObjID > > &rRetValMap, unsigned long ulClassID)
 
RealIndexPoolgetRealIndexPool () const
 
int getRecord (Record *&prRetVal, const ObjID &rObjID, ReaderInfo *pReaderInfo)
 
int getSizeFromAllSet (std::size_t &rnSize, NUM_PTR ipClientAllSetAddress) const
 
TransactionIndexPoolgetTransactionIndexPool () const
 
int isAllSetOpen (NUM_PTR ipClientAllSetAddress) const
 
int objIDInAllSet (const ObjID &rObjID, NUM_PTR ipClientAllSetAddress) const
 
int openAllSet (NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, bool bWithSubClasses)
 
int openAllSet (NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, const std::string &rsIndexName)
 
virtual int openTable (const std::string &sTableName)
 
void refreshAllTables ()
 
int removeFilterInAllSet (NUM_PTR ipClientAllSetAddress) const
 
int setCurrentObjectInAllSet (const ObjID &rObjID, NUM_PTR ipClientAllSetAddress) const
 
int setFilterInAllSet (NUM_PTR ipClientAllSetAddress, const std::string &rsIndexFilterValue) const
 
int setFilterInAllSet (NUM_PTR ipClientAllSetAddress, const std::string &rsIndexFilterValue, EnComparisionOp eComparisionOp) const
 
int setFilterInAllSet (NUM_PTR ipClientAllSetAddress, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex) const
 
int setPositionInAllSet (std::size_t nPosition, NUM_PTR ipClientAllSetAddress) const
 
int setTransactionIndexPool (TransactionIndexPool *pTransactionIndexPool)
 
- Public Member Functions inherited from glo::TableInterface
 TableInterface (const SchemaInterface &rScheme, RealIndexPool *pRealIndexPool)
 
virtual ~TableInterface ()
 
virtual int closeTable (const std::string &sTable)
 
std::string getDataPath () const
 
int getObjIDRecordAttribute (ObjIDRecordAttribute *&prRetVal, const std::string &sTable, const ObjID &rObjID)
 
SchemaInterfacegetSchemaInterface ()
 
std::string getSchemaPath () const
 
int objIDInBase (bool &rPresent, const ObjID &rObjID) const
 

Protected Member Functions

 TableReaderInterface ()
 
int generateRecord (Record *&prRetVal, const std::string &sFieldNameRow, const std::string &sDataRow, std::streampos StreamPosRow, const std::string &rsTable, bool bOnlyClassIDTable=false)
 
int getObjectData (Record *&prRetVal, const ObjID &rObjID, ReaderInfo *pReaderInfo, bool bInRecursion)
 
int getObjectDataFromDataRow (Record *&prRetVal, const ObjID &rObjID, unsigned long ulClassID, bool bOnlyClassIDTable=false)
 
int getObjectDataFromDataRow (std::shared_ptr< Record > &sprRetVal, const ObjID &rObjID, unsigned long ulClassID, bool bOnlyClassIDTable=false)
 
int getObjIDs (std::list< ObjID > *pRetValList, std::map< ObjID, ObjID, std::less< ObjID > > *pRetValMap, unsigned long ulClassID)
 
int getRecord (Record *&prRetVal, const std::string &sTableName, const ObjID &rObjID, unsigned long ulClassID, bool bOnlyClassIDTable=false)
 
int getRecordAttribute (BaseRecordAttribute *&prRetVal, const ClassInfoAttribute &rClassInfoAttribute, const ObjID &rObjID, const std::string &sPath)
 
IndexPool::TableObjIdIndexIteratoropenAllSet (int &riErr, NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, bool bWithSubClasses=true)
 
IndexPool::ObjectStrIndexIteratoropenAllSet (int &riErr, NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, const std::string &rsIndexName)
 
- Protected Member Functions inherited from glo::TableInterface
 TableInterface ()
 
int openFile (std::fstream *&prFStream, const std::string &sFullFileName, std::ios_base::openmode OpenMode)
 

Private Member Functions

 TableReaderInterface (const TableReaderInterface &)
 
void deleteAllSetObjectStrIndexIteratorMap (std::map< NUM_PTR, AllSetObjectStrIndexIteratorItem *, std::less< NUM_PTR > > *pMapToDelete)
 
void deleteAllSetTableObjIdIndexIteratorMap (std::map< NUM_PTR, IndexPool::TableObjIdIndexIterator *, std::less< NUM_PTR > > *pMapToDelete)
 
TableInterfaceoperator= (const TableInterface &)
 

Private Attributes

std::map< NUM_PTR, AllSetObjectStrIndexIteratorItem *, std::less< NUM_PTR > > * m_pAllSetObjectStrIndexIteratorMap
 
std::map< NUM_PTR, IndexPool::TableObjIdIndexIterator *, std::less< NUM_PTR > > * m_pAllSetTableObjIdIndexIteratorMap
 
TransactionIndexPoolm_pTransactionIndexPool
 
std::map< ObjID, Record *, std::less< ObjID > > m_RecursionRecordMap
 

Additional Inherited Members

- Protected Attributes inherited from glo::TableInterface
std::map< std::string, TableInterfaceTable *, std::less< std::string > > m_OpenTableMap
 
RealIndexPoolm_pRealIndexPool
 
SchemaInterfacem_pSchema
 

Detailed Description

An object of this class accesses tables and reads data records (Record) and binary files (eut::Blob).

All tables known to the schema are opened when instantiating, and closed again when destroying.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ TableReaderInterface() [1/3]

glo::TableReaderInterface::TableReaderInterface ( )
protected

The default constructor is not available.

◆ TableReaderInterface() [2/3]

glo::TableReaderInterface::TableReaderInterface ( const SchemaInterface & rScheme,
RealIndexPool * pRealIndexPool )

Constructor with parameter passing.

Parameters
[in]rSchemeCannot be used without schema, will be copied.
[in]pRealIndexPoolAccelerates the access to records.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ ~TableReaderInterface()

virtual glo::TableReaderInterface::~TableReaderInterface ( )
virtual

Destructor, all open table files are closed and the memory is cleaned up.

◆ TableReaderInterface() [3/3]

glo::TableReaderInterface::TableReaderInterface ( const TableReaderInterface & )
private

The copy constructor is not available.

Member Function Documentation

◆ closeAllSet()

int glo::TableReaderInterface::closeAllSet ( NUM_PTR ipClientAllSetAddress)

Closes an AllSet with the passed Client-AllSet address.

Parameters
[in]ipClientAllSetAddressThe client AllSet address.
Returns
A return value < 0 indicates an error.

◆ deleteAllSetObjectStrIndexIteratorMap()

void glo::TableReaderInterface::deleteAllSetObjectStrIndexIteratorMap ( std::map< NUM_PTR, AllSetObjectStrIndexIteratorItem *, std::less< NUM_PTR > > * pMapToDelete)
private

Deletes the objects in the passed AllSetObjectStrIndexIteratorMap and the objects themselves.

Parameters
[in]pMapToDeleteThe map to be deleted.
Note
The passed map is no longer valid.

◆ deleteAllSetTableObjIdIndexIteratorMap()

void glo::TableReaderInterface::deleteAllSetTableObjIdIndexIteratorMap ( std::map< NUM_PTR, IndexPool::TableObjIdIndexIterator *, std::less< NUM_PTR > > * pMapToDelete)
private

Deletes the objects in the passed AllSetTableObjIdIndexIteratorMap and the objects themselves.

Parameters
[in]pMapToDeleteThe map to be deleted.
Note
The passed map is no longer valid.

◆ generateRecord()

int glo::TableReaderInterface::generateRecord ( Record *& prRetVal,
const std::string & sFieldNameRow,
const std::string & sDataRow,
std::streampos StreamPosRow,
const std::string & rsTable,
bool bOnlyClassIDTable = false )
protected

Generates a data set and transfers all data, determined from the parameters, into the data set attributes.

Parameters
[in,out]prRetValThe generated data set.
[in]sFieldNameRowThe row with the table field names (e.g. "ObjID|CreateDate|LastChange|") from the table file.
[in]sDataRowThe row with the table data (e.g. "13.0.2|1453983511|1455873934|") from the table file.
[in]StreamPosRowThe position of the table data row in the table file.
[in]rsTableThe complete table file name.
[in]bOnlyClassIDTableIf true, only the record attributes is read from the table and not e.g. the possibly existing blob and string files.
Returns
A return value < 0 indicates an error.
Attention
The returned record must be removed from memory by the calling instance with Record::forget().

◆ getAllObjIDs()

int glo::TableReaderInterface::getAllObjIDs ( std::list< ObjID > & rRetValList)

Returns all object IDs from the Persistent table (Class ID == 1).

Parameters
[in,out]rRetValListFound object IDs are returned here. The list is cleared before.
Returns
A return value < 0 indicates an error.
See also
getObjIDs(std::list<ObjID>&,unsigned long),
getObjIDs(std::map< ObjID, ObjID, std::less<ObjID> >&,unsigned long)

◆ getIndexedObjIdListFromAllSet() [1/3]

int glo::TableReaderInterface::getIndexedObjIdListFromAllSet ( std::list< ObjID > & rRetValList,
NUM_PTR ipClientAllSetAddress,
const std::string & rsIndexSearchValue,
EnComparisionOp eComparisionOp ) const

Returns a list of object IDs from AllSet in relation to the parameters passed. Results can be defined using the parameter eComparisionOp. For example, if parameter rsIndexSearchValue has the value "123" and parameter eComparisionOp has the value LESS, all objects with an index smaller than "123" are returned.

Parameters
[in,out]rRetValListThe object IDs of the found object IDs are delivered to this list.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]rsIndexSearchValueThe index value.
[in]eComparisionOpThe comparison operator.
Returns
A return value < 0 indicates an error.

◆ getIndexedObjIdListFromAllSet() [2/3]

int glo::TableReaderInterface::getIndexedObjIdListFromAllSet ( std::list< ObjID > & rRetValList,
NUM_PTR ipClientAllSetAddress,
const std::string & rsIndexSearchValue,
EnQueryType eQuerryType ) const

Returns a list of object IDs from an AllSet in relation to the parameters passed.

Parameters
[in,out]rRetValListThe object IDs of the found object IDs are returned to this list.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]rsIndexSearchValueThe index expression can contain the placeholders '*' and '?', which are taken into account in the evaluation or if parameter eQueryType == eOQL, the string is interpreted as OQL expression.
[in]eQuerryTypeThe query type.
Returns
A return value < 0 indicates an error.

◆ getIndexedObjIdListFromAllSet() [3/3]

int glo::TableReaderInterface::getIndexedObjIdListFromAllSet ( std::list< ObjID > & rRetValList,
NUM_PTR ipClientAllSetAddress,
const std::string & rsRangeStartIndex,
const std::string & rsRangeEndIndex ) const

Returns a list of object IDs from AllSet in relation to the parameters passed. Results can be defined using a range specification. If, for example, parameter rsRangeStartIndex has the value "123" and parameter rsRangeEndIndex has the value "155", all objects with an index greater than/equal to "123" and less than/equal to "155" are delivered.

Parameters
[in,out]rRetValListThe object IDs of the found object IDs are delivered to this list.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]rsRangeStartIndexThe start index value.
[in]rsRangeEndIndexThe end index value.
Returns
A return value < 0 indicates an error.

◆ getObjectData() [1/2]

int glo::TableReaderInterface::getObjectData ( Record *& prRetVal,
const ObjID & rObjID,
ReaderInfo * pReaderInfo )

Returns all record attributes in a record of the object with passed object ID.

Parameters
[in,out]prRetValThe generated record.
[in]rObjIDThe requested object ID.
[in]pReaderInfoAn info, e.g. to inform about locked records, which naturally must not be delivered.
Returns
A return value < 0 indicates an error.
Attention
The delivered record must be removed from memory by the calling instance with Record::forget().

◆ getObjectData() [2/2]

int glo::TableReaderInterface::getObjectData ( Record *& prRetVal,
const ObjID & rObjID,
ReaderInfo * pReaderInfo,
bool bInRecursion )
protected

Returns all record attributes in a record of the object with the object ID passed. Is used by getObjectData(Record*&,const ObjID&,ReaderInfo*).

Parameters
[in,out]prRetValThe generated data set.
[in]rObjIDThe requested object ID.
[in]pReaderInfoAn info, e.g. to inform about locked records, which naturally must not be delivered.
[in]bInRecursionIf true, then call in itself.
Returns
A return value < 0 indicates an error.
Attention
The returned record must be removed from memory by the calling instance with Record::forget().
Note
For Glo developers: Is implemented in GloRecordAttributeFunctions.cpp, so that extensions of data set attributes can be made there collectively.

◆ getObjectDataFromDataRow() [1/2]

int glo::TableReaderInterface::getObjectDataFromDataRow ( Record *& prRetVal,
const ObjID & rObjID,
unsigned long ulClassID,
bool bOnlyClassIDTable = false )
protected

Returns all record attributes in a record of the object with the passed object ID.

Parameters
[in,out]prRetValThe generated data set.
[in]rObjIDThe requested object ID.
[in]ulClassIDThe class ID.
[in]bOnlyClassIDTableIf true, only the data set attributes are read from the table and not e.g., the blob and string files.
Returns
A return value < 0 indicates an error.
Attention
The returned record must be removed from memory by the calling instance with Record::forget().

◆ getObjectDataFromDataRow() [2/2]

int glo::TableReaderInterface::getObjectDataFromDataRow ( std::shared_ptr< Record > & sprRetVal,
const ObjID & rObjID,
unsigned long ulClassID,
bool bOnlyClassIDTable = false )
protected

Returns all record attributes in a record of the object with the passed object ID.

Parameters
[in,out]sprRetValThe generated data set.
[in]rObjIDThe requested object ID.
[in]ulClassIDThe class ID.
[in]bOnlyClassIDTableIf true, only the data set attributes are read from the table and not e.g., the blob and string files.
Returns
A return value < 0 indicates an error.

◆ getObjIdFromAllSet()

int glo::TableReaderInterface::getObjIdFromAllSet ( ObjID & rObjID,
NUM_PTR ipClientAllSetAddress,
EnSeekMode eMode ) const

Returns an object ID from an AllSet.

Parameters
[in,out]rObjIDAn object ID found is entered here.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the list.
Note
The AllSet from ipClientAllSetAddress must be open.

◆ getObjIDs() [1/3]

int glo::TableReaderInterface::getObjIDs ( std::list< ObjID > & rRetValList,
unsigned long ulClassID )

Returns all object IDs from the table of the class with passed class ID.

Parameters
[in,out]rRetValListFound object IDs are returned here. The list is cleared before.
[in]ulClassIDThe class ID.
Returns
A return value < 0 indicates an error.
See also
getObjIDs(std::map< ObjID, ObjID, std::less<ObjID> >&,unsigned long)

◆ getObjIDs() [2/3]

int glo::TableReaderInterface::getObjIDs ( std::list< ObjID > * pRetValList,
std::map< ObjID, ObjID, std::less< ObjID > > * pRetValMap,
unsigned long ulClassID )
protected

Returns all object IDs from the table of the class with passed class ID.

Parameters
[in,out]pRetValListFound object IDs are returned here if passed. The list is cleared before.
[in,out]pRetValMapFound object IDs, sorted by these, are placed here if passed. The map is cleared before.
[in]ulClassIDThe class ID.
Returns
A return value < 0 indicates an error.

◆ getObjIDs() [3/3]

int glo::TableReaderInterface::getObjIDs ( std::map< ObjID, ObjID, std::less< ObjID > > & rRetValMap,
unsigned long ulClassID )

Returns all object IDs from the table of the class with passed class ID.

Parameters
[in,out]rRetValMapFound object IDs, sorted by these, are returned here. The map is cleared before.
[in]ulClassIDThe class ID.
Returns
A return value < 0 indicates an error.
See also
getObjIDs(std::list<ObjID>&,unsigned long)

◆ getRealIndexPool()

RealIndexPool * glo::TableReaderInterface::getRealIndexPool ( ) const

Returns the m_pRealIndexPool or NULL_PTR if none exists.

Returns
The referenced RealIndexPool or NULL_PTR.
Attention
If returned, the returned object only lives as long as the returning object, so it must not be removed from memory by the calling instance.

◆ getRecord() [1/2]

int glo::TableReaderInterface::getRecord ( Record *& prRetVal,
const ObjID & rObjID,
ReaderInfo * pReaderInfo )

Returns all record attributes in a record from the table of the object with passed object ID.

Parameters
[in,out]prRetValThe generated record.
[in]rObjIDThe requested object ID.
[in]pReaderInfoAn info, e.g. to inform about locked records, which naturally must not be delivered. In addition, the class ID is set, from whose table is read.
Returns
A return value < 0 indicates an error.
Attention
The delivered record must be removed from memory by the calling instance with Record::forget().

◆ getRecord() [2/2]

int glo::TableReaderInterface::getRecord ( Record *& prRetVal,
const std::string & sTableName,
const ObjID & rObjID,
unsigned long ulClassID,
bool bOnlyClassIDTable = false )
protected

Returns a record of the object with passed object ID from a table.

Parameters
[in,out]prRetValThe generated data set.
[in]sTableNameThe table file name.
[in]rObjIDThe requested object ID.
[in]ulClassIDThe class ID.
[in]bOnlyClassIDTableIf true, only the data set attributes are read from the table of the object with passed class ID.
Returns
A return value < 0 indicates an error.
Attention
The returned record must be removed from memory by the calling instance with Record::forget().

◆ getRecordAttribute()

int glo::TableReaderInterface::getRecordAttribute ( BaseRecordAttribute *& prRetVal,
const ClassInfoAttribute & rClassInfoAttribute,
const ObjID & rObjID,
const std::string & sPath )
protected

First fetches a data set and returns a data set attribute with the attribute ID stored in the passed class information attribute.

Parameters
[in,out]prRetValPointer to the found record attribute.
[in]rClassInfoAttributeThe class information attribute.
[in]rObjIDThe requested object ID.
[in]sPathThe file path. The file name comes from the class information attribute passed.
Returns
A return value < 0 indicates an error. A return == ERR_RANGE indicates that nothing was found until the end of the list of record attributes.
Attention
The returned object must be removed from memory using BaseRecordAttribute::forget().

◆ getSizeFromAllSet()

int glo::TableReaderInterface::getSizeFromAllSet ( std::size_t & rnSize,
NUM_PTR ipClientAllSetAddress ) const

Returns the number of elements of an AllSet.

Parameters
[in,out]rnSizeThe number of elements of the AllSet.
[in]ipClientAllSetAddressThe client AllSet address.
Returns
A return value < 0 indicates an error.
Note
The AllSet must be open.

◆ getTransactionIndexPool()

TransactionIndexPool * glo::TableReaderInterface::getTransactionIndexPool ( ) const

Returns the m_pTransactionIndexPool or NULL_PTR if none exists.

Returns
The referenced TransactionIndexPool or NULL_PTR.
Attention
If returned, the returned object only lives as long as the returning object, so it must not be removed from memory by the calling instance.

◆ isAllSetOpen()

int glo::TableReaderInterface::isAllSetOpen ( NUM_PTR ipClientAllSetAddress) const

Checks if a IndexPool::TableObjIdIndexIterator from an IndexPool is in m_pAllSetTableObjIdIndexIteratorMap, or a IndexPool::ObjectStrIndexIterator from an IndexPool is in m_pAllSetTableObjIdIndexIteratorMap from an AllSet; i.e. the AllSet is open.

Parameters
[in]ipClientAllSetAddressThe unique client AllSet address.
Returns
If true, the AllSet of the given ipClientAllSetAddress is open.

◆ objIDInAllSet()

int glo::TableReaderInterface::objIDInAllSet ( const ObjID & rObjID,
NUM_PTR ipClientAllSetAddress ) const

Checks whether an object with the object ID passed occurs in the AllSet.

Parameters
[in]rObjIDThe requested object ID.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
Returns
If the return value > 0, an object with the passed object ID exists in the AllSet. If the return value == 0, it does not.
A return value < 0 indicates an error.
Note
The AllSet must be open.

◆ openAllSet() [1/4]

IndexPool::TableObjIdIndexIterator * glo::TableReaderInterface::openAllSet ( int & riErr,
NUM_PTR ipClientAllSetAddress,
unsigned long ulClassID,
bool bWithSubClasses = true )
protected

Opens an AllSet. This means that a IndexPool::TableObjIdIndexIterator from an IndexPool is inserted in m_pAllSetTableObjIdIndexIteratorMap.

Parameters
[in,out]riErrA return value < 0 indicates an error.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]ulClassIDThe class ID for which an AllSet should be opened.
[in]bWithSubClassesIf true, the IndexIterator will also iterate over the objects of the subclasses of the class with passed class ID, otherwise if false, the IndexIterator will only iterate over the objects of the class with passed class ID
Returns
The IndexIterator which was also added to m_pAllSetTableObjIdIndexIteratorMap.
Attention
If returned, the returned object only lives as long as the returning object; therefore, it must not be removed from memory by the calling instance.
See also
IndexPool
RealIndexPool
TransactionIndexPool
IndexPool::TableObjIdIndexIterator

◆ openAllSet() [2/4]

IndexPool::ObjectStrIndexIterator * glo::TableReaderInterface::openAllSet ( int & riErr,
NUM_PTR ipClientAllSetAddress,
unsigned long ulClassID,
const std::string & rsIndexName )
protected

Opens an AllSet. This means that a IndexPool::ObjectStrIndexIterator from an IndexPool is inserted into m_pAllSetObjectStrIndexIteratorMap.

Parameters
[in,out]riErrA return value < 0 indicates an error.
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]ulClassIDThe class ID for which an AllSet should be opened.
[in]rsIndexNameThe index name of the index to iterate over.
Returns
The IndexIterator which was also added to m_pAllSetObjectStrIndexIteratorMap.
Attention
When an IndexIterator is returned, the returned object lives only as long as the returning object, so it must not be removed from memory by the calling instance.
See also
IndexPool
RealIndexPool
TransactionIndexPool
IndexPool::TableObjIdIndexIterator

◆ openAllSet() [3/4]

int glo::TableReaderInterface::openAllSet ( NUM_PTR ipClientAllSetAddress,
unsigned long ulClassID,
bool bWithSubClasses )

Opens an AllSet. This means that a IndexPool::TableObjIdIndexIterator from an IndexPool is inserted in m_pAllSetTableObjIdIndexIteratorMap.

Parameters
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]ulClassIDThe class ID for which an AllSet should be opened.
[in]bWithSubClassesIf true, the IndexIterator will also iterate over the objects of the subclasses of the class with passed class ID, otherwise if false, the IndexIterator will only iterate over the objects of the class with passed class ID.
Returns
A return value < 0 indicates an error.
See also
IndexPool
RealIndexPool
TransactionIndexPool
IndexPool::TableObjIdIndexIterator

◆ openAllSet() [4/4]

int glo::TableReaderInterface::openAllSet ( NUM_PTR ipClientAllSetAddress,
unsigned long ulClassID,
const std::string & rsIndexName )

Opens an AllSet with an string index. This means that a IndexPool::ObjectStrIndexIterator from an IndexPool is inserted in m_pAllSetTableObjIdIndexIteratorMap.

Parameters
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]ulClassIDThe class ID for which an AllSet should be opened.
[in]rsIndexNameThe index name of the index to iterate over.
Returns
A return value < 0 indicates an error.
See also
IndexPool
RealIndexPool
TransactionIndexPool
IndexPool::TableObjIdIndexIterator

◆ openTable()

virtual int glo::TableReaderInterface::openTable ( const std::string & sTableName)
virtual

Opens a table file and adds it to the list of opened table files if successful.

Parameters
[in]sTableNameThe table file name.
Returns
A return value < 0 indicates an error.

Implements glo::TableInterface.

◆ operator=()

TableInterface & glo::TableReaderInterface::operator= ( const TableInterface & )
private

The assignment operator is not available.

◆ refreshAllTables()

void glo::TableReaderInterface::refreshAllTables ( )

Refreshes the contents of the table files from the list of opened table files.

◆ removeFilterInAllSet()

int glo::TableReaderInterface::removeFilterInAllSet ( NUM_PTR ipClientAllSetAddress) const

Removes a filter in an AllSet.

Parameters
[in]ipClientAllSetAddressThe client AllSet address.
Returns
A return value < 0 indicates an error.

◆ setCurrentObjectInAllSet()

int glo::TableReaderInterface::setCurrentObjectInAllSet ( const ObjID & rObjID,
NUM_PTR ipClientAllSetAddress ) const

Sets the IndexIterator of an AllSet to the position of the object with the object ID passed.

Parameters
[in]rObjIDThe object ID.
[in]ipClientAllSetAddressThe unique client AllSet address.
Returns
A return value < 0 indicates an error.
Note
The AllSet must be open.

◆ setFilterInAllSet() [1/3]

int glo::TableReaderInterface::setFilterInAllSet ( NUM_PTR ipClientAllSetAddress,
const std::string & rsIndexFilterValue ) const

Sets a filter in an AllSet in relation to the passed parameters.

Parameters
[in]ipClientAllSetAddressThe unique client AllSet address.
[in]rsIndexFilterValueThe index expression can contain the placeholders '*' and '?', which are taken into account in the evaluation.
Returns
A return value < 0 indicates an error.

◆ setFilterInAllSet() [2/3]

int glo::TableReaderInterface::setFilterInAllSet ( NUM_PTR ipClientAllSetAddress,
const std::string & rsIndexFilterValue,
EnComparisionOp eComparisionOp ) const

Sets a filter in an AllSet in relation to the passed parameters. The filter can be defined in more detail using the parameter eComparisionOp. For example, if parameter rsIndexFilterValue has the value "123" and parameter eComparisionOp has the value LESS, all objects with an index greater than/equal to "123" are filtered out during iteration.

Parameters
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]rsIndexFilterValueThe index value.
[in]eComparisionOpThe comparison operator.
Returns
A return value < 0 indicates an error.

◆ setFilterInAllSet() [3/3]

int glo::TableReaderInterface::setFilterInAllSet ( NUM_PTR ipClientAllSetAddress,
const std::string & rsRangeStartIndex,
const std::string & rsRangeEndIndex ) const

Sets a filter in an AllSet in relation to the passed parameters. Results can be defined using a range specification. For example, if parameter rsRangeStartIndex has the value "123" and parameter rsRangeEndIndex has the value "155", all objects with an index smaller than "123" and larger than "155" are filtered out during iteration.

Parameters
[in]ipClientAllSetAddressThe unique Client-AllSet address.
[in]rsRangeStartIndexThe start index value.
[in]rsRangeEndIndexThe end index value.
Returns
A return value < 0 indicates an error.

◆ setPositionInAllSet()

int glo::TableReaderInterface::setPositionInAllSet ( std::size_t nPosition,
NUM_PTR ipClientAllSetAddress ) const

Sets the IndexIterator of an AllSet to the specified position.

Parameters
[in]nPositionThe desired iterator position.
[in]ipClientAllSetAddressThe unique client AllSet address.
Returns
A return value < 0 indicates an error.
Note
The AllSet must be open.

◆ setTransactionIndexPool()

int glo::TableReaderInterface::setTransactionIndexPool ( TransactionIndexPool * pTransactionIndexPool)

Takes over the transferred TransactionIndexPool, if none has been taken over yet.
A possible previously referenced TransactionIndexPool is removed from memory.

Parameters
[in]pTransactionIndexPoolThe TransactionIndexPool.
Returns
A return value < 0 indicates an error.
Attention
If a TransactionIndexPool was passed, the calling instance must not remove it from memory, this already handles the object of this class.

Member Data Documentation

◆ m_pAllSetObjectStrIndexIteratorMap

std::map< NUM_PTR, AllSetObjectStrIndexIteratorItem *, std::less<NUM_PTR> >* glo::TableReaderInterface::m_pAllSetObjectStrIndexIteratorMap
private

List of iterators on a IndexPool::ObjectStrIndex with its name for an AllSet (see also: TAllSet and GenericAllSet)

The Client-AllSet address is the Map-Index (since a TableReaderInterface always belongs to a CommunicaterThread, this address is unique with the client)

◆ m_pAllSetTableObjIdIndexIteratorMap

std::map< NUM_PTR, IndexPool::TableObjIdIndexIterator *, std::less<NUM_PTR> >* glo::TableReaderInterface::m_pAllSetTableObjIdIndexIteratorMap
private

List of iterators on a IndexPool::TableObjIdIndex for an AllSet (see also: TAllSet and GenericAllSet).

The Client-AllSet address is the Map-Index (since a TableReaderInterface always belongs to a CommunicaterThread, this address is unique with the client)

◆ m_pTransactionIndexPool

TransactionIndexPool* glo::TableReaderInterface::m_pTransactionIndexPool
private

If set, then e.g. the AllSet iterators are bent to this index because now everything runs in one transaction and e.g. objects not yet inserted in the transaction or deleted objects are still in the real index. In the transaction index, however, the changes have been made.

◆ m_RecursionRecordMap

std::map< ObjID, Record *, std::less<ObjID> > glo::TableReaderInterface::m_RecursionRecordMap
private

If records are read recursively, the already read records come in here.


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