fintp_udal
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FinTP::ODBCDatabaseFactory Class Referenceabstract

#include <ODBCDatabaseProvider.h>

Inheritance diagram for FinTP::ODBCDatabaseFactory:

Public Member Functions

 ODBCDatabaseFactory (const string &provider)
 Base class for database provider specific objects creations. More...
 
 ~ODBCDatabaseFactory ()
 
virtual DatabasecreateDatabase ()=0
 Creates the provider specific database. More...
 
DataParameterBasecreateParameter (DataType::DATA_TYPE paramType, DataParameterBase::PARAMETER_DIRECTION parameterDirection=DataParameterBase::PARAM_IN)
 Create parameter. More...
 
DataColumnBasecreateColumn (DataType::DATA_TYPE columnType, unsigned int dimension, int scale, const string &name="")
 
string getParamPlaceholder (const unsigned int i) const
 Returns a string representing a sql statement parameter placeholder. More...
 
string getParamPlaceholder (const string &paramname) const
 Returns a string representing a sql statement parameter placeholder. More...
 
string getTrimFunc (const string &value) const
 Returns sql statement call to a provider specific trim function. More...
 
- Public Member Functions inherited from FinTP::DatabaseProviderFactory
virtual ~DatabaseProviderFactory ()
 
DataParameterBasecreateParameter (DataType::DATA_TYPE paramType)
 
DataColumnBasecreateColumn (DataType::DATA_TYPE columnType, unsigned int dimension, int scale)
 
string name () const
 Getter method of the provider name. More...
 

Static Public Member Functions

static DataColumnBaseinternalCreateColumn (DataType::DATA_TYPE columnType, unsigned int dimension, int scale, const string &name="")
 Create column. More...
 
static short int getODBCSqlType (const DataType::DATA_TYPE type, const int dimension)
 
static short int getODBCDataType (const DataType::DATA_TYPE type)
 
static int getODBCParameterDirection (DataParameterBase::PARAMETER_DIRECTION paramDirection)
 
static DataType::DATA_TYPE getDataType (const short int type, const int dimension)
 

Additional Inherited Members

- Protected Member Functions inherited from FinTP::DatabaseProviderFactory
 DatabaseProviderFactory (const string &providername)
 
- Protected Attributes inherited from FinTP::DatabaseProviderFactory
string m_Name
 

Constructor & Destructor Documentation

FinTP::ODBCDatabaseFactory::ODBCDatabaseFactory ( const string &  provider)
inline

Base class for database provider specific objects creations.

Factory specific implementations are responsable to provide every runtime specific object needed to perform database related operations

FinTP::ODBCDatabaseFactory::~ODBCDatabaseFactory ( )
inline

Member Function Documentation

DataColumnBase * ODBCDatabaseFactory::createColumn ( DataType::DATA_TYPE  columnType,
unsigned int  dimension,
int  scale,
const string &  name = "" 
)
virtual
Note
calls internalCreateColumn

Implements FinTP::DatabaseProviderFactory.

virtual Database* FinTP::ODBCDatabaseFactory::createDatabase ( )
pure virtual

Creates the provider specific database.

Returns
The new database.

Implements FinTP::DatabaseProviderFactory.

Implemented in FinTP::InformixDatabaseFactory, FinTP::PostgresDatabaseFactory, FinTP::SqlServerDatabaseFactory, and FinTP::Db2DatabaseFactory.

DataParameterBase * ODBCDatabaseFactory::createParameter ( DataType::DATA_TYPE  paramType,
DataParameterBase::PARAMETER_DIRECTION  parameterDirection = DataParameterBase::PARAM_IN 
)
virtual

Create parameter.

Parameters
paramTypetype DATA_TYPE. The parameter data type
parameterDirectiontype PARAMETER_DIRECTION. The parameter direction

Implements FinTP::DatabaseProviderFactory.

DataType::DATA_TYPE ODBCDatabaseFactory::getDataType ( const short int  type,
const int  dimension 
)
static
short int ODBCDatabaseFactory::getODBCDataType ( const DataType::DATA_TYPE  type)
static
int ODBCDatabaseFactory::getODBCParameterDirection ( DataParameterBase::PARAMETER_DIRECTION  paramDirection)
static
short int ODBCDatabaseFactory::getODBCSqlType ( const DataType::DATA_TYPE  type,
const int  dimension 
)
static
string FinTP::ODBCDatabaseFactory::getParamPlaceholder ( const unsigned int  i) const
inlinevirtual

Returns a string representing a sql statement parameter placeholder.

Parameters
iThe bind parameter index.
Returns
The parameter placeholder.

Implements FinTP::DatabaseProviderFactory.

string FinTP::ODBCDatabaseFactory::getParamPlaceholder ( const string &  paramname) const
inlinevirtual

Returns a string representing a sql statement parameter placeholder.

Parameters
paramnameThe bind parameter name.
Returns
The parameter placeholder.

Implements FinTP::DatabaseProviderFactory.

string FinTP::ODBCDatabaseFactory::getTrimFunc ( const string &  value) const
inlinevirtual

Returns sql statement call to a provider specific trim function.

Parameters
valueThe string used in the trim function call.
Returns
The trim function call.

Implements FinTP::DatabaseProviderFactory.

DataColumnBase * ODBCDatabaseFactory::internalCreateColumn ( DataType::DATA_TYPE  columnType,
unsigned int  dimension,
int  scale,
const string &  name = "" 
)
static

Create column.

Parameters
columnTypetype DATA_TYPE. The column's datatype.
dimensiontype int. The column's dimension.
scaletype int. The column's scale.
nametype string. The column's name.

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