rwlogo

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Static Public Member Functions | Static Public Attributes | Friends
IlvSDOUtil Class Reference

Utility class for basic tasks on Oracle SDO relational Model. More...

#include <ilviews/maps/format/oracle/sdoutil.h>

Static Public Member Functions

static IlBoolean CheckLayerExistence (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Checks whether the given SDO layer exists. More...
 
static IlBoolean CheckSdoExistence (IldDbms *dbms, IlvMapsError &status)
 Checks whether the SDO extension is in the database. More...
 
static IlvMapsError DbLinkError ()
 An IlvMapError indicating a Data Base Error raised through DB Link. More...
 
static void DisableSQLTraces ()
 Disables the trace mode for the SQL queries.
 
static void DropLayer (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Drops the four SDO tables corresponding to the current layerName. More...
 
static IlvMapsError EnableDbLink ()
 Enables the DB Link Product. More...
 
static void EnableSQLTraces (IL_STDPREF ostream *stream)
 Enables the trace mode for the SQL queries. More...
 
static IlUShort EstimateTilingLevel (IldDbms *dbms, const char *layerName, const char *typeOfEstimate, IlInt maxTiles, IlvMapsError &status)
 Performs a query to the Oracle database that estimates the tiling level for the specified layer. More...
 
static char ** GetAllLayers (IlUShort &layersCount, IldDbms *dbms, const char *ownerName, IlvMapsError &status)
 Returns a string array made up of all the available SDO layers for the given owner name. More...
 
static IlvSDODbmsFactoryGetDbmsFactory ()
 Returns the dbms Factory that you have to use in order to make IldDbms objects. More...
 
static IlInt GetGeometriesCount (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Returns the number of geometries contained in the [layerName]_SDOGEOM table. More...
 
static IlInt GetLastDbErrorCode ()
 Returns the last DBMS error code that had occurred. More...
 
static const char * GetLastDbErrorMessage ()
 Returns the last DBMS error message that had occurred. More...
 
static const char * GetLastDbErrorQuery ()
 Returns the last query that raised the DBMS error. More...
 
static IL_STDPREF ostream * GetTraceStream ()
 Returns the traces stream where the traces are directed. More...
 
static void ResetLastDbError ()
 Resets all the internal error flags.
 
static void SetDbmsFactory (IlvSDODbmsFactory *factory)
 Sets the dbms Factory that you have to use in order to make IldDbms objects. More...
 
static void SetLastDbErrorCode (IlInt code)
 Sets the last DBMS error code that had occurred. More...
 
static void SetLastDbErrorMessage (const char *message)
 Sets the last DBMS error message that had occurred. More...
 
static void SetLastDbErrorQuery (const char *query)
 Sets the last query that raised the DBMS error. More...
 
static IlBoolean SQLTracesEnabled ()
 Returns IlTrue if the SQL trace mode is enabled. More...
 

Static Public Attributes

static const char * ALL_GID_EXTENT
 Returns an Oracle constant for a method of estimation of the tiling level based on the GID extent. More...
 
static const char * AVERAGE_GID_EXTENT
 Returns an Oracle constant for a method of estimation of the tiling level based on the GID average extent. More...
 
static const char * LAYER_EXTENT
 Returns an Oracle constant for a method of estimation of the tiling level based on the layer extent. More...
 

Friends

class IlvObjectSDOUtil
 

Detailed Description

Utility class for basic tasks on Oracle SDO relational Model.

Library: ilvdbmaps

Member Function Documentation

static IlBoolean IlvSDOUtil::CheckLayerExistence ( IldDbms *  dbms,
const char *  layerName,
IlvMapsError &  status 
)
static

Checks whether the given SDO layer exists.

Parameters
dbmsThe IldDbms.
layerNameThe name of the SDO layer. It can contain the owner name of the table: "OwnerName.LayerName".
statusThe error status raised by this function call.
Returns
IlTrue if the layer exists, IlFalse otherwise.
static IlBoolean IlvSDOUtil::CheckSdoExistence ( IldDbms *  dbms,
IlvMapsError &  status 
)
static

Checks whether the SDO extension is in the database.

Parameters
dbmsThe IldDbms.
statusThe error status raised by this function call.
Returns
IlTrue if the SDO package exists, IlFalse otherwise.
static IlvMapsError IlvSDOUtil::DbLinkError ( )
static

An IlvMapError indicating a Data Base Error raised through DB Link.

Returns
The error raised by this function call.
static void IlvSDOUtil::DropLayer ( IldDbms *  dbms,
const char *  layerName,
IlvMapsError &  status 
)
static

Drops the four SDO tables corresponding to the current layerName.

Calling this method may lead to the following harmless error: "Table or View does not exist".

Parameters
dbmsThe IldDbms.
layerNameThe SDO layer name. It can contain the owner name of the table: "OwnerName.LayerName".
statusThe error status raised by this function call.
static IlvMapsError IlvSDOUtil::EnableDbLink ( )
static

Enables the DB Link Product.

A Views Maps license is mandatory for calling this method.

Returns
IlvMaps::NoError() if the Views Maps license was available, IlvMaps::NoLicenseError() otherwise.
static void IlvSDOUtil::EnableSQLTraces ( IL_STDPREF ostream *  stream)
static

Enables the trace mode for the SQL queries.

Parameters
streamThe stream where the traces are directed.
static IlUShort IlvSDOUtil::EstimateTilingLevel ( IldDbms *  dbms,
const char *  layerName,
const char *  typeOfEstimate,
IlInt  maxTiles,
IlvMapsError &  status 
)
static

Performs a query to the Oracle database that estimates the tiling level for the specified layer.

Parameters
dbmsThe IldDbms.
layerNameThe SDO layer name.
trypeOfEstimateThe tiling level estimation method.
maxTilesThe maximum number of tiles required.
statusThe error status raised by this function call.
Returns
The estimated tiling level.
See Also
IlvSDOUtil::LAYER_EXTENT
IlvSDOUtil::ALL_GID_EXTENT
IlvSDOUtil::AVERAGE_GID_EXTENT
static char** IlvSDOUtil::GetAllLayers ( IlUShort layersCount,
IldDbms *  dbms,
const char *  ownerName,
IlvMapsError &  status 
)
static

Returns a string array made up of all the available SDO layers for the given owner name.

It's your responsibility to delete the returned array of char* by using the operator delete [].

Parameters
layersCountThe number of available SDO layers.
dbmsThe IldDbms.
ownerNameThe Oracle owner of the layer table in the database.
statusThe error status raised by this function call.
Returns
A string array made up of all the available SDO layers for the given owner name.
static IlvSDODbmsFactory* IlvSDOUtil::GetDbmsFactory ( )
static

Returns the dbms Factory that you have to use in order to make IldDbms objects.

Returns
The dbms Factory that you have to use in order to make IldDbms objects.
See Also
IlvSDODbmsFactory
static IlInt IlvSDOUtil::GetGeometriesCount ( IldDbms *  dbms,
const char *  layerName,
IlvMapsError &  status 
)
static

Returns the number of geometries contained in the [layerName]_SDOGEOM table.

Parameters
dbmsThe IldDbms.
layerNameThe SDO layer name.
statusThe error status raised by this function call.
Returns
The number of geometries available in the specified layer.
static IlInt IlvSDOUtil::GetLastDbErrorCode ( )
static

Returns the last DBMS error code that had occurred.

Returns
The last DBMS error code that had occurred.
static const char* IlvSDOUtil::GetLastDbErrorMessage ( )
static

Returns the last DBMS error message that had occurred.

Returns
The last DBMS error message that had occurred.
static const char* IlvSDOUtil::GetLastDbErrorQuery ( )
static

Returns the last query that raised the DBMS error.

Returns
The last query that raised the DBMS error.
static IL_STDPREF ostream* IlvSDOUtil::GetTraceStream ( )
static

Returns the traces stream where the traces are directed.

Returns
The traces stream where the traces are directed.
static void IlvSDOUtil::SetDbmsFactory ( IlvSDODbmsFactory factory)
static

Sets the dbms Factory that you have to use in order to make IldDbms objects.

You can use this method in order to install your own factory that, for instance, implements dialog boxes.

See Also
IlvSDODbmsFactory
static void IlvSDOUtil::SetLastDbErrorCode ( IlInt  code)
static

Sets the last DBMS error code that had occurred.

Parameters
codeThe code of the raised error.
static void IlvSDOUtil::SetLastDbErrorMessage ( const char *  message)
static

Sets the last DBMS error message that had occurred.

Parameters
messageThe error message.
static void IlvSDOUtil::SetLastDbErrorQuery ( const char *  query)
static

Sets the last query that raised the DBMS error.

Parameters
queryThe query that raised the error.
static IlBoolean IlvSDOUtil::SQLTracesEnabled ( )
static

Returns IlTrue if the SQL trace mode is enabled.

Returns
Returns IlTrue if the SQL trace mode is enabled, IlFalse otherwise.

Member Data Documentation

const char* IlvSDOUtil::ALL_GID_EXTENT
static

Returns an Oracle constant for a method of estimation of the tiling level based on the GID extent.

See Also
IlvSDOUtil::EstimateTilingLevel
const char* IlvSDOUtil::AVERAGE_GID_EXTENT
static

Returns an Oracle constant for a method of estimation of the tiling level based on the GID average extent.

See Also
IlvSDOUtil::EstimateTilingLevel
const char* IlvSDOUtil::LAYER_EXTENT
static

Returns an Oracle constant for a method of estimation of the tiling level based on the layer extent.

See Also
IlvSDOUtil::EstimateTilingLevel

© Copyright 2014, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.