GlobalObjects
Loading...
Searching...
No Matches
glo::TransactionManager::TransactionStep Class Reference

Objects of this class reflect a record operation. More...

#include <GloTransactionManager.h>

Inheritance diagram for glo::TransactionManager::TransactionStep:

Public Member Functions

 TransactionStep (EnStoreDelete eAction, Record *pActionRecord, bool bLocalCopy=false)
 
virtual ~TransactionStep ()
 
TransactionManager::EnStoreDelete getAction () const
 
const RecordgetActionRecord () const
 
void getActionRecord (Record *&prRetVal) const
 
ObjID getActionRecordObjID () const
 
bool hasLocalCopy ()
 
int takeOverObjIDsFilePos (const Record &rSourceRecord)
 
- Public Member Functions inherited from glo::TransactionManager::TransactionBase
 TransactionBase ()
 
virtual ~TransactionBase ()
 

Protected Member Functions

 TransactionStep ()
 

Private Member Functions

 TransactionStep (const TransactionStep &)
 
TransactionManager::TransactionStepoperator= (const TransactionStep &)
 

Private Attributes

bool m_bLocalCopyRecord
 
TransactionManager::EnStoreDelete m_eAction
 
Recordm_pActionRecord
 

Detailed Description

Objects of this class reflect a record operation.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ TransactionStep() [1/3]

glo::TransactionManager::TransactionStep::TransactionStep ( )
protected

The standard constructor is not available.

◆ TransactionStep() [2/3]

glo::TransactionManager::TransactionStep::TransactionStep ( EnStoreDelete eAction,
Record * pActionRecord,
bool bLocalCopy = false )

Constructor with parameter passing.

Parameters
[in]eActionThe action how to handle the data set; save or delete.
[in]pActionRecordThe record to be saved or deleted. The record is copied and not 'remembert'. If in a server, the records are different anyway, if not, a deep copy is made, then set parameter bDeepCopy == true.
The pActionRecord is needed for real save/delete and as return for the reader of the transaction owner.
[in]bLocalCopyIf true, a local copy of the record is created.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ TransactionStep() [3/3]

glo::TransactionManager::TransactionStep::TransactionStep ( const TransactionStep & )
private

The copy constructor is not available.

◆ ~TransactionStep()

virtual glo::TransactionManager::TransactionStep::~TransactionStep ( )
virtual

Destructor.

Member Function Documentation

◆ getAction()

TransactionManager::EnStoreDelete glo::TransactionManager::TransactionStep::getAction ( ) const

Returns the action how to handle the record; save or delete.

Returns
See above.

◆ getActionRecord() [1/2]

const Record * glo::TransactionManager::TransactionStep::getActionRecord ( ) const

Returns a pointer to the record to be saved or deleted.

Returns
See above.
Attention
The calling instance should not change the record, let alone remove it from memory. The record may only live as long as the returning TransactionStep.

◆ getActionRecord() [2/2]

void glo::TransactionManager::TransactionStep::getActionRecord ( Record *& prRetVal) const

Returns the record to be saved or deleted.

Parameters
[in,out]prRetValThe record to be saved or deleted.
Attention
The calling instance must remove the returned record from memory using Record::forget().

◆ getActionRecordObjID()

ObjID glo::TransactionManager::TransactionStep::getActionRecordObjID ( ) const

Returns the object ID of the data set to be saved or deleted.

Returns
See above.

◆ hasLocalCopy()

bool glo::TransactionManager::TransactionStep::hasLocalCopy ( )

Checks if a locally copied record exists.

Returns
If true, a locally copied record exists.

◆ operator=()

TransactionManager::TransactionStep & glo::TransactionManager::TransactionStep::operator= ( const TransactionStep & )
private

The assignment operator is not available.

◆ takeOverObjIDsFilePos()

int glo::TransactionManager::TransactionStep::takeOverObjIDsFilePos ( const Record & rSourceRecord)

If the object IDs of the data set to be saved or deleted and the transferred data set match, the file positions of the object ID attributes of the transferred data set are transferred to the data set to be saved or deleted and to the locally copied data set.

Parameters
[in]rSourceRecordThe data set from which the file positions in the table of attributes are to be transferred.
Returns
A return value < 0 indicates an error.
See also
Record::takeOverObjIDsFilePos( const Record & rSourceRecord )

Member Data Documentation

◆ m_bLocalCopyRecord

bool glo::TransactionManager::TransactionStep::m_bLocalCopyRecord
private

If the database is opened in local mode, a copy of the record must be created, because values of the record may only be set when realy saving.

◆ m_eAction

TransactionManager::EnStoreDelete glo::TransactionManager::TransactionStep::m_eAction
private

The action how to handle the record; save or delete.

◆ m_pActionRecord

Record* glo::TransactionManager::TransactionStep::m_pActionRecord
private

The record to be saved or deleted.


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