public class IlvObjectSDOUtil extends Object
IlvSDOUtil
class in order to do some non Object Model specific tasks
(for instance, all the tracing methods, error reporting methods, .... of IlvSDOUtil
can be used
in the Object Model).Modifier and Type | Method and Description |
---|---|
static boolean |
CheckLayerExistence(IlvSDOConnection connection,
String layerName)
Checks whether the specified layer exists.
|
static boolean |
CheckMetadataTableExistence(Connection connection,
String ownerName)
Checks whether the geometry metadata table exists.
|
static boolean |
CheckTableExistence(IlvSDOConnection connection,
String tableName)
Checks whether the specified table exists.
|
static void |
DropLayer(IlvSDOConnection connection,
String layerName)
Removes the specified layer from database.
|
static IlvCoordinateSystem |
findCoordinateSystem(long srid,
Connection connection)
Finds the coordinate system that corresponds to
srid in the
database. |
static String[] |
GetAllLayers(Connection connection,
String ownerName,
boolean concatenateGeometryName)
Returns a
String array made up of all the available
layers for the given owner name. |
static IlvCoordinateSystem |
getCS(long srID)
Returns the IlvCoordinateSystem corresponding to the specified srID (Spatial Reference IDentifier)
|
static int |
GetGeometriesCount(Connection conn,
String tableName)
Returns the number of geometries contained in the specified table.
|
static IlvRect |
GetLayerExtent(Connection connection,
String layerName,
String geometryColumnName,
String xDimensionName,
String yDimensionName,
boolean useExtentOf)
Returns the extent (the global bounding box of all geometries) of an SDO layer.
|
static IlvObjectSDOLayerMetaData |
GetLayerMetaData(Connection connection,
String tableName,
String geometryColumnName,
String metaDataViewName,
String ownerName)
Returns a meta data built form the Data Base.
|
static ResultSet |
GetRequestFromRect(Connection conn,
String layerName,
String geometryName,
IlvCoordinate upperLeftCorner,
IlvCoordinate lowerRightCorner)
Returns a
ResultSet corresponding to the rectangle defined by its upper left and
lower right corners. |
static boolean |
IsUsing816(Connection conn)
Returns whether the Database in use is Oracle 8.1.6+ or not.
|
public static final boolean IsUsing816(Connection conn) throws SQLException
conn
- The connection.SQLException
public static final ResultSet GetRequestFromRect(Connection conn, String layerName, String geometryName, IlvCoordinate upperLeftCorner, IlvCoordinate lowerRightCorner) throws SQLException
ResultSet
corresponding to the rectangle defined by its upper left and
lower right corners.
This ResultSet
contains the SQL query corresponding to an SDO filter using a
rectangle. It is useful for the IlvObjectSDOFeatureIterator
class where you simply
want to extract data (from an SDO layer) contained in a rectangular area.conn
- The Connection
to Oracle.layerName
- The SDO table name. The name of the owner in the database can be specified.
through the layerName: "OwnerName.LayerName".geometryName
- The name of the geometry column of the SDO layer.upperLeftCorner
- The upper left corner of the rectangle.lowerRightCorner
- The lower right corner of the rectangle.ResultSet
corresponding to the rectangle defined by its upper left and
lower right corners.SQLException
public static int GetGeometriesCount(Connection conn, String tableName) throws SQLException
conn
- The connection.tableName
- The SDO table name.SQLException
public static final String[] GetAllLayers(Connection connection, String ownerName, boolean concatenateGeometryName) throws SQLException
String
array made up of all the available
layers for the given owner name.connection
- The connection.ownerName
- The owner of the layer table in the database.concatenateGeometryName
- If set to true
, the method will concatenate the name
of the Geometry column to the name of the layer. For instance if an SDO layer ROADS
has its geometry column called GEOMETRY, then the method will return ROADS.GEOMETRYSQLException
public static final boolean CheckTableExistence(IlvSDOConnection connection, String tableName) throws SQLException
connection
- The connection.tableName
- The name of the table.SQLException
public static final boolean CheckLayerExistence(IlvSDOConnection connection, String layerName) throws SQLException
connection
- The connection.layerName
- The name of the layer. The name of the owner in the database can be specified.
through the layerName: "OwnerName.LayerName".SQLException
public static final void DropLayer(IlvSDOConnection connection, String layerName) throws SQLException
connection
- The connection to Oracle.layerName
- The SDO layer name. The name of the owner in the database can be specified.
through the layerName: "OwnerName.LayerName".SQLException
public static final boolean CheckMetadataTableExistence(Connection connection, String ownerName) throws SQLException
connection
- The connection.ownerName
- The name of the owner of the geometry metadata Table.SQLException
public static final IlvRect GetLayerExtent(Connection connection, String layerName, String geometryColumnName, String xDimensionName, String yDimensionName, boolean useExtentOf) throws SQLException
IlvObjectSDOLayer
.
This function has two strategies to compute the layer extent:
null
, they are defaulted to be
the first ordinate and the second ordinate of geometries.connection
- The connection to the Oracle DB.layerName
- The name of the layer. The name of the owner in the database can be
specified through the layerName: "OwnerName.TableName".geometryColumnName
- The name of the column containing geometries.xDimensionName
- The name of the X dimension.yDimensionName
- The name of the Y dimension.useExtentOf
- If set to true
, the function uses SDO_TUNE.EXTENT_OF, otherwise
the function uses the geometry metadata table.SQLException
public static final IlvObjectSDOLayerMetaData GetLayerMetaData(Connection connection, String tableName, String geometryColumnName, String metaDataViewName, String ownerName) throws SQLException
(XXX_)SDO_GEOM_METADATA
view,
(XXX
being ALL
, DBA
or USER
)
and returns the corresponding IlvObjectSDOLayerMetaData
that
can be used by the load-on-demand classes.connection
- The connection.tableName
- The name of the SDO layer table. The name of the column in the
(XXX_)SDO_GEOM_METADATA
view is TABLE_NAME
.
This parameter can't be null
.geometryColumnName
- The name of the column containing the geometries objects.
The name of the column in the (XXX_)SDO_GEOM_METADATA
view is COLUMN_NAME
.metaDataViewName
- The name of the meta data view. It can be SDO_GEOM_METADATA
(for
8.1.5- Oracle version), USER_SDO_GEOM_METADATA
(for Oracle 8.1.6+),
ALL_SDO_GEOM_METADATA
or DBA_SDO_GEOM_METADATA
.ownerName
- The name of the owner of the meta data. For instance, for the
ALL_SDO_GEOM_METADATA
or DBA_SDO_GEOM_METADATA
views
this name corresponds to the OWNER
column of the view.SQLException
public static final IlvCoordinateSystem findCoordinateSystem(long srid, Connection connection) throws IlvSDOException, SQLException
srid
in the
database.srid
- The SRID number.connection
- The database connection.MDSYS.CS_SRS
table.IlvSDOException
SQLException
public static final IlvCoordinateSystem getCS(long srID)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.