rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvSDOUtil Class Reference

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

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

List of all members.

Static Public Member Functions

static IlBoolean CheckLayerExistence (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Checks whether the given SDO layer exists.
static IlBoolean CheckSdoExistence (IldDbms *dbms, IlvMapsError &status)
 Checks whether the SDO extension is in the database.
static IlvMapsError DbLinkError ()
 An IlvMapError indicating a Data Base Error raised through DB Link.
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.
static IlvMapsError EnableDbLink ()
 Enables the DB Link Product.
static void EnableSQLTraces (IL_STDPREF ostream *stream)
 Enables the trace mode for the SQL queries.
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.
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.
static IlvSDODbmsFactoryGetDbmsFactory ()
 Returns the dbms Factory that you have to use in order to make IldDbms objects.
static IlInt GetGeometriesCount (IldDbms *dbms, const char *layerName, IlvMapsError &status)
 Returns the number of geometries contained in the [layerName]_SDOGEOM table.
static IlInt GetLastDbErrorCode ()
 Returns the last DBMS error code that had occurred.
static const char * GetLastDbErrorMessage ()
 Returns the last DBMS error message that had occurred.
static const char * GetLastDbErrorQuery ()
 Returns the last query that raised the DBMS error.
static IL_STDPREF ostream * GetTraceStream ()
 Returns the traces stream where the traces are directed.
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.
static void SetLastDbErrorCode (IlInt code)
 Sets the last DBMS error code that had occurred.
static void SetLastDbErrorMessage (const char *message)
 Sets the last DBMS error message that had occurred.
static void SetLastDbErrorQuery (const char *query)
 Sets the last query that raised the DBMS error.
static IlBoolean SQLTracesEnabled ()
 Returns IlTrue if the SQL trace mode is enabled.

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.
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.
static const char * LAYER_EXTENT
 Returns an Oracle constant for a method of estimation of the tiling level based on the layer extent.

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:
dbms The IldDbms.
layerName The name of the SDO layer. It can contain the owner name of the table: "OwnerName.LayerName".
status The 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:
dbms The IldDbms.
status The 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:
dbms The IldDbms.
layerName The SDO layer name. It can contain the owner name of the table: "OwnerName.LayerName".
status The 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:
stream The 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:
dbms The IldDbms.
layerName The SDO layer name.
trypeOfEstimate The tiling level estimation method.
maxTiles The maximum number of tiles required.
status The 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:
layersCount The number of available SDO layers.
dbms The IldDbms.
ownerName The Oracle owner of the layer table in the database.
status The 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:
dbms The IldDbms.
layerName The SDO layer name.
status The 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:
code The code of the raised error.
static void IlvSDOUtil::SetLastDbErrorMessage ( const char *  message  )  [static]

Sets the last DBMS error message that had occurred.

Parameters:
message The error message.
static void IlvSDOUtil::SetLastDbErrorQuery ( const char *  query  )  [static]

Sets the last query that raised the DBMS error.

Parameters:
query The 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 2012, 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.