Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Record Class Reference

#include <Record.h>

Collaboration diagram for Record:

Collaboration graph

[legend]
List of all members.

Public Types

typedef std::vector<rColumn*> vectormColumn
 vector holding defined mColumn objects for the template. More...


Public Methods

 Record (dbMeta* pdbMeta)
 Contruct the record buffer for this instance. More...

virtual ~Record ()
rColumngetColumn (int col)
 Return a record column object by column number. More...

rColumngetColumn (const nsAReadableString& name)
 Return a record column object by column name. More...

rColumngetIdColumn ()
 Return the record column object for the id column. More...

rColumngetMaster ()
 Return the master record object for a slave column. More...

void setMaster (rColumn* pMaster)
 Set the master column for a slave record. More...

dbMetagetMeta ()
 Get the static data for this record. More...

int size ()
 Count of columns in this record. More...

void clearError ()
 Clear error message cache for all columns. More...

void copyCurrent ()
 Put the current value of the record into the new and old values. More...

void update ()
 Put the new record value into the current value. More...

void setDefault ()
 Set the current record value from the static defaults. More...


Public Attributes

vectormColumn m_columns

Private Types

typedef std::map<const nsAReadableString*,
rColumn*, compareARS
mapStringColumn
 hash of columns based on column name. More...


Private Attributes

mapStringColumn m_hColumns
dbMetam_pdbMeta
 Reference to the static definition of this record. More...

rColumnm_pMaster
 used by a slave record to back reference to it's master. More...

rColumnm_pIdCol
 reference to the primary key column for the record. More...


Member Typedef Documentation

typedef std::map<const nsAReadableString*, rColumn*, compareARS> Record::mapStringColumn [private]
 

hash of columns based on column name.

Definition at line 30 of file Record.h.

typedef std::vector<rColumn*> Record::vectormColumn
 

vector holding defined mColumn objects for the template.

Definition at line 24 of file Record.h.


Constructor & Destructor Documentation

Record::Record ( dbMeta * pdbMeta )
 

Contruct the record buffer for this instance.

Link it to the static column descriptions. Build and lin a record instance for any slave columns. Remember which column is the id column.

Definition at line 33 of file Record.cpp.

Record::~Record ( ) [virtual]
 

Definition at line 52 of file Record.cpp.


Member Function Documentation

void Record::clearError ( )
 

Clear error message cache for all columns.

Definition at line 128 of file Record.cpp.

Referenced by Transaction::aDelete(), Transaction::aInsert(), Transaction::aNew(), and Transaction::aUpdate().

void Record::copyCurrent ( )
 

Put the current value of the record into the new and old values.

Definition at line 139 of file Record.cpp.

Referenced by Transaction::validateFields(), and Report::validateFields().

rColumn * Record::getColumn ( const nsAReadableString & name )
 

Return a record column object by column name.

Parameters:
name   column name

Definition at line 74 of file Record.cpp.

rColumn * Record::getColumn ( int col )
 

Return a record column object by column number.

Parameters:
col   column number

Definition at line 64 of file Record.cpp.

Referenced by Transaction::buildRecord(), Report::buildRecord(), Transaction::validateFields(), and Report::validateFields().

rColumn * Record::getIdColumn ( )
 

Return the record column object for the id column.

Definition at line 86 of file Record.cpp.

Referenced by Transaction::buildDocument(), Transaction::buildXML(), Report::buildXML(), Transaction::doInsert(), and Transaction::doUpdate().

rColumn * Record::getMaster ( )
 

Return the master record object for a slave column.

Null if record is a master.

Definition at line 94 of file Record.cpp.

Referenced by Transaction::doSelect(), and Report::doSelect().

dbMeta * Record::getMeta ( )
 

Get the static data for this record.

Definition at line 112 of file Record.cpp.

Referenced by Transaction::aSeek(), Transaction::buildXML(), Report::buildXML(), Transaction::doDelete(), Transaction::doInsert(), Transaction::doSelect(), Report::doSelect(), and Transaction::doUpdate().

void Record::setDefault ( )
 

Set the current record value from the static defaults.

Definition at line 161 of file Record.cpp.

Referenced by Transaction::aInsert().

void Record::setMaster ( rColumn * pMaster )
 

Set the master column for a slave record.

Set automatically when slave is constructed

Parameters:
master   column in master record

Definition at line 104 of file Record.cpp.

Referenced by Record::rColumn::putSlave().

int Record::size ( )
 

Count of columns in this record.

Definition at line 120 of file Record.cpp.

Referenced by Record().

void Record::update ( )
 

Put the new record value into the current value.

Definition at line 150 of file Record.cpp.

Referenced by Transaction::aInsert(), Transaction::aNew(), Transaction::doDelete(), and Transaction::doUpdate().


Member Data Documentation

vectormColumn Record::m_columns
 

Definition at line 25 of file Record.h.

mapStringColumn Record::m_hColumns [private]
 

Definition at line 31 of file Record.h.

rColumn * Record::m_pIdCol [private]
 

reference to the primary key column for the record.

Definition at line 43 of file Record.h.

rColumn * Record::m_pMaster [private]
 

used by a slave record to back reference to it's master.

Definition at line 39 of file Record.h.

dbMeta * Record::m_pdbMeta [private]
 

Reference to the static definition of this record.

Definition at line 35 of file Record.h.


The documentation for this class was generated from the following files:
Generated at Tue Sep 12 16:29:55 2000 by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000