ilog.views.maps.format.oracle
Class IlvSDOUtil

java.lang.Object
  extended by ilog.views.maps.format.oracle.IlvSDOUtil

public class IlvSDOUtil
extends Object

Utility class for basic SDO requests.

Since:
JViews 3.0

Field Summary
static String ALL_GID_EXTENT
          An Oracle constant for a method of estimation of the tiling level based on the gid extent.
static String AVERAGE_GID_EXTENT
          An Oracle constant for a method of estimation of the tiling level based on the gid average extent.
static String LAYER_EXTENT
          An Oracle constant for a method of estimation of the tiling level based on the layer extent.
 
Method Summary
static boolean CheckLayerExistence(Connection connection, String ownerName, String layerName)
          Checks whether the given SDO layer exists.
static boolean CheckSdoExistence(Connection connection)
          Checks whether the SDO extension is in the database.
static void Drop(Connection connection, String layerName, String ownerName)
          Drops the four SDO tables corresponding to the current layerName.
static void EnableSQLTraces(boolean enable)
          Sets the trace mode for the SQL queries.
static int EstimateTilingLevel(Connection connection, String layerName, String typeOfEstimate, int maxTiles)
          Performs a query to the Oracle database that estimates the tiling level for the specified layer.
static String[] GetAllLayers(Connection connection, String ownerName)
          Returns a String array made up of all the available SDO layers for the given owner name.
static int GetGeometriesCount(Connection connection, String layerName)
          Returns the number of geometries contained in the [layerName]_SDOGEOM table.
static boolean SQLTracesEnabled()
          Returns true if the SQL trace mode is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAYER_EXTENT

public static final String LAYER_EXTENT
An Oracle constant for a method of estimation of the tiling level based on the layer extent.

See Also:
EstimateTilingLevel(java.sql.Connection, java.lang.String, java.lang.String, int), Constant Field Values

ALL_GID_EXTENT

public static final String ALL_GID_EXTENT
An Oracle constant for a method of estimation of the tiling level based on the gid extent.

See Also:
EstimateTilingLevel(java.sql.Connection, java.lang.String, java.lang.String, int), Constant Field Values

AVERAGE_GID_EXTENT

public static final String AVERAGE_GID_EXTENT
An Oracle constant for a method of estimation of the tiling level based on the gid average extent.

See Also:
EstimateTilingLevel(java.sql.Connection, java.lang.String, java.lang.String, int), Constant Field Values
Method Detail

CheckSdoExistence

public static final boolean CheckSdoExistence(Connection connection)
                                       throws SQLException
Checks whether the SDO extension is in the database.

Parameters:
connection - The connection.
Throws:
SQLException

CheckLayerExistence

public static final boolean CheckLayerExistence(Connection connection,
                                                String ownerName,
                                                String layerName)
                                         throws SQLException
Checks whether the given SDO layer exists. The name of the owner in the database is indicated by userName.

Parameters:
connection - The connection.
ownerName - The Oracle owner of the layer table in the database.
layerName - The name of the SDO layer.
Throws:
SQLException

GetAllLayers

public static final String[] GetAllLayers(Connection connection,
                                          String ownerName)
                                   throws SQLException
Returns a String array made up of all the available SDO layers for the given owner name.

Parameters:
connection - The connection.
ownerName - The Oracle owner of the layer table in the database.
Throws:
SQLException

Drop

public static final void Drop(Connection connection,
                              String layerName,
                              String ownerName)
                       throws SQLException
Drops the four SDO tables corresponding to the current layerName. Calling this method may throw the following SQLException: "Table or View does not exist".

Parameters:
connection - The connection.
layerName - The SDO layer name.
ownerName - The Oracle owner of the layer table in the database.
Throws:
SQLException

GetGeometriesCount

public static final int GetGeometriesCount(Connection connection,
                                           String layerName)
                                    throws SQLException
Returns the number of geometries contained in the [layerName]_SDOGEOM table.

Parameters:
connection - The connection.
layerName - The SDO layer name.
Throws:
SQLException

EstimateTilingLevel

public static final int EstimateTilingLevel(Connection connection,
                                            String layerName,
                                            String typeOfEstimate,
                                            int maxTiles)
                                     throws SQLException
Performs a query to the Oracle database that estimates the tiling level for the specified layer.

Parameters:
connection - The connection.
layerName - The SDO layer name.
typeOfEstimate - The tiling level estimation method.
maxTiles - The maximum number of tiles required.
Throws:
SQLException
See Also:
LAYER_EXTENT, ALL_GID_EXTENT, AVERAGE_GID_EXTENT

EnableSQLTraces

public static void EnableSQLTraces(boolean enable)
Sets the trace mode for the SQL queries. By default, the mode is "turned off".


SQLTracesEnabled

public static final boolean SQLTracesEnabled()
Returns true if the SQL trace mode is enabled.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.