| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Friends
TeOracle Class Reference

A driver class to an Oracle database accessible using ADO library. More...

`#include <TeAdoOracle.h>`

Inheritance diagram for TeOracle:

List of all members.

## Public Member Functions

| TeOracle ()
| ~TeOracle ()
bool | newDatabase (const string &database, const string &user, const string &password, const string &host, const int &port=-1, bool terralibModel=true)
bool | connect (const string &host, const string &user, const string &password, const string &database, int port=-1)
| Opens a connection to a database server passing all parameters needed.
bool | tableExist (const string &table)
| Verifies if a table exist in the database.
bool | listTables (vector< string > &tableList)
| Returns a list of tables in a database.
bool | columnExist (const string &table, const string &column, TeAttribute &attr)
| Verifies if a table has a column.
bool | createTable (const string &table, TeAttributeList &attr)
| Creates a table.
bool | addColumn (const string &table, TeAttributeRep &rep)
| Adds a column to a table.
bool | alterTable (const string &table, TeAttributeRep &rep, const string &oldColName="")
| Alter a property of a table.
bool | alterTable (const string &oldTableName, const string &newTableName)
| Alter the table name.
bool | deleteTable (const string &table)
| Deletes a table. Do not allow the deletion of model tables.
bool | createRelation (const string &name, const string &table, const string &fieldName, const string &relatedTable, const string &relatedField, bool cascadeDeletion)
| Creates a reationship between two tables.
bool | deleteLayer (int layerId)
| Delete a particular layer passing its id.
TeDBRelationType | existRelation (const string &tableName, const string &relName)
| Checks if a relation exist.
bool | insertTableInfo (int layerId, TeTable &table, const string &user="")
| Inserts information about an attribute table.
bool | insertRelationInfo (const int tableId, const string &tField, const string &rName, const string &rField, int &relId)
| Inserts information about a link to an external table.
bool | insertLayer (TeLayer *layer)
| Insert information about a layer.
virtual bool | updateBBox (const string &tableName, const string &idName, int idValue, const TeBox &box)
| Update box information in a table that has a set of columns to store a box value.
virtual bool | updateLayerBox (TeLayer *layer)
| Updates the box information of a layer in the corresponding metadata table.
virtual bool | updateLayer (TeLayer *layer)
| Update information about a layer.
bool | insertRepresentation (int layerId, TeRepresentation &rep)
| Inserts information about a geometrical representation.
bool | insertView (TeView *view)
| Inserts a view.
bool | insertViewTree (TeViewTree *tree)
| Recursive inserting of a view tree.
bool | insertTheme (TeAbstractTheme *theme)
| Inserts an abstract theme in the database.
bool | insertThemeTable (int themeId, int tableId, int relationId, int tableOrder)
| Inserts information about a table used by a theme.
bool | insertThemeGroup (TeViewTree *tree)
| Inserts a group of themes in the database.
bool | generateLabelPositions (TeTheme *theme, const std::string &objectId="")
| Generates the label position (x,y) to each object of a theme or of a particular object.
bool | insertLegend (TeLegendEntry *legend)
| Inserts legend in the database.
bool | insertProjection (TeProjection *proj)
| Insert information about a geographical projection.
bool | insertPolygonSet (const string &table, TePolygonSet &ps)
| Inserts a polygon set in a geometry table.
bool | insertPolygon (const string &table, TePolygon &p)
| Inserts a polygon in a geometry table.
bool | insertLineSet (const string &table, TeLineSet &ls)
bool | insertLine (const string &table, TeLine2D &l)
bool | insertPointSet (const string &table, TePointSet &ps)
bool | insertPoint (const string &table, TePoint &p)
bool | insertTextSet (const string &table, TeTextSet &ts)
bool | insertText (const string &table, TeText &t)
bool | insertArcSet (const string &table, TeArcSet &as)
| Inserts an arc set geometry in the database.
bool | insertArc (const string &table, TeArc &arc)
| Inserts an arc geometry in the database.
bool | insertNodeSet (const string &table, TeNodeSet &ns)
bool | insertNode (const string &table, TeNode &node)
bool | insertCellSet (const string &table, TeCellSet &cs)
bool | insertCell (const string &table, TeCell &c)
TeDatabasePortal * | getPortal ()
| Returns a database portal.
bool | createAutoIncrementTrigger (const string &tableName, const string &fieldName)
string | getNameTrigger (const string &tableName)
bool | createSequence (const string &seqName)
string | getNameSequence (const string &tableName)
string | getSQLAutoNumber (const string &table)
| Return the database function in SQL to generate autonumber values.
bool | getAttributeList (const string &tableName, TeAttributeList &attList)
| Gets the list of attributes of a table.
string | getSQLTime (const TeTime &time) const
| Gets the date and time following the format MMsDDsYYYYsHHsMMsSS to use with Access.
bool | insertProject (TeProject *project)
| Insert information about a project.

## Friends

class | TeOraclePortal

## Detailed Description

A driver class to an Oracle database accessible using ADO library.

## Constructor & Destructor Documentation

TeOracle::TeOracle | ( |  | ) |

TeOracle::~TeOracle | ( |  | ) |

## Member Function Documentation

bool TeOracle::addColumn | ( | const string & | table,
|  | TeAttributeRep & | rep
| ) |  | `[virtual]`

Adds a column to a table.

Parameters:

  table | table name
  rep | representation of the column being created

Reimplemented from TeAdo.

bool TeOracle::alterTable | ( | const string & | tableName,
|  | TeAttributeRep & | rep,
|  | const string & | oldColName = `""`
| ) |  | `[virtual]`

Alter a property of a table.

Reimplemented from TeAdo.

bool TeOracle::alterTable | ( | const string & | oldTableName,
|  | const string & | newTablename
| ) |  | `[virtual]`

Alter the table name.

Reimplemented from TeAdo.

bool TeOracle::columnExist | ( | const string & | table,
|  | const string & | column,
|  | TeAttribute & | attr
| ) |  | `[virtual]`

Verifies if a table has a column.

Reimplemented from TeAdo.

bool TeOracle::connect | ( | const string & | host,
|  | const string & | user,
|  | const string & | password,
|  | const string & | database,
|  | int | port = `-1`
| ) |  | `[virtual]`

Opens a connection to a database server passing all parameters needed.

Reimplemented from TeAdo.

bool TeOracle::createAutoIncrementTrigger | ( | const string & | tableName,
|  | const string & | fieldName
| ) |  |

bool TeOracle::createRelation | ( | const string & | relName,
|  | const string & | table,
|  | const string & | fieldName,
|  | const string & | relatedTable,
|  | const string & | relatedField,
|  | bool | cascadeDeletion
| ) |  | `[virtual]`

Creates a reationship between two tables.

Parameters:

  relName | relationship name
  table | table that will receive the foreign key
  fieldName | column that will be foreign key
  relatedTable | table that exports the foreign key
  relatedField | field that will the exported foreign key
  cascadeDeletion | flag that indicates if the deletion should be propagated

Reimplemented from TeAdo.

bool TeOracle::createSequence | ( | const string & | seqName | ) |

bool TeOracle::createTable | ( | const string & | table,
|  | TeAttributeList & | attr
| ) |  | `[virtual]`

Creates a table.

Parameters:

  table | table name
  attr | table list of attributes

Reimplemented from TeAdo.

bool TeOracle::deleteLayer | ( | int | layerId | ) | `[virtual]`

Delete a particular layer passing its id.

Reimplemented from TeDatabase.

bool TeOracle::deleteTable | ( | const string & | table | ) | `[virtual]`

Deletes a table. Do not allow the deletion of model tables.

Reimplemented from TeDatabase.

TeDBRelationType TeOracle::existRelation | ( | const string & | tableName,
|  | const string & | relName
| ) |  | `[virtual]`

Checks if a relation exist.

Parameters:

  tableName | table where the relashionship exists
  relName | relationship name

Reimplemented from TeAdo.

bool TeOracle::generateLabelPositions | ( | TeTheme * | theme,
|  | const std::string & | objectId = `""`
| ) |  | `[virtual]`

Generates the label position (x,y) to each object of a theme or of a particular object.

Reimplemented from TeDatabase.

bool TeOracle::getAttributeList | ( | const string & | tableName,
|  | TeAttributeList & | attList
| ) |  | `[virtual]`

Gets the list of attributes of a table.

Reimplemented from TeAdo.

string TeOracle::getNameSequence | ( | const string & | tableName | ) |

string TeOracle::getNameTrigger | ( | const string & | tableName | ) |

TeDatabasePortal * TeOracle::getPortal | ( |  | ) | `[virtual]`

Returns a database portal.

A database portal is used to submit queries to the database and to navigate over the resulting record set

Reimplemented from TeAdo.

string TeOracle::getSQLAutoNumber | ( | const string & | table | ) | `[virtual]`

Return the database function in SQL to generate autonumber values.

Reimplemented from TeDatabase.

string TeOracle::getSQLTime | ( | const TeTime & | time | ) | const`[virtual]`

Gets the date and time following the format MMsDDsYYYYsHHsMMsSS to use with Access.

Reimplemented from TeAdo.

bool TeOracle::insertArc | ( | const string & | table,
|  | TeArc & | arc
| ) |  | `[virtual]`

Inserts an arc geometry in the database.

Reimplemented from TeAdo.

bool TeOracle::insertArcSet | ( | const string & | table,
|  | TeArcSet & | as
| ) |  | `[virtual]`

Inserts an arc set geometry in the database.

Reimplemented from TeAdo.

bool TeOracle::insertCell | ( | const string & | table,
|  | TeCell & | c
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertCellSet | ( | const string & | table,
|  | TeCellSet & | cs
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertLayer | ( | TeLayer * | layer | ) | `[virtual]`

Insert information about a layer.

Reimplemented from TeAdo.

bool TeOracle::insertLegend | ( | TeLegendEntry * | legend | ) | `[virtual]`

Inserts legend in the database.

Reimplemented from TeAdo.

bool TeOracle::insertLine | ( | const string & | table,
|  | TeLine2D & | l
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertLineSet | ( | const string & | table,
|  | TeLineSet & | ls
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertNode | ( | const string & | table,
|  | TeNode & | node
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertNodeSet | ( | const string & | table,
|  | TeNodeSet & | ns
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertPoint | ( | const string & | table,
|  | TePoint & | p
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertPointSet | ( | const string & | table,
|  | TePointSet & | ps
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertPolygon | ( | const string & | table,
|  | TePolygon & | p
| ) |  | `[virtual]`

Inserts a polygon in a geometry table.

Reimplemented from TeAdo.

bool TeOracle::insertPolygonSet | ( | const string & | table,
|  | TePolygonSet & | ps
| ) |  | `[virtual]`

Inserts a polygon set in a geometry table.

Reimplemented from TeAdo.

bool TeOracle::insertProject | ( | TeProject * | project | ) | `[virtual]`

Insert information about a project.

Reimplemented from TeAdo.

bool TeOracle::insertProjection | ( | TeProjection * | proj | ) | `[virtual]`

Insert information about a geographical projection.

Reimplemented from TeAdo.

bool TeOracle::insertRelationInfo | ( | const int | tableId,
|  | const string & | tField,
|  | const string & | rTable,
|  | const string & | rField,
|  | int & | relId
| ) |  | `[virtual]`

Inserts information about a link to an external table.

Reimplemented from TeAdo.

bool TeOracle::insertRepresentation | ( | int | layerId,
|  | TeRepresentation & | rep
| ) |  | `[virtual]`

Inserts information about a geometrical representation.

Reimplemented from TeAdo.

bool TeOracle::insertTableInfo | ( | int | layerId,
|  | TeTable & | table,
|  | const string & | user = `""`
| ) |  | `[virtual]`

Inserts information about an attribute table.

Reimplemented from TeAdo.

bool TeOracle::insertText | ( | const string & | table,
|  | TeText & | t
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertTextSet | ( | const string & | table,
|  | TeTextSet & | ts
| ) |  | `[virtual]`

Reimplemented from TeAdo.

bool TeOracle::insertTheme | ( | TeAbstractTheme * | theme | ) | `[virtual]`

Inserts an abstract theme in the database.

Reimplemented from TeAdo.

bool TeOracle::insertThemeGroup | ( | TeViewTree * | tree | ) | `[virtual]`

Inserts a group of themes in the database.

Reimplemented from TeAdo.

bool TeOracle::insertThemeTable | ( | int | themeId,
|  | int | tableId,
|  | int | relationId,
|  | int | tableOrder
| ) |  | `[virtual]`

Inserts information about a table used by a theme.

Reimplemented from TeAdo.

bool TeOracle::insertView | ( | TeView * | view | ) | `[virtual]`

Inserts a view.

Reimplemented from TeAdo.

bool TeOracle::insertViewTree | ( | TeViewTree * | tree | ) | `[virtual]`

Recursive inserting of a view tree.

Reimplemented from TeAdo.

bool TeOracle::listTables | ( | vector< string > & |  | ) | `[virtual]`

Returns a list of tables in a database.

Reimplemented from TeAdo.

bool TeOracle::newDatabase | ( | const string & | database,
|  | const string & | user,
|  | const string & | password,
|  | const string & | host,
|  | const int & | port = `-1`,
|  | bool | terralibModel = `true`
| ) |  |

bool TeOracle::tableExist | ( | const string & | table | ) | `[virtual]`

Verifies if a table exist in the database.

Reimplemented from TeAdo.

bool TeOracle::updateBBox | ( | const string & | tableName,
|  | const string & | keyColumnName,
|  | int | keyValue,
|  | const TeBox & | box
| ) |  | `[virtual]`

Update box information in a table that has a set of columns to store a box value.

Reimplemented from TeAdo.

bool TeOracle::updateLayer | ( | TeLayer * | layer | ) | `[virtual]`

Update information about a layer.

Reimplemented from TeAdo.

bool TeOracle::updateLayerBox | ( | TeLayer * | layer | ) | `[virtual]`

Updates the box information of a layer in the corresponding metadata table.

Reimplemented from TeAdo.

## Friends And Related Function Documentation

friend class TeOraclePortal`[friend]`

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/ado/TeAdoOracle.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/ado/TeAdoOracle.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines