org.deegree.sqldialect.oracle.sdo
Class OracleObjectTools

java.lang.Object
  extended by org.deegree.sqldialect.oracle.sdo.OracleObjectTools

public class OracleObjectTools
extends Object

Helper class to convert between Oracle STRUCT JDBC and Java primitives

The code of these classes is partial inspired from the Geotools Oracle Plugin, which uses the same approach and is also licensed under GNU LGPL 2.1.

Version:
$Revision: 31323 $, $Date: 2011-07-19 16:15:16 +0200 (Tue, 19 Jul 2011) $
Author:
Stephan Reichhelm
See Also:
(C) 2003-2008, Open Source Geospatial Foundation (OSGeo), Plugin jdbc-oracle org.geotools.data.oracle.sdo.GeometryConverter

Constructor Summary
OracleObjectTools()
           
 
Method Summary
protected static double fromDouble(oracle.sql.Datum data, double defaultValue)
           
protected static double[] fromDoubleArray(oracle.sql.ARRAY data, double defaultValue)
           
protected static double[] fromDoubleArray(oracle.sql.Datum[] data, double defaultValue)
           
protected static double[] fromDoubleArray(oracle.sql.STRUCT struct, double defaultValue)
           
protected static int fromInteger(oracle.sql.Datum data, int defaultValue)
           
protected static int[] fromIntegerArray(oracle.sql.ARRAY data)
           
protected static oracle.sql.ARRAY toArray(double[] elements, String type, oracle.jdbc.OracleConnection conn)
           
protected static oracle.sql.ARRAY toArray(int[] elements, String type, oracle.jdbc.OracleConnection conn)
           
protected static oracle.sql.NUMBER toNumber(double value)
           
protected static oracle.sql.NUMBER toNumber(int value)
           
protected static oracle.sql.STRUCT toSDOGeometry(int gtype, int srid, int[] elemInfo, double[] ordinates, oracle.jdbc.OracleConnection conn)
          Convert SDO_Geometry informations into Oracle JDBC STRUCT element
protected static oracle.sql.STRUCT toStruct(oracle.sql.Datum[] elements, String type, oracle.jdbc.OracleConnection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleObjectTools

public OracleObjectTools()
Method Detail

fromInteger

protected static int fromInteger(oracle.sql.Datum data,
                                 int defaultValue)
                          throws SQLException
Throws:
SQLException

fromIntegerArray

protected static int[] fromIntegerArray(oracle.sql.ARRAY data)
                                 throws SQLException
Throws:
SQLException

fromDoubleArray

protected static double[] fromDoubleArray(oracle.sql.ARRAY data,
                                          double defaultValue)
                                   throws SQLException
Throws:
SQLException

fromDoubleArray

protected static double[] fromDoubleArray(oracle.sql.Datum[] data,
                                          double defaultValue)
                                   throws SQLException
Throws:
SQLException

fromDouble

protected static double fromDouble(oracle.sql.Datum data,
                                   double defaultValue)
                            throws SQLException
Throws:
SQLException

fromDoubleArray

protected static double[] fromDoubleArray(oracle.sql.STRUCT struct,
                                          double defaultValue)
                                   throws SQLException
Throws:
SQLException

toSDOGeometry

protected static oracle.sql.STRUCT toSDOGeometry(int gtype,
                                                 int srid,
                                                 int[] elemInfo,
                                                 double[] ordinates,
                                                 oracle.jdbc.OracleConnection conn)
                                          throws SQLException
Convert SDO_Geometry informations into Oracle JDBC STRUCT element

Throws:
SQLException

toNumber

protected static final oracle.sql.NUMBER toNumber(int value)
                                           throws SQLException
Throws:
SQLException

toNumber

protected static final oracle.sql.NUMBER toNumber(double value)
                                           throws SQLException
Throws:
SQLException

toStruct

protected static final oracle.sql.STRUCT toStruct(oracle.sql.Datum[] elements,
                                                  String type,
                                                  oracle.jdbc.OracleConnection conn)
                                           throws SQLException
Throws:
SQLException

toArray

protected static final oracle.sql.ARRAY toArray(double[] elements,
                                                String type,
                                                oracle.jdbc.OracleConnection conn)
                                         throws SQLException
Throws:
SQLException

toArray

protected static final oracle.sql.ARRAY toArray(int[] elements,
                                                String type,
                                                oracle.jdbc.OracleConnection conn)
                                         throws SQLException
Throws:
SQLException


Copyright © 2011. All Rights Reserved.