iopc::ObjectStatementsFeature Class Reference
[iopclib]

This feature declares methods used by the ADT (object) mapping type. More...

#include <objectStatementsFeature.h>

Inheritance diagram for iopc::ObjectStatementsFeature:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const std::string & getNameInst ()
 Returns name of the database feature.
virtual std::string getSelectFromClassViewStatement (ObjectMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that selects from a Simple view associated with the type the currentStrategy represents.
virtual std::string getSelectFromClassTableStatement (ObjectMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that selects from a database table or ADT type associated with the type the currentStrategy represents.
virtual std::string getInsertStatement (ObjectMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that inserts data to a database table using ADT associated with the type the currentStrategy represents.
virtual std::string getUpdateStatement (ObjectMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that updates data in a database table associated with the type the currentStrategy represents.
virtual std::string getDeleteStatement (ObjectMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that deletes data from a database table associated with the type the currentStrategy represents.
virtual bool validate (ObjectMappingStrategy &currentStrategy, std::string &msg)=0
 Performs a driver-side validation of the persistent object model and metadata.


Detailed Description

This feature declares methods used by the ADT (object) mapping type.

DbType::getKeyAttributes() for object-mapped classes contain always only a single OID attribute.


Member Function Documentation

virtual const std::string& iopc::ObjectStatementsFeature::getNameInst (  )  [inline, virtual]

Returns name of the database feature.

Database features must have unique names across the library

Implements iopc::DbFeature.

virtual std::string iopc::ObjectStatementsFeature::getSelectFromClassViewStatement ( ObjectMappingStrategy currentStrategy,
const MetadataHolder attributes = MetadataHolder::emptyMeta,
bool  useCache = true 
) [pure virtual]

Returns a statement that selects from a Simple view associated with the type the currentStrategy represents.

Selected columns are specified by DbType::getAllPersistentAttributes() (currentStrategy.getDbType().getAllPersistentAttributes()) The order of the columns selected must correspond to the order of attributes in the list. WHERE part of the select statement must generated from the DbType::getKeyAttributes() list or just by filtering by OID.

virtual std::string iopc::ObjectStatementsFeature::getSelectFromClassTableStatement ( ObjectMappingStrategy currentStrategy,
const MetadataHolder attributes = MetadataHolder::emptyMeta,
bool  useCache = true 
) [pure virtual]

Returns a statement that selects from a database table or ADT type associated with the type the currentStrategy represents.

Selected columns are specified by ObjectMappingStrategy::getMappedAttributes() (currentStrategy.getMappedAttributes()) The order of the columns selected must correspond to the order of attributes in the list. WHERE part of the select statement must generated from the DbType::getKeyAttributes() list or just by filtering by OID.

virtual std::string iopc::ObjectStatementsFeature::getInsertStatement ( ObjectMappingStrategy currentStrategy,
const MetadataHolder attributes = MetadataHolder::emptyMeta,
bool  useCache = true 
) [pure virtual]

Returns a statement that inserts data to a database table using ADT associated with the type the currentStrategy represents.

The insert must define input parameters that will correspond with attributes stored in the ObjectMappingStrategy::getMappedAttributes() list.

virtual std::string iopc::ObjectStatementsFeature::getUpdateStatement ( ObjectMappingStrategy currentStrategy,
const MetadataHolder attributes = MetadataHolder::emptyMeta,
bool  useCache = true 
) [pure virtual]

Returns a statement that updates data in a database table associated with the type the currentStrategy represents.

The update must define input parameters that will correspond with attributes stored in the ObjectMappingStrategy::getMappedAttributes() list. Followed by parameters that define which rows to update defined by DbType::getKeyAttributes() list or just by an OID column.

virtual std::string iopc::ObjectStatementsFeature::getDeleteStatement ( ObjectMappingStrategy currentStrategy,
const MetadataHolder attributes = MetadataHolder::emptyMeta,
bool  useCache = true 
) [pure virtual]

Returns a statement that deletes data from a database table associated with the type the currentStrategy represents.

The statement must define input parameters that restrict the delete operation. (OID or DbType::getKeyAttributes())

virtual bool iopc::ObjectStatementsFeature::validate ( ObjectMappingStrategy currentStrategy,
std::string &  msg 
) [pure virtual]

Performs a driver-side validation of the persistent object model and metadata.

Parameters:
[in] currentStrategy A mapping strategy object representing a type being mapped.
[out] msg Error messages generated by the database driver.
Returns:
true - validation completed successfully, false otherwiese. If false is returend, msg contains relevant error message.


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

Generated on Tue Apr 14 16:46:48 2009 for IOPC 2 by  doxygen 1.5.6