SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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

RWFileoperator<< (RWFile &file, const RWDBTableEntry &item)
 
RWvostreamoperator<< (RWvostream &strm, const RWDBTableEntry &item)
 
RWFileoperator>> (RWFile &file, RWDBTableEntry &obj)
 
RWvistreamoperator>> (RWvistream &strm, 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:
};
Offers powerful and convenient facilities for manipulating strings.
Definition stdcstring.h:826
Base class for user-defined metadata cache managers.
Definition cachemgr.h:637
Class to hold RWDBTable metadata for cache managers.
Definition cachemgr.h:253
Maintains a collection of keys, each with an associated item stored according to a hash object.
Definition tvhdict.h:144

Constructor & Destructor Documentation

◆ RWDBTableEntry() [1/2]

RWDBTableEntry::RWDBTableEntry ( )

Constructs an empty object with no metadata information.

◆ RWDBTableEntry() [2/2]

RWDBTableEntry::RWDBTableEntry ( const RWDBTableEntry & entry)

Copies all metadata information from entry.

Member Function Documentation

◆ clearCheckConstraints()

void RWDBTableEntry::clearCheckConstraints ( )

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

◆ clearExists()

void RWDBTableEntry::clearExists ( )

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

◆ clearForeignKeys()

void RWDBTableEntry::clearForeignKeys ( )

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

◆ clearIsView()

void RWDBTableEntry::clearIsView ( )

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

◆ clearPrimaryKey()

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

◆ clearReferredToBy()

void RWDBTableEntry::clearReferredToBy ( )

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

◆ clearSchema()

void RWDBTableEntry::clearSchema ( )

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

◆ clearUniqueConstraints()

void RWDBTableEntry::clearUniqueConstraints ( )

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

◆ getCheckConstraints()

const RWDBCheckConstraintList & RWDBTableEntry::getCheckConstraints ( ) const

Returns the RWDBCheckConstraintList set on self.

Note
If hasCheckConstraints() returns false this call returns an empty RWDBCheckConstraintList.

◆ getExists()

bool RWDBTableEntry::getExists ( ) const

Returns the exists flag set on self.

Note
If hasExists() returns false this call returns false.

◆ getForeignKeys()

const RWDBForeignKeyList & RWDBTableEntry::getForeignKeys ( ) const

Returns the RWDBForeignKeyList set on self.

Note
If hasForeignKeys() returns false this call returns an empty RWDBForeignKeyList.

◆ getIsView()

bool RWDBTableEntry::getIsView ( ) const

Returns the isView flag set on self.

Note
If hasIsView() returns false this call returns false.

◆ getMetadata()

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.

◆ getPrimaryKey()

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

◆ getReferredToBy()

const RWDBForeignKeyList & RWDBTableEntry::getReferredToBy ( ) const

Returns the referredToBy list set on self.

Note
If hasReferredToBy() returns false this call returns an empty RWDBForeignKeyList.

◆ getSchema()

RWDBSchema RWDBTableEntry::getSchema ( ) const

Returns the RWDBSchema set on self.

Note
If hasSchema() returns false this call returns an empty RWDBSchema.

◆ getUniqueConstraints()

const RWDBUniqueConstraintList & RWDBTableEntry::getUniqueConstraints ( ) const

Returns the RWDBUniqueConstraintList set on self.

Note
If hasUniqueConstraints() returns false this call returns an empty RWDBUniqueConstraintList.

◆ hasCheckConstraints()

bool RWDBTableEntry::hasCheckConstraints ( ) const

Returns true if the RWDBCheckConstraintList has been set on self.

◆ hasExists()

bool RWDBTableEntry::hasExists ( ) const

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

◆ hasForeignKeys()

bool RWDBTableEntry::hasForeignKeys ( ) const

Returns true if the RWDBForeignKeyList has been set on self.

◆ hasIsView()

bool RWDBTableEntry::hasIsView ( ) const

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

◆ hasPrimaryKey()

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

◆ hasReferredToBy()

bool RWDBTableEntry::hasReferredToBy ( ) const

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

◆ hasSchema()

bool RWDBTableEntry::hasSchema ( ) const

Returns true if the RWDBSchema has been set on self.

◆ hasUniqueConstraints()

bool RWDBTableEntry::hasUniqueConstraints ( ) const

Returns true if the RWDBUniqueConstraintList has been set on self.

◆ operator=()

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

Assignment operator. Copies all contained objects.

◆ setCheckConstraints()

void RWDBTableEntry::setCheckConstraints ( const RWDBCheckConstraintList & cc)

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

◆ setExists()

void RWDBTableEntry::setExists ( bool exists)

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

◆ setForeignKeys()

void RWDBTableEntry::setForeignKeys ( const RWDBForeignKeyList & fk)

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

◆ setIsView()

void RWDBTableEntry::setIsView ( bool isView)

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

◆ setPrimaryKey()

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

◆ setReferredToBy()

void RWDBTableEntry::setReferredToBy ( const RWDBForeignKeyList & rk)

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

◆ setSchema() [1/2]

void RWDBTableEntry::setSchema ( const RWDBSchema & schema)

◆ setSchema() [2/2]

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.

◆ setUniqueConstraints()

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 Symbol Documentation

◆ operator<< [1/2]

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.

◆ operator<< [2/2]

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.

◆ operator>> [1/2]

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.

◆ operator>> [2/2]

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.

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