public class SdoGeorUtlPKG
extends java.lang.Object
Note that all methods in this class are transactional, which means that no commit statement is issued implicitly in each method.
The following is an example of how to use this class:
//initialize an instance of SdoGeorUtlPKG SdoGeorUtlPKG pkg=new SdoGeorUtlPKG(connection); //reading a GeoRaster object from database based on a query Statement stmt = connection.createStatement(); ResultSet rs = statement.executeQuery("SELECT a.georaster FROM georaster_table a where a.georaster.rasterdatatable='RDT' and a.georaster.rasterid=1"); rs.next(); STRUCT geor = (oracle.sql.STRUCT) rs.getObject(1); //convert STRUCT into SdoGeoRaster SdoGeoRaster sdoGeoRaster = new SdoGeoRaster(geor); //calcRasterStorageSize size=pkg.calcRasterStorageSize(sdoGeoRaster);
Constructor and Description |
---|
SdoGeorUtlPKG(java.sql.Connection conn)
Constructs an
SdoGeorUtlPKG object using the given connection. |
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal[] |
calcOptimizedBlockSize(long[] dimensionSize, long[] blockSize, long pyramidLevel)
Calculates an optimal blockSize value that will use less padding space in the GeoRaster object storage, based on the GeoRaster dimension sizes and the user-specified block size values.
|
double |
calcRasterNominalSize(SdoGeoRaster georaster, boolean padding, boolean pyramid, boolean bitmapMask)
Returns the total raster block length (in bytes) of a GeoRaster object, as if it were not compressed and did not contain any empty raster blocks.
|
double |
calcRasterStorageSize(SdoGeoRaster georaster)
Returns the actual length (in bytes) of all raster blocks of a GeoRaster object.
|
void |
clearReportTable(java.lang.Long client_id)
Deletes records in the table that contains GeoRaster operation status information.
|
void |
createDMLTrigger(java.lang.String tableName, java.lang.String columnName)
Creates the required standard GeoRaster data manipulation language (DML) trigger on a GeoRaster column in a GeoRaster table, so that the appropriate operations are performed when its associated trigger is fired.
|
void |
createReportTable()
Creates the table to contain GeoRaster operation status information.
|
void |
disableReport()
Disables status reporting on GeoRaster operations in the current session.
|
void |
dropReportTable()
Drops the table that contains GeoRaster operation status information.
|
void |
emptyBlocks(SdoGeoRaster georaster, double[] bgValues)
Trims all blocks that contain only the specified background values to empty LOBs, thus making them empty blocks.
|
void |
enableReport()
Enables status reporting on GeoRaster operations in the current session.
|
void |
fillEmptyBlocks(SdoGeoRaster georaster, double[] bgValues)
Fills in all empty blocks with specified background values.
|
java.lang.String |
getAllStatusReport()
Returns the current status for all operations for all clients in the status table.
|
java.sql.Connection |
getConnection()
Returns a connection which points to target database.
|
double |
getProgress(long client_id, long seq_id)
Returns the progress of the operation for a specified client (session) and optionally for a specified operation.
|
java.lang.String |
getStatusReport(long client_id, long seq_id)
Returns the current status of the operations in the status table for a specified client (session) and optionally for a specified operation.
|
int |
isReporting()
Checks if any session has status reporting enabled.
|
void |
makeRDTNamesUnique()
Renames some existing registered raster data tables that do not have unique names so that all raster data table names are unique within the database, and updates the GeoRaster system data and all affected GeoRaster objects to reflect the new names.
|
void |
recreateDMLTriggers()
Re-creates the required standard GeoRaster data manipulation language (DML) triggers on all GeoRaster columns that the current user has privileges to access, so that the appropriate operations are performed when the triggers are fired.
|
void |
renameRDT(java.lang.String oldRDT, java.lang.String newRDT)
Renames one or more existing registered raster data tables owned by the current user, and updates the GeoRaster system data and all affected GeoRaster objects to reflect the new names.
|
void |
setClientID(long client_id)
Sets the client ID for a session.
|
void |
setConnection(java.sql.Connection conn)
Sets the connection which points to the target database.
|
void |
setSeqID(long seq_id)
Sets the sequence ID for a session.
|
public SdoGeorUtlPKG(java.sql.Connection conn)
SdoGeorUtlPKG
object using the given connection.conn
- a JDBC connection.public void setConnection(java.sql.Connection conn)
conn
- a JDBC connectionpublic java.sql.Connection getConnection()
public java.math.BigDecimal[] calcOptimizedBlockSize(long[] dimensionSize, long[] blockSize, long pyramidLevel) throws java.lang.Exception
dimensionSize
- Dimension size array of the GeoRaster object.blockSize
- Block size array, which holds the user-specified block size valuespyramidLevel
- Maximum pyramid level.java.lang.Exception
public double calcRasterNominalSize(SdoGeoRaster georaster, boolean padding, boolean pyramid, boolean bitmapMask) throws java.lang.Exception
georaster
- georaster object.padding
- The TRUE causes padding in the raster blocks to be considered; the FALSE causes padding in the raster blocks not to be considered.pyramid
- The TRUE causes the size of any pyramids to be considered; the FALSE causes the size of any pyramids not to be considered.bitmapMask
- The TRUE (the default) causes any associated bitmap masks to be considered; the FALSE causes any associated bitmap masks not to be considered.java.lang.Exception
public double calcRasterStorageSize(SdoGeoRaster georaster) throws java.lang.Exception
georaster
- georaster object.java.lang.Exception
public void createDMLTrigger(java.lang.String tableName, java.lang.String columnName) throws java.lang.Exception
tableName
- Name of a GeoRaster table (the table containing rows with at least one GeoRaster object column).columnName
- Name of a column of type SDO_GEORASTER in the GeoRaster table.java.lang.Exception
public void fillEmptyBlocks(SdoGeoRaster georaster, double[] bgValues) throws java.lang.Exception
georaster
- georaster object.bgValues
- background values for filling partially empty raster blocks.java.lang.Exception
public void makeRDTNamesUnique() throws java.lang.Exception
java.lang.Exception
public void renameRDT(java.lang.String oldRDT, java.lang.String newRDT) throws java.lang.Exception
oldRDT
- Name of the registered raster data table or tables to be renamed. For multiple tables, use a comma-delimited list.newRDT
- New names to be assigned to the raster data table or tables that are specified in oldRDTs. For multiple tables, use a comma-delimited list with an order exactly reflecting the names in oldRDTs. If this parameter is null, GeoRaster assigns a unique new name to each input raster data table.java.lang.Exception
public void emptyBlocks(SdoGeoRaster georaster, double[] bgValues) throws java.lang.Exception
georaster
- georaster object.bgValues
- Background values for determining if a block can be made an empty raster block. The number of ARRAY object must be either one (same filling value used for all layers) or the layer dimension size (a different filling value for each layer, respectively).java.lang.Exception
public void recreateDMLTriggers() throws java.lang.Exception
java.lang.Exception
public void enableReport() throws java.lang.Exception
java.lang.Exception
public void clearReportTable(java.lang.Long client_id) throws java.lang.Exception
client_id
- ID of the client whose records are to be deleted. If this parameter is not specified, all records in the table are deleted.(The client ID can be set by using the SDO_GEOR_UTL.setClientID procedure.)java.lang.Exception
public void createReportTable() throws java.lang.Exception
java.lang.Exception
public void disableReport() throws java.lang.Exception
java.lang.Exception
public void dropReportTable() throws java.lang.Exception
java.lang.Exception
public java.lang.String getAllStatusReport() throws java.lang.Exception
java.lang.Exception
public double getProgress(long client_id, long seq_id) throws java.lang.Exception
client_id
- Unique numeric value identifying the session.seq_id
- Unique numeric value (within the specified session) identifying the operation for which to return status information.java.lang.Exception
public java.lang.String getStatusReport(long client_id, long seq_id) throws java.lang.Exception
client_id
- Unique numeric value identifying the session.seq_id
- Unique numeric value (within the specified session) identifying the operation for which to return status information.java.lang.Exception
public int isReporting() throws java.lang.Exception
java.lang.Exception
public void setClientID(long client_id) throws java.lang.Exception
client_id
- Unique ID value to identify the session.java.lang.Exception
public void setSeqID(long seq_id) throws java.lang.Exception
seq_id
- Unique ID value to identify the operation in a session.java.lang.Exception