GlobalObjects
Loading...
Searching...
No Matches
glo::TAllSet< T > Class Template Reference

AllSet, which returns objects from the database. More...

#include <GloTAllSet.h>

Inheritance diagram for glo::TAllSet< T >:

Public Member Functions

 TAllSet ()
 
 TAllSet (Base &rBase, bool bWithSubClasses=true)
 
 TAllSet (Base &rBase, const std::string &rsFullIndexName)
 
virtual ~TAllSet ()
 
int get (ObjID &rObjID, std::shared_ptr< T > &rRetVal, EnSeekMode eMode)
 
int get (ObjID &rObjID, T *&prRetVal, EnSeekMode eMode)
 
int get (std::shared_ptr< T > &rRetVal, const ObjID &rObjID)
 
int get (std::shared_ptr< T > &rRetVal, EnSeekMode eMode)
 
int get (T *&prRetVal, EnSeekMode eMode)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
 
int getIndexedOndemands (std::vector< TOndemand< T > > &rOndemandVector, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex)
 
int getOndemand (std::shared_ptr< TOndemand< T > > &rRetVal, EnSeekMode eMode)
 
int getOndemand (TOndemand< T > &rRetVal, EnSeekMode eMode)
 
int getOndemand (TOndemand< T > *&prRetVal, EnSeekMode eMode)
 
virtual int getPersistent (std::shared_ptr< BasePersistent > &rRetVal, const ObjID &rObjID)
 
virtual int setWatch (TdWatchNotifyMode ulWatchMode, CallBack *pCallBack=0)
 
virtual int unsetWatch (TdWatchNotifyMode ulWatchMode, CallBack *pCallBack=0)
 
virtual int getPersistent (BasePersistent *&prRetVal, const ObjID &rObjID)
 Returns an object from the AllSet of the database with passed object ID.
 
int get (T *&prRetVal, const ObjID &rObjID)
 Returns an object from the AllSet of the database with passed object ID.
 
- Public Member Functions inherited from glo::BaseAllSet
 BaseAllSet ()
 
 BaseAllSet (Base &rBase)
 
 BaseAllSet (Base &rBase, unsigned long ulClassID, bool bWithSubClasses=true)
 
 BaseAllSet (Base &rBase, unsigned long ulClassID, const std::string &rsFullIndexName)
 
virtual ~BaseAllSet ()
 
int close ()
 
std::vector< AllSetIndexInfogetAvailableIndices ()
 
std::size_t getAvailableIndicesSize ()
 
unsigned long getClassID () const
 
std::string getFullIndexName () const
 
unsigned long getIndexClassID () const
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexName, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexName, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexName, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsIndexSearchValue, EnQueryType eQuerryType)
 
int getIndexedObjIds (std::list< ObjID > &rObjIDList, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue)
 
std::string getIndexName () const
 
int getObjID (ObjID &rObjID, EnSeekMode eMode)
 
virtual int getTypeAsString (std::string &rsTypeName) override
 
virtual bool inLot (const ObjID &rObjID) const override
 
virtual bool inSet (const ObjID &rObjID) const
 
bool isIndexAvailable (const BaseAllSet::IndexNameClassIdTuple &rIndexNameClassIdTuple)
 
bool isIndexAvailable (const std::string &rsFullIndexName)
 
bool isIndexAvailable (unsigned long ulClassID, const std::string &rsIndexName)
 
int open ()
 
bool readWithSubClasses () const
 
int removeIndexFilter ()
 
virtual void setBase (Base &rBase)
 
virtual void setBase (Base *pBase) override
 
virtual int setCurrentObject (const ObjID &rObjID) override
 
int setFullIndexName (const std::string &rsFullIndexName)
 
int setIndex (const BaseAllSet::IndexNameClassIdTuple &rIndexNameClassIdTuple)
 
int setIndexFilter (const std::string &rsIndexFilter)
 
int setIndexFilter (const std::string &rsIndexFilter, EnComparisionOp eComparisionOp)
 
int setIndexFilter (const std::string &rsRangeStartIndexFilter, const std::string &rsRangeEndIndexFilter)
 
virtual int setPosition (std::size_t nPosition) override
 
void setReadWithSubClasses (bool bWithSubClasses)
 
virtual std::size_t size () const override
 
- Public Member Functions inherited from glo::AbstractBaseLot
 AbstractBaseLot ()
 
virtual ~AbstractBaseLot ()
 
virtual int setCurrentObject (const BasePersistent &rObject)
 
- Public Member Functions inherited from glo::CallBack
 CallBack ()
 
 CallBack (Base &rBase)
 
virtual ~CallBack ()
 
BasegetBase () const
 
virtual void notify (NotifyNote &rNote)
 
CallBackoperator= (const CallBack &rT)
 
bool operator== (const CallBack &rT) const
 Comparison operator, all attributes are compared.
 
bool operator!= (const CallBack &rT) const
 Comparison operator, all attributes are compared.
 

Private Member Functions

 TAllSet (const TAllSet &)
 
TAllSet< T > & operator= (const TAllSet &)
 
void transferObjIListIntoOndemandVector (const std::list< ObjID > &rSourceList, std::vector< TOndemand< T > > &rTargetVevtor)
 

Additional Inherited Members

- Public Attributes inherited from glo::CallBack
std::string m_strDebugInfo
 
- Protected Member Functions inherited from glo::BaseAllSet
void setAllSetOpen (bool bOpen)
 
int setAvailableIndices ()
 
virtual void setClassID (unsigned long ulClassID)
 
void setClassIDFromTemplate (unsigned long ulClassID)
 
- Protected Member Functions inherited from glo::CallBack
 CallBack (const CallBack &rT)
 

Detailed Description

template<class T>
class glo::TAllSet< T >

AllSet, which returns objects from the database.

AllSets contains all instances of an object type in the database.

When an object of this class is instantiated and opened (only works with a valid database), the Manager creates an iterator that allows iteration through the internal AllSet. In the destructor the Manager is notified, which destroys the iterator again.

Attention
This means that a TAllSet must always be removed from memory before the Base.
int main( int argc, char* argv[] )
{
int t_iErr = 0;
FirstGloBaseObjCreator t_ObjCreator;
glo::Base t_Base( "LOCAL", "WindowsWatcher", t_ObjCreator );
t_iErr = t_Base.openBase();
if ( ! t_iErr )
{
std::shared_ptr<FirstClass> t_spShowPersObject;
glo::TAllSet<FirstClass> t_AllSet( t_Base );
t_iErr = t_AllSet.get( t_spShowPersObject, glo::START );
if ( ! t_iErr )
{
do
{
std::cout << "From AllSet ObjId: "
<< t_spShowPersObject->getObjID().toString()
<< "\n" ;
t_iErr = t_AllSet.get( t_spShowPersObject, glo::NEXT );
} while ( ! t_iErr );
}
t_iErr = ( t_iErr == glo::ERR_RANGE ? 0 : t_iErr );
t_Base.closeBase();
}
return t_iErr;
}
This class is the interface to the persistent objects. Here "objects" can be registered,...
Definition GloBase.h:250
AllSet, which returns objects from the database.
Definition GloTAllSet.h:171
@ ERR_RANGE
Definition GloErrors.h:417
@ START
Definition GloTypes.h:177
@ NEXT
Definition GloTypes.h:210

Indexesbr> An AllSet can also be instantiated with an index or an index can be set (see BaseAllSet::setIndexName (...) ) if the index is defined in the schema. When iterating through the objects, the sorting of the selected index is used.

If an index is set, it is possible to filter the output during iteration (see setIndexFilter( const std::string & rsIndexFilter ), setIndexFilter( const std::string & rsIndexFilter, EnComparisionOp eComparisionOp )
and
setIndexFilter( const std::string & rsRangeStartIndexFilter, const std::string & rsRangeEndIndexFilter ).

An AllSet can also return result sets, which can be restricted as with filtering (see
getIndexedObjIds( std::list< ObjID > & rObjIDList, const std::string & rsIndexSearchValue, EnQueryType eQuerryType ),
getIndexedObjIds( std::list< ObjID > & rObjIDList, const std::string & rsIndexSearchValue, EnComparisionOp eComparisionOp ),
getIndexedObjIds( std::list< ObjID > & rObjIDList, const std::string & rsRangeStartIndexSearchValue, const std::string & rsRangeEndIndexSearchValue ),
getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector, const std::string & rsIndex, EnQueryType eQuerryType ),
getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector, const std::string & rsIndex, EnComparisionOp eComparisionOp )
and
getIndexedOndemands( std::vector< TOndemand<T> > & rOndemandVector, const std::string & rsRangeStartIndex, const std::string & rsRangeEndIndex ).

Watch / Notify
An AllSet can be observed with its objects and corresponding observers can be notified (see also TAllSet< T >::setWatch (...) and TAllSet< T >::unsetWatch (...).

Attention
A TAllSet must always be removed from memory before the Base.
Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ TAllSet() [1/4]

template<class T >
glo::TAllSet< T >::TAllSet ( )

Standard constructor.

◆ TAllSet() [2/4]

template<class T >
glo::TAllSet< T >::TAllSet ( Base & rBase,
bool bWithSubClasses = true )

Constructor with parameter passing.

Parameters
[in]rBaseThe authoritative database is passed.
[in]bWithSubClassesIf false, only objects of the template type without subclasses are considered.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ TAllSet() [3/4]

template<class T >
glo::TAllSet< T >::TAllSet ( Base & rBase,
const std::string & rsFullIndexName )

Constructor with parameter passing.

Parameters
[in]rBaseThe authoritative database is passed.
[in]rsFullIndexNameAn AllSet can be sorted by an index. The index name must be passed preceded by the full class name (e.g. "mynamespace::MyClassName.IndexName").
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ ~TAllSet()

template<class T >
glo::TAllSet< T >::~TAllSet ( )
virtual

Destructor.

◆ TAllSet() [4/4]

template<class T >
glo::TAllSet< T >::TAllSet ( const TAllSet< T > & )
private

The copy constructor is not available.

Member Function Documentation

◆ get() [1/6]

template<class T >
int glo::TAllSet< T >::get ( ObjID & rObjID,
std::shared_ptr< T > & rRetVal,
EnSeekMode eMode )

Returns an object ID and if possible a object in a std::shared_ptr from the AllSet of the database in relation to eMode. This also allows iteration over read-locked objects (only the object ID is returned).

Parameters
[in,out]rObjIDThe object ID.
[in,out]rRetValThe object in std::shared_ptr, if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return value < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet. If you return == ERR_OBJECT_LOCKED, no object is returned but the object ID of the locked object is.

◆ get() [2/6]

template<class T >
int glo::TAllSet< T >::get ( ObjID & rObjID,
T *& prRetVal,
EnSeekMode eMode )

Returns an object ID and if possible a object from the AllSet of the database in relation to eMode. This also allows iteration over read-locked objects (only the object ID is returned).

Parameters
[in,out]rObjIDThe object ID.
[in,out]prRetValThe object, if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return value < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet. If you return == ERR_OBJECT_LOCKED, no object is returned but the object ID of the locked object is.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance using Persistent::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method get(ObjID&, std::shared_ptr<T>&, EnSeekMode)

◆ get() [3/6]

template<class T >
int glo::TAllSet< T >::get ( std::shared_ptr< T > & rRetVal,
const ObjID & rObjID )

Returns an object in a std::shared_ptr from the AllSet of the database with passed object ID.

Parameters
[in,out]rRetValIf no error, the fetched object in a std::shared_ptr.
[in]rObjIDThe object ID.
Returns
A return value < 0 indicates an error.

◆ get() [4/6]

template<class T >
int glo::TAllSet< T >::get ( std::shared_ptr< T > & rRetVal,
EnSeekMode eMode )

Returns a object from the AllSet of the referenced database in relation to eMode.

Parameters
[in,out]rRetValThe object in a std::shared_ptr if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.

◆ get() [5/6]

template<class T >
int glo::TAllSet< T >::get ( T *& prRetVal,
const ObjID & rObjID )

Returns an object from the AllSet of the database with passed object ID.

Parameters
[in,out]prRetValIf no error, the fetched object.
[in]rObjIDThe object ID.
Returns
A return value < 0 indicates an error.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance using GenericPersistent::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getPersistent(std::shared_ptr<BasePersistent>&, const ObjID&) or get( std::shared_ptr<T> & rRetVal, const ObjID & rObjID )

◆ get() [6/6]

template<class T >
int glo::TAllSet< T >::get ( T *& prRetVal,
EnSeekMode eMode )

Returns a object from the AllSet of the referenced database in relation to eMode.

Parameters
[in,out]prRetValThe object if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance using Persistent::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method get(stdstd::shared_ptr<T>&, EnSeekMode)

◆ getIndexedOndemands() [1/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexName,
const std::string & rsIndexSearchValue,
EnComparisionOp eComparisionOp )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters. The result can be defined using the parameter eComparisionOp. If e.g. parameter sIndex has the value "123" and parameter eComparisionOp has the value LESS, only all objects with the index lower than 123 will be delivered.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsIndexNameThe index name of the index to be searched.
[in]rsIndexSearchValueThe index value.
[in]eComparisionOpThe comparison operator. For example, if rsIndex has the value "123" and eComparisionOp has the value LESS, all objects with the index less than 123 are returned.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [2/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexName,
const std::string & rsIndexSearchValue,
EnQueryType eQuerryType )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsIndexNameThe index name of the index to be searched.
[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. Please note; OQL is not yet implemented!
[in]eQuerryTypeThe query type.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [3/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexName,
const std::string & rsRangeStartIndexSearchValue,
const std::string & rsRangeEndIndexSearchValue )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters. The result can be defined with a range specification. For example, if parameter rsRangeStartIndexSearchValue has the value "123" and parameter rsRangeEndIndexSearchValue has the value "155", only all objects with an index greater than/equal to 123 and less than/equal to 155 will be delivered.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this list.
[in]rsIndexNameThe index name of the index to be searched.
[in]rsRangeStartIndexSearchValueThe start index value.
[in]rsRangeEndIndexSearchValueThe end index value.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [4/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexName,
unsigned long ulIndexClassID,
const std::string & rsIndexSearchValue,
EnComparisionOp eComparisionOp )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters. The result can be defined using the parameter eComparisionOp. If e.g. parameter sIndex has the value "123" and parameter eComparisionOp has the value LESS, only all objects with the index lower than 123 will be delivered.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsIndexNameThe index name of the index to be searched.
[in]ulIndexClassIDThe ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass.
[in]rsIndexSearchValueThe index value.
[in]eComparisionOpThe comparison operator. For example, if rsIndex has the value "123" and eComparisionOp has the value LESS, all objects with the index less than 123 are returned.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [5/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexName,
unsigned long ulIndexClassID,
const std::string & rsIndexSearchValue,
EnQueryType eQuerryType )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsIndexNameThe index name of the index to be searched.
[in]ulIndexClassIDThe ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass.
[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. Please note; OQL is not yet implemented!
[in]eQuerryTypeThe query type.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [6/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexName,
unsigned long ulIndexClassID,
const std::string & rsRangeStartIndexSearchValue,
const std::string & rsRangeEndIndexSearchValue )

Returns a list of TOndemand's from AllSet in relation to the passed parameters. The result can be defined with a range specification. For example, if parameter rsRangeStartIndexSearchValue has the value "123" and parameter rsRangeEndIndexSearchValue has the value "155", only all objects with an index greater than/equal to 123 and less than/equal to 155 will be delivered.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsIndexNameThe index name of the index to be searched.
[in]ulIndexClassIDThe ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass.
[in]rsRangeStartIndexSearchValueThe start index value.
[in]rsRangeEndIndexSearchValueThe end index value.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [7/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexSearchValue,
EnComparisionOp eComparisionOp )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters. The result can be defined using the parameter eComparisionOp. If e.g. parameter sIndex has the value "123" and parameter eComparisionOp has the value LESS, only all objects with the index lower than 123 will be delivered.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsIndexSearchValueThe index value.
[in]eComparisionOpThe comparison operator. For example, if rsIndex has the value "123" and eComparisionOp has the value LESS, all objects with the index less than 123 are returned.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [8/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsIndexSearchValue,
EnQueryType eQuerryType )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[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. Please note; OQL is not yet implemented!
[in]eQuerryTypeThe query type.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getIndexedOndemands() [9/9]

template<class T >
int glo::TAllSet< T >::getIndexedOndemands ( std::vector< TOndemand< T > > & rOndemandVector,
const std::string & rsRangeStartIndex,
const std::string & rsRangeEndIndex )

Returns a vector of TOndemand's from AllSet in relation to the passed parameters. The result can be defined with a range specification. For example, if parameter rsRangeStartIndex has the value "123" and parameter rsRangeEndIndex has the value "155", only all objects with an index greater than/equal to 123 and less than/equal to 155 will be delivered.

Parameters
[in,out]rOndemandVectorThe TOndemand's found are returned to this vector.
[in]rsRangeStartIndexThe start index value.
[in]rsRangeEndIndexThe end index value.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.
See also
setIndexName(const std::string&)

◆ getOndemand() [1/3]

template<class T >
int glo::TAllSet< T >::getOndemand ( std::shared_ptr< TOndemand< T > > & rRetVal,
EnSeekMode eMode )

Returns a TOndemand object in a std::shared_ptr from the AllSet of the referenced database in relation to eMode.

Parameters
[in,out]rRetValThe object in a std::shared_ptr if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.

◆ getOndemand() [2/3]

template<class T >
int glo::TAllSet< T >::getOndemand ( TOndemand< T > & rRetVal,
EnSeekMode eMode )

Returns a object in passed TOndemand from the AllSet of the referenced database in relation to eMode.

Parameters
[in,out]rRetValThe object in the passed TOndemand if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.

◆ getOndemand() [3/3]

template<class T >
int glo::TAllSet< T >::getOndemand ( TOndemand< T > *& prRetVal,
EnSeekMode eMode )

Returns a new TOndemand object from the AllSet of the referenced database in relation to eMode.

Parameters
[in,out]prRetValThe object in a new TOndemand if found.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getOndemand(std::shared_ptr< TOndemand<T> >&, EnSeekMode) or getOndemand(TOndemand<T>&, EnSeekMode)

◆ getPersistent() [1/2]

template<class T >
int glo::TAllSet< T >::getPersistent ( BasePersistent *& prRetVal,
const ObjID & rObjID )
virtual

Returns an object from the AllSet of the database with passed object ID.

Parameters
[in,out]prRetValIf no error, the fetched object.
[in]rObjIDThe object ID.
Returns
A return value < 0 indicates an error.
Attention
If prRetVal is valid, this object must be removed from memory by the calling instance using GenericPersistent::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getPersistent(std::shared_ptr<BasePersistent>&, const ObjID&) or get( std::shared_ptr<T> & rRetVal, const ObjID & rObjID )

Implements glo::AbstractBaseLot.

◆ getPersistent() [2/2]

template<class T >
int glo::TAllSet< T >::getPersistent ( std::shared_ptr< BasePersistent > & rRetVal,
const ObjID & rObjID )
virtual

Returns an object with passed object ID from the container.

Parameters
[in,out]rRetValIf no error, the fetched object.
[in]rObjIDThe object ID.
Returns
A return value < 0 indicates an error.

Reimplemented from glo::AbstractBaseLot.

◆ operator=()

template<class T >
TAllSet< T > & glo::TAllSet< T >::operator= ( const TAllSet< T > & )
private

The assignment operator is not available.

◆ setWatch()

template<class T >
int glo::TAllSet< T >::setWatch ( TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack = 0 )
virtual

The AllSet is monitored in the database.

Parameters
[in]ulWatchModeThe monitoring mode.
Allowed watch modes:
[in]pCallBackThe CallBack object that is notified via its method CallBack::notify(NotifyNote&). If no CallBack is passed, notify(NotifyNote&) is taken from this; in this case the method notify(NotifyNote&) should be overwritten in the respective derived class.
Returns
A return value < 0 indicates an error.
Note
To remove the monitoring, the corresponding method unsetWatch(TdWatchNotifyMode, CallBack*) with same parameter values can be used.
Attention
Basically pCallBack must not be destroyed before the monitoring has been cancelled!
See also
Watch and notify.

Implements glo::BaseAllSet.

◆ transferObjIListIntoOndemandVector()

template<class T >
void glo::TAllSet< T >::transferObjIListIntoOndemandVector ( const std::list< ObjID > & rSourceList,
std::vector< TOndemand< T > > & rTargetVevtor )
private

Transfers the ObjID's from the transferred rSourceList as TOndemand's into the transferred rTargetVevtor.

Parameters
[in]rSourceListThe list with the ObjID's.
[in,out]rTargetVevtorThe resulting vector of TOndemand's.

◆ unsetWatch()

template<class T >
int glo::TAllSet< T >::unsetWatch ( TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack = 0 )
virtual

Monitoring of the AllSet in the referenced database is cancelled.

Parameters
[in]ulWatchModeThe monitoring mode.
Allowed watch modes:
[in]pCallBackThe CallBack object, which should be notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
Clears the monitoring initiated by the corresponding method setWatch(TdWatchNotifyMode, CallBack*) if the parameters have the same values.
See also
Watch and notify.

Implements glo::BaseAllSet.


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