iopc::ORStatementsFeature Class Reference
[iopclib]

This feature declares methods used by the O/R (vertical, horizontal, filtered) mapping type. More...

#include <orStatementsFeature.h>

Inheritance diagram for iopc::ORStatementsFeature:

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 (ORMappingStrategy &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 (ORMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that selects from a database table associated with the type the currentStrategy represents.
virtual std::string getInsertStatement (ORMappingStrategy &currentStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0
 Returns a statement that insert data to a database table associated with the type the currentStrategy represents.
virtual std::string getUpdateStatement (ORMappingStrategy &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 getUpdateStatement (ORMappingStrategy &currentStrategy, const ORMappingStrategy::MappedAttributesList &updateCols, 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 (ORMappingStrategy &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 (ORMappingStrategy &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 O/R (vertical, horizontal, filtered) mapping type.

Member Function Documentation

virtual const std::string& iopc::ORStatementsFeature::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::ORStatementsFeature::getSelectFromClassViewStatement ( ORMappingStrategy 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 be restricted by input parameters generated from the DbType::getKeyAttributes() list. (currentStrag.getDbType().getKeyAttributes()). Again in the corresponding order.

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

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

Selected columns are specified by DbType::getMappedAttributes() (currentStrategy.getDbType.getMappedAttributes()) The order of the columns selected must correspond to the order of attributes in the list. WHERE part of the select statement must be restricted by input parameters generated from the DbType::getKeyAttributes() list. (currentStrag.getDbType().getKeyAttributes()). Again in the corresponding order.

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

Returns a statement that insert data to a database table associated with the type the currentStrategy represents.

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

virtual std::string iopc::ORStatementsFeature::getUpdateStatement ( ORMappingStrategy 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 DbType::getMappedAttributes() list. Followed by the WHERE clause generated from the DbType::getKeyAttributes() list.

virtual std::string iopc::ORStatementsFeature::getUpdateStatement ( ORMappingStrategy currentStrategy,
const ORMappingStrategy::MappedAttributesList &  updateCols,
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 updateCols list. Followed by the WHERE clause generated from the DbType::getKeyAttributes() list.

virtual std::string iopc::ORStatementsFeature::getDeleteStatement ( ORMappingStrategy 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.

WHERE part of the delete statement must be restricted by input parameters generated from the DbType::getKeyAttributes() list.

virtual bool iopc::ORStatementsFeature::validate ( ORMappingStrategy 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:49 2009 for IOPC 2 by  doxygen 1.5.6