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

IopcProtoBaseAdaptor Class Reference

Prototype class for IopcPersistentObject ancestors. More...

#include <iopcProtoBaseAdaptor.h>

Inheritance diagram for IopcProtoBaseAdaptor:

Inheritance graph
[legend]
Collaboration diagram for IopcProtoBaseAdaptor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual bool IsObject () const
virtual bool IsImmutableObject () const
virtual bool IsDatabaseObject () const
virtual bool IsPersistentObject () const
virtual bool IsIopcPersistentObject ()
virtual void _Initialise ()
virtual char * _Where () const
virtual char * _OrderBy () const
virtual class ObjectNew () const
virtual class RefBaseNewRef ()
virtual class ResultBaseExecuteQuery (const QueRefProto &query, class Connection *connection, const int i, class ResultBase *result)

Protected Member Functions

virtual bool _KeyValues (char *&s)
virtual char * _KeyValues (const class Object &o)
virtual bool _ExportAttributes (const class Object &o)
virtual bool _ExportKeyAttributes (const class Object &o)
virtual bool _ImportAttributes (class Object &o)
virtual void _MapKey (int i, const char *&attr, unsigned char Object::*&mem, const char *&col, char &type, unsigned int &len, bool &rw)
virtual void _Map (int i, const char *&attr, unsigned char Object::*&mem, const char *&col, char &type, unsigned int &len, bool &rw)
virtual const char * _ProtoTWhere ()
virtual const char * _ProtoTGroupBy ()
virtual const char * _ProtoTHaving ()
bool WriteDDL (std::ofstream &S, class Database &Db)
virtual const char * Select ()
virtual const char * FullSelect ()
virtual const char * Into ()
virtual const char * From ()
virtual const char * Where ()
virtual const char * GroupBy ()
virtual const char * Having ()
virtual const char * OrderBy () const
virtual const char * FullFrom ()
virtual char * FullFrom (int)
virtual const char * FullWhere ()
virtual char * FullWhere (int)
virtual const char * KeySelect ()
virtual const char * KeyWhere ()
virtual const char * KeyFrom ()
virtual class ProtoBaseRootPrototype () const
virtual int ParentPrototypeCount ()
virtual class ProtoBaseParentPrototype (const int i)
virtual int FullParentPrototypeCount ()
virtual class ProtoBaseFullParentPrototype (const int i)
virtual const char * BaseClassName ()
virtual const char * RootClassName ()
virtual const char * ClassName ()
virtual const char * ParentClassNames ()
const char * ColumnTable (const char *const col)
virtual char * _TranslateAttributesToColumns (char *src)
virtual bool _BindKeysAndClassIdentificatingAttributes (Cursor *cursor)
virtual bool _ImportKeyAttributes (class RefBase &x)
virtual bool _ExportKeyAttributes (const class RefBase &x)
virtual bool _Load (class Object *o)
virtual bool _DeleteAll (class RefBase *target)
virtual ProtoBase_PtrPrototype ()

Protected Attributes

IopcClassObjectImplclassObject

Detailed Description

Prototype class for IopcPersistentObject ancestors.

For basic information about prototypes see ProtoBase.

For each non POLiTe-style persistent class exists one instance of this class in IOPC LIB. As said in documentation of ProtoBase, most functions inherited from ProtoBase doesn't make any sence in IOPC and will never be called by IOPC LIB runtime. These functions are below commented as "Fake function. Should never be called." Some of the remaining functions are trivial - they return some constant and the like. All other functions are implemented as a call to appropriate function on corresponding IopcClassObjectImpl (classObject).

Note:
Althrough for every IopcProtoBaseAdaptor exists exactly one IopcClassObjectImpl (and the other way round) the functionality have been divided between them - I didn't want IopcClassObjectImpl to be clogged by the pile of useless methods inherited from ProtoBase.


Member Function Documentation

bool IopcProtoBaseAdaptor::_KeyValues char *&  s  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

char * IopcProtoBaseAdaptor::_KeyValues const class Object o  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_ExportAttributes const class Object o  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_ExportKeyAttributes const class Object o  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_ImportAttributes class Object o  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

void IopcProtoBaseAdaptor::_MapKey int  i,
const char *&  attr,
unsigned char Object::*&  mem,
const char *&  col,
char &  type,
unsigned int &  len,
bool &  rw
[protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

void IopcProtoBaseAdaptor::_Map int  i,
const char *&  attr,
unsigned char Object::*&  mem,
const char *&  col,
char &  type,
unsigned int &  len,
bool &  rw
[protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::_ProtoTWhere  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::_ProtoTGroupBy  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::_ProtoTHaving  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

bool IopcProtoBaseAdaptor::WriteDDL std::ofstream &  S,
class Database Db
[protected]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::Select  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::FullSelect  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::Into  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::From  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::Where  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::GroupBy  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::Having  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::OrderBy  )  const [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::FullFrom  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

char * IopcProtoBaseAdaptor::FullFrom int   )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::FullWhere  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

char * IopcProtoBaseAdaptor::FullWhere int   )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::KeySelect  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::KeyWhere  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::KeyFrom  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

class ProtoBase * IopcProtoBaseAdaptor::RootPrototype  )  const [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

int IopcProtoBaseAdaptor::ParentPrototypeCount  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

class ProtoBase * IopcProtoBaseAdaptor::ParentPrototype const int  i  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

int IopcProtoBaseAdaptor::FullParentPrototypeCount  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

class ProtoBase * IopcProtoBaseAdaptor::FullParentPrototype const int  i  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::BaseClassName  )  [protected, virtual]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

const char * IopcProtoBaseAdaptor::RootClassName  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::ClassName  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::ParentClassNames  )  [protected, virtual]
 

Fake function. Should never be called.

Implements ProtoBase.

const char * IopcProtoBaseAdaptor::ColumnTable const char *const  col  )  [protected]
 

Fake function. Should never be called.

Reimplemented from ProtoBase.

virtual bool IopcProtoBaseAdaptor::IsObject  )  const [inline, virtual]
 

Is the corresponding persistent class "direct" descendant of Object (i.e. descendant of Object, but not descendant of ImmutableObject or IopcPersistentObject)?

Returns:
false

virtual bool IopcProtoBaseAdaptor::IsImmutableObject  )  const [inline, virtual]
 

Is the corresponding persistent class "direct" descendant of ImmutableObject (i.e. descendant of ImmutableObject, but not descendant of DatabaseObject)?

Returns:
false

virtual bool IopcProtoBaseAdaptor::IsDatabaseObject  )  const [inline, virtual]
 

Is the corresponding persistent class "direct" descendant of DatabaseObject (i.e. descendant of DatabaseObject, but not descendant of PersistentObject)?

Returns:
false

virtual bool IopcProtoBaseAdaptor::IsPersistentObject  )  const [inline, virtual]
 

Is the corresponding persistent class descendant of PersistentObject?

Returns:
false

virtual bool IopcProtoBaseAdaptor::IsIopcPersistentObject  )  [inline, virtual]
 

Is the corresponding persistent class descendant of IopcPersistentObject?

Used at several places in IOPC - in POLiTe classes where previously was only IsPersistentObject() is now mostly (IsIopcPersistentObject() || IsPersistentObject())

Returns:
true

Reimplemented from ProtoBase.

virtual void IopcProtoBaseAdaptor::_Initialise  )  [inline, virtual]
 

This function should initialize the prototype - does nothing.in this class.

Reimplemented from ProtoBase.

char * IopcProtoBaseAdaptor::_Where  )  const [virtual]
 

This function is called if user tries to use class's prototype as query. The query should return all persistent instances of the class this prototype represents.

The function should return WHERE clause to be used when executing the query.

Returns:
The WHERE clause - something like "OID = 10" (if 10 is class ID of the class).

Reimplemented from ProtoBase.

char * IopcProtoBaseAdaptor::_OrderBy  )  const [virtual]
 

Makes it possible to set default ordering of persistent objects that are instances of represented class when loading them from the database.

The function should return appropriate ORDER BY clause.

Returns:
NULL, no default ordering.

Reimplemented from ProtoBase.

Object * IopcProtoBaseAdaptor::New  )  const [virtual]
 

Creates an instance of the corresponding persistent class.

Implemented as a call of IopcClassObjectImpl::createInstance().

Implements ProtoBase.

RefBase * IopcProtoBaseAdaptor::NewRef  )  [virtual]
 

Creates a new DBNULL reference to the corresponding persistent class.

Implemented as a call of IopcClassObjectImpl::createReference().

Implements ProtoBase.

class ResultBase * IopcProtoBaseAdaptor::ExecuteQuery const QueRefProto query,
class Connection connection,
const int  i,
class ResultBase result
[virtual]
 

Executes given query on classObject.

Implemented as a call of IopcClassObjectImpl::executeQuery().

Parameters:
query The query.
connection Connection to be used for query processing.
i Unknown undocumented parameter coming from POLiTe. It seems that this parameter is always 1.
result Object into which identification of acquired objects should be placed.
Returns:
Parameter result.

Reimplemented from ProtoBase.

char * IopcProtoBaseAdaptor::_TranslateAttributesToColumns char *  src  )  [protected, virtual]
 

Translates attribute names to column names and class names to appropriate view names in given string.

Called from _TranslateToSql(char * &, const char * const).

Implemented as a call of IopcClassObjectImpl::attributeNamesToColumnNames().

Parameters:
src Input string.
Returns:
Resulting string.

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_BindKeysAndClassIdentificatingAttributes Cursor cursor  )  [protected, virtual]
 

Binds key attribute(s) (OID) and attribute(s) that identify type (class) of object (CID) that will be later fetched (as a result of ExecuteQuery() call).

Implemented as a call of IopcClassObjectImpl::bindOidAndCid().

Parameters:
cursor Cursor to be used for binding
Returns:
true if OK, false otherwise.

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_ImportKeyAttributes class RefBase x  )  [protected, virtual]
 

Sets ObjectIdentification::oid of given reference x to OID of object that was the result of the last query executed on classObject. The OID is received using IopcClassObjectImpl::getCurrentObjectOid().

Returns:
true (OK)

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_ExportKeyAttributes const class RefBase x  )  [protected, virtual]
 

Sets OID of object that will be consequently loaded from the database to the value of ObjectIdentification::oid of given reference x. The OID is set using IopcClassObjectImpl::setCurrentObjectOid().

Returns:
true (OK)

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_Load class Object o  )  [protected, virtual]
 

Loads attributes of given object from the database. (More precisely: loads only the default fetch group of attributes.)

Implemented as a call of IopcClassObjectImpl::loadObject().

Returns:
true (OK). In case of error an exception is thrown.

Reimplemented from ProtoBase.

bool IopcProtoBaseAdaptor::_DeleteAll class RefBase target  )  [protected, virtual]
 

Deletes object specified by given reference from the database.

Implemented as a call of IopcClassObjectImpl::deleteObject().

Returns:
true (OK). In case of error an exception is thrown.

Reimplemented from ProtoBase.

ProtoBase * IopcProtoBaseAdaptor::_PtrPrototype  )  [protected, virtual]
 

Returns prototype of the object that was the result of the last query executed using classObject (see ExecuteQuery() / _BindKeysAndClassIdentificatingAttributes() ). This function is there to provide polymorphism of queries and references.

Implemented using IopcClassObjectImpl::getLastFetchedObjectsClassObject().

Returns:
The prototype.

Reimplemented from ProtoBase.


Member Data Documentation

IopcClassObjectImpl* IopcProtoBaseAdaptor::classObject [protected]
 

Class object that represents the same persistent class as this prototype.


The documentation for this class was generated from the following files:
Generated on Wed Aug 11 22:35:39 2004 for IOPC by Doxygen 1.3.6