Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

O3DBIRecordSet Class Reference

#include <O3DBIRecordSet.h>

Inheritance diagram for O3DBIRecordSet:

Inheritance graph
[legend]
Collaboration diagram for O3DBIRecordSet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 O3DBIRecordSet ()
 O3DBIRecordSet (const O3DBIRecordSet &records)
 O3DBIRecordSet (TRecordSetConstIter &first, TRecordSetConstIter &last)
virtual ~O3DBIRecordSet ()
bool operator== (const O3DBIRecordSet &other) const
TRecordIndex InsertRecord (const O3DBIRecord &record)
O3DBIRecord GetRecord (TRecordIndex index) const
const O3DBIRecordoperator[] (TRecordIndex index) const
TO3DBIResult RemoveRecord (const O3DBIRecord &record)
TO3DBIResult RemoveRecord (TRecordIndex index)
TRecordSetGetRecords (void)
TRecordSetSize GetRecordCount (void) const
void CancelModified (void)
bool IsModified (void) const
virtual TO3DBIString ToString (void) const

Detailed Description

An object of class O3DBIRecordSet is used to store a result set of a database query, i.e. a certain amount of O3DBIRecord objects, or to prepare a certain amount of O3DBIRecord objects with intent to store them in the Oracle data base.

Definition at line 78 of file O3DBIRecordSet.h.


Constructor & Destructor Documentation

O3DBIRecordSet::O3DBIRecordSet  ) 
 

The default constructor.

Definition at line 19 of file O3DBIRecordSet.cpp.

O3DBIRecordSet::O3DBIRecordSet const O3DBIRecordSet records  ) 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

A copy constructor.

Parameters:
records is a const reference to another O3DBIRecordSet object.

Definition at line 24 of file O3DBIRecordSet.cpp.

References _records.

O3DBIRecordSet::O3DBIRecordSet TRecordSetConstIter first,
TRecordSetConstIter last
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

An initialization constructor, initializing the new O3DBIRecordSet object with a range of O3DBIRecord objects which are copied from a TRecordSet container.

Parameters:
first is an iterator of a TDataFields container, pointing to an element of type O3DBIDataField.
last is an iterator of a TDataFields container, pointing to an element of type O3DBIDataField.
Note:
[first, last) must be a valid range.

Definition at line 29 of file O3DBIRecordSet.cpp.

O3DBIRecordSet::~O3DBIRecordSet  )  [virtual]
 

The virtual destructor.

Definition at line 36 of file O3DBIRecordSet.cpp.


Member Function Documentation

void O3DBIRecordSet::CancelModified void   ) 
 

Use this member function to cancel all modified flags of all data fields in all O3DBIRecord objects the O3DBIRecordSet consistst of.

See also:
O3DBIRecord::CancelModified, O3DBIDataField::CancelModified

Definition at line 114 of file O3DBIRecordSet.cpp.

References O3DBIRecord::CancelModified(), and TRecordSetIter.

O3DBIRecord O3DBIRecordSet::GetRecord TRecordIndex  index  )  const
 

Call this member function to get access to a specified record, when its index is known.

See also:
O3DBIRecordSet::operator[]
Parameters:
index is the zero-based index number of the record.
Returns:
An O3DBIRecord object on success.
Exceptions:
O3DBIException - if the specified record doesn't exist (invalid index parameter).

Definition at line 65 of file O3DBIRecordSet.cpp.

TRecordSetSize O3DBIRecordSet::GetRecordCount void   )  const
 

Call this member function to get the amount of O3DBIRecord objects the O3DBIRecord object consists of.

Returns:
The amount of records or 0, if no O3DBIRecord object is managed by the O3DBIRecordSet object.

Definition at line 109 of file O3DBIRecordSet.cpp.

References TRecordSetSize.

Referenced by ToString().

TRecordSet & O3DBIRecordSet::GetRecords void   ) 
 

Access to the internal TRecordSet container, managing the O3DBIRecord objects the O3DBIRecordSet object consistst of.

Returns:
A reference to the TRecordSet vector instance.

Definition at line 104 of file O3DBIRecordSet.cpp.

References TRecordSet.

TRecordIndex O3DBIRecordSet::InsertRecord const O3DBIRecord record  ) 
 

Call this member function to add an O3DBIRecord object to the O3DBIRecordSet object. The new O3DBIRecord object will be inserted at the end of the internal TRecordSet container.

Parameters:
record is a const reference to an O3DBIRecord object.
Returns:
The index of the inserted element on success, otherwise -1.
Example of usage

Definition at line 52 of file O3DBIRecordSet.cpp.

References O3DBIRecord::GetFieldCount().

bool O3DBIRecordSet::IsModified void   )  const
 

Use this member function to determine if the record set is marked as modified. An O3DBIRecordSet is modified, if one or more fields in one or more O3DBIRecord objects the O3DBIRecordSet consists of is/are marked as modified.

See also:
O3DBIRecord::IsModified, O3DBIDataField::IsModified
Returns:
true, if the O3DBIRecordSet object contains one ore more O3DBIRecords whose modified flag(s) is/are set, otherwise false.

Definition at line 124 of file O3DBIRecordSet.cpp.

References TRecordSetConstIter.

bool O3DBIRecordSet::operator== const O3DBIRecordSet other  )  const
 

An operator 'is equal to' to compare O3DBIRecordSet objects. Two O3DBIRecordSet's are equal, if they manage the same amount of O3DBIRecord objects and if those O3DBIRecord objects are equal.

Returns:
true, if the O3DBIRecordSet's are equal, false otherwise.

Definition at line 44 of file O3DBIRecordSet.cpp.

References _records.

const O3DBIRecord & O3DBIRecordSet::operator[] TRecordIndex  index  )  const
 

Call this operator to get access to a specified record, when its index is known.

See also:
O3DBIRecordSet::GetRecord
Parameters:
index is the zero-based index number of the record.
Returns:
A const reference to the record on success.
Exceptions:
O3DBIException - if the specified field doesn't exist (invalid index parameter).

Definition at line 74 of file O3DBIRecordSet.cpp.

TO3DBIResult O3DBIRecordSet::RemoveRecord TRecordIndex  index  ) 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this member function to delete a specified record.

Parameters:
index is the zero-based index number of the record to remove.
Returns:
OSUCCESS if the defined field was existing and could be deleted successfully, OFAILED otherwise.

Definition at line 95 of file O3DBIRecordSet.cpp.

References RemoveRecord(), and TO3DBIResult.

TO3DBIResult O3DBIRecordSet::RemoveRecord const O3DBIRecord record  ) 
 

Call this member function to delete a specified record.

Parameters:
record is a const reference to an O3DBIRecord object, defining the record to be removed.
Returns:
OSUCCESS if the defined record was existing and could be deleted successfully, OFAILED otherwise.

Definition at line 83 of file O3DBIRecordSet.cpp.

References TO3DBIResult, and TRecordSetIter.

Referenced by RemoveRecord().

TO3DBIString O3DBIRecordSet::ToString void   )  const [virtual]
 

This member function returns a string that "textually represents" this object.

Returns:
A TO3DBIString object containing the string.

Reimplemented from O3DBIObject.

Definition at line 132 of file O3DBIRecordSet.cpp.

References GetRecordCount(), TO3DBIString, O3DBIRecord::ToString(), and TRecordSetConstIter.


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


SourceForge.net Logo Generated on Sun Jan 23 11:36:47 2005 for Oracle Object Oriented Database Interface (O3DBI) by  doxygen 1.3.9.1