SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions | Friends
RWDBTableEntry Class Reference

Class to hold RWDBTable metadata for cache managers. More...

#include <rw/db/cachemgr.h>

Public Member Functions

 RWDBTableEntry ()
 
 RWDBTableEntry (const RWDBTableEntry &entry)
 
void clearCheckConstraints ()
 
void clearExists ()
 
void clearForeignKeys ()
 
void clearIsView ()
 
void clearPrimaryKey ()
 
void clearReferredToBy ()
 
void clearSchema ()
 
void clearUniqueConstraints ()
 
const RWDBCheckConstraintListgetCheckConstraints () const
 
bool getExists () const
 
const RWDBForeignKeyListgetForeignKeys () const
 
bool getIsView () const
 
RWDBTable::Metadata getMetadata () const
 
RWDBPrimaryKey getPrimaryKey () const
 
const RWDBForeignKeyListgetReferredToBy () const
 
RWDBSchema getSchema () const
 
const RWDBUniqueConstraintListgetUniqueConstraints () const
 
bool hasCheckConstraints () const
 
bool hasExists () const
 
bool hasForeignKeys () const
 
bool hasIsView () const
 
bool hasPrimaryKey () const
 
bool hasReferredToBy () const
 
bool hasSchema () const
 
bool hasUniqueConstraints () const
 
RWDBTableEntryoperator= (const RWDBTableEntry &entry)
 
void setCheckConstraints (const RWDBCheckConstraintList &cc)
 
void setExists (bool exists)
 
void setForeignKeys (const RWDBForeignKeyList &fk)
 
void setIsView (bool isView)
 
void setPrimaryKey (const RWDBPrimaryKey &pk)
 
void setReferredToBy (const RWDBForeignKeyList &rk)
 
void setSchema (const RWDBSchema &schema)
 
void setSchema (const RWDBSchema &schema, RWDBTable::Metadata md)
 
void setUniqueConstraints (const RWDBUniqueConstraintList &uc)
 

Friends

RWvostreamoperator<< (RWvostream &strm, const RWDBTableEntry &item)
 
RWFileoperator<< (RWFile &file, const RWDBTableEntry &item)
 
RWvistreamoperator>> (RWvistream &strm, RWDBTableEntry &obj)
 
RWFileoperator>> (RWFile &file, RWDBTableEntry &obj)
 

Detailed Description

RWDBTableEntry is a class for moving RWDBTable metadata in and out of a cache manager class that inherits from RWDBCacheManager.

Synopsis
#include <rw/db/cachemgr.h>
#include <rw/tvhmap.h>
class MyCacheManager : public RWDBCacheManager
{
void setTable(const RWCString& name, const RWDBTableEntry& tEntry) {
tCache.insert(name, tEntry);
}
RWDBTableEntry getTable(const RWCString& name) const {
tCache.findValue(name, tEntry);
return tEntry;
}
private:
};

Constructor & Destructor Documentation

RWDBTableEntry::RWDBTableEntry ( )

Constructs an empty object with no metadata information.

RWDBTableEntry::RWDBTableEntry ( const RWDBTableEntry entry)

Copies all metadata information from entry.

Member Function Documentation

void RWDBTableEntry::clearCheckConstraints ( )

Clears the RWDBCheckConstraintList set on self. After this call hasCheckConstraints() returns false.

void RWDBTableEntry::clearExists ( )

Clears the exists flag on self. After this call hasExists() returns false.

void RWDBTableEntry::clearForeignKeys ( )

Clears the RWDBForeignKeyList set on self. After this call hasForeignKeys() returns false.

void RWDBTableEntry::clearIsView ( )

Clears the isView flag on self. After this call hasIsView() returns false.

void RWDBTableEntry::clearPrimaryKey ( )
Deprecated:
As of SourcePro 13.1, use setSchema() to set a schema that has no primary key.
void RWDBTableEntry::clearReferredToBy ( )

Clears the referredToBy list set on self. After this call hasReferredToBy() returns false.

void RWDBTableEntry::clearSchema ( )

Clears the RWDBSchema set on self. After this call hasSchema() returns false.

void RWDBTableEntry::clearUniqueConstraints ( )

Clears the RWDBUniqueConstraintList set on self. After this call hasUniqueConstraints() returns false.

const RWDBCheckConstraintList& RWDBTableEntry::getCheckConstraints ( ) const

Returns the RWDBCheckConstraintList set on self.

Note
If hasCheckConstraints() returns false this call returns an empty RWDBCheckConstraintList.
bool RWDBTableEntry::getExists ( ) const

Returns the exists flag set on self.

Note
If hasExists() returns false this call returns false.
const RWDBForeignKeyList& RWDBTableEntry::getForeignKeys ( ) const

Returns the RWDBForeignKeyList set on self.

Note
If hasForeignKeys() returns false this call returns an empty RWDBForeignKeyList.
bool RWDBTableEntry::getIsView ( ) const

Returns the isView flag set on self.

Note
If hasIsView() returns false this call returns false.
RWDBTable::Metadata RWDBTableEntry::getMetadata ( ) const

Returns the RWDBTable::Metadata set on self for the associated schema. Indicates the metadata information that is currently known by the schema.

RWDBPrimaryKey RWDBTableEntry::getPrimaryKey ( ) const
Deprecated:
As of SourcePro 13.1, use getSchema().primaryKey() to get the RWDBPrimaryKey on the underlying schema.
const RWDBForeignKeyList& RWDBTableEntry::getReferredToBy ( ) const

Returns the referredToBy list set on self.

Note
If hasReferredToBy() returns false this call returns an empty RWDBForeignKeyList.
RWDBSchema RWDBTableEntry::getSchema ( ) const

Returns the RWDBSchema set on self.

Note
If hasSchema() returns false this call returns an empty RWDBSchema.
const RWDBUniqueConstraintList& RWDBTableEntry::getUniqueConstraints ( ) const

Returns the RWDBUniqueConstraintList set on self.

Note
If hasUniqueConstraints() returns false this call returns an empty RWDBUniqueConstraintList.
bool RWDBTableEntry::hasCheckConstraints ( ) const

Returns true if the RWDBCheckConstraintList has been set on self.

bool RWDBTableEntry::hasExists ( ) const

Returns true if the exists flag has been set on self.

bool RWDBTableEntry::hasForeignKeys ( ) const

Returns true if the RWDBForeignKeyList has been set on self.

bool RWDBTableEntry::hasIsView ( ) const

Returns true if the isView flag has been set on self.

bool RWDBTableEntry::hasPrimaryKey ( ) const
Deprecated:
As of SourcePro 13.1, use getMetadata() checking for RWDBTable::ColumnList instead.
bool RWDBTableEntry::hasReferredToBy ( ) const

Returns true if the referredToBy list has been set on self.

bool RWDBTableEntry::hasSchema ( ) const

Returns true if the RWDBSchema has been set on self.

bool RWDBTableEntry::hasUniqueConstraints ( ) const

Returns true if the RWDBUniqueConstraintList has been set on self.

RWDBTableEntry& RWDBTableEntry::operator= ( const RWDBTableEntry entry)

Assignment operator. Copies all contained objects.

void RWDBTableEntry::setCheckConstraints ( const RWDBCheckConstraintList cc)

Sets the RWDBCheckConstraintList on self with a deep copy of cc. After this call hasCheckConstraints() returns true.

void RWDBTableEntry::setExists ( bool  exists)

Sets the exists flag on self. After this call hasExists() returns true.

void RWDBTableEntry::setForeignKeys ( const RWDBForeignKeyList fk)

Sets the RWDBForeignKeyList on self, with a deep copy of fk. After this call hasForeignKeys() returns true.

void RWDBTableEntry::setIsView ( bool  isView)

Sets the isView flag on self. After this call hasIsView() returns true.

void RWDBTableEntry::setPrimaryKey ( const RWDBPrimaryKey pk)
Deprecated:
As of SourcePro 13.1, use setSchema() to set a schema that has a primary key.
void RWDBTableEntry::setReferredToBy ( const RWDBForeignKeyList rk)

Sets the referredToBy list on self with a deep copy of rk. After this call hasReferredToBy() returns true.

void RWDBTableEntry::setSchema ( const RWDBSchema schema)
void RWDBTableEntry::setSchema ( const RWDBSchema schema,
RWDBTable::Metadata  md 
)

Sets the RWDBSchema and RWDBTable::Metadata on self. After this call hasSchema() returns true. The parameter md indicates the metadata from schema that is to be set on self.

void RWDBTableEntry::setUniqueConstraints ( const RWDBUniqueConstraintList uc)

Sets the RWDBUniqueConstraintList on self with a deep copy of uc. After this call hasUniqueConstraints() returns true.

Friends And Related Function Documentation

RWvostream& operator<< ( RWvostream strm,
const RWDBTableEntry item 
)
friend

Saves the object item to a virtual stream. Recursively calls the function saveGuts(), taking duplicate objects into account. See the discussion on Persistence in the Essential Tools Module User's Guide for more information.

RWFile& operator<< ( RWFile file,
const RWDBTableEntry item 
)
friend

Saves the object item to an RWFile. Recursively calls the function saveGuts(), taking duplicate objects into account. See the discussion on Persistence in the Essential Tools Module User's Guide for more information.

RWvistream& operator>> ( RWvistream strm,
RWDBTableEntry obj 
)
friend

Restores an RWDBTableEntry into obj from a virtual stream, replacing the previous contents of obj. Recursively calls the function restoreGuts(), taking duplicate objects into account. For more information, see the discussion on Persistence in the Essential Tools Module User's Guide.

RWFile& operator>> ( RWFile file,
RWDBTableEntry obj 
)
friend

Restores an RWDBTableEntry into obj from an RWFile, replacing the previous contents of obj. Recursively calls the function restoreGuts(), taking duplicate objects into account. For more information, see the discussion on Persistence in the Essential Tools Module User's Guide.

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.