public class OraUtil extends Object
| Constructor and Description |
|---|
OraUtil() |
| Modifier and Type | Method and Description |
|---|---|
static oracle.sql.ARRAY |
toARRAY(double[] doubles,
String dataType,
oracle.jdbc.OracleConnection connection)
Convience method for ARRAY construction.
|
static oracle.sql.ARRAY |
toARRAY(int[] ints,
String dataType,
oracle.jdbc.OracleConnection connection)
Convience method for ARRAY construction.
|
static double |
toDouble(oracle.sql.Datum datum,
double defaultValue)
Presents datum as a double
|
static double[] |
toDoubleArray(oracle.sql.ARRAY array,
double defaultValue)
Presents array as a double[]
|
static double[] |
toDoubleArray(oracle.sql.Datum[] data,
double defaultValue)
Presents Datum[] as a double[]
|
static double[] |
toDoubleArray(oracle.sql.STRUCT struct,
double defaultValue)
Presents struct as a double[]
|
static int[] |
toIntArray(oracle.sql.ARRAY array,
int defaultValue)
Converts an Oracle
ARRAY into a int array,
with a default value used to represent NULL values. |
static int[] |
toIntArray(oracle.sql.Datum[] data,
int defaultValue)
Presents Datum[] as a int[]
|
static int |
toInteger(oracle.sql.Datum datum,
int defaultValue)
Converts an Oracle
Datum into an int value,
with a default value used if the datum is NULL. |
static oracle.sql.NUMBER |
toNUMBER(double number)
Convenience method for NUMBER construction.
|
static oracle.sql.STRUCT |
toSTRUCT(oracle.sql.Datum[] attributes,
String dataType,
oracle.jdbc.OracleConnection connection)
Convenience method for STRUCT construction.
|
public static int toInteger(oracle.sql.Datum datum,
int defaultValue)
throws SQLException
Datum into an int value,
with a default value used if the datum is NULL.datum - the Oracle DatumdefaultValue - the value to use for NULLsSQLException - if an error occurspublic static int[] toIntArray(oracle.sql.ARRAY array,
int defaultValue)
throws SQLException
ARRAY into a int array,
with a default value used to represent NULL values.array - an Oracle ARRAY of integer valuesdefaultValue - the value to use for NULL valuesSQLException - if an error was encounteredpublic static int[] toIntArray(oracle.sql.Datum[] data,
int defaultValue)
throws SQLException
SQLExceptionpublic static double[] toDoubleArray(oracle.sql.Datum[] data,
double defaultValue)
public static double[] toDoubleArray(oracle.sql.ARRAY array,
double defaultValue)
throws SQLException
SQLExceptionpublic static double[] toDoubleArray(oracle.sql.STRUCT struct,
double defaultValue)
throws SQLException
SQLExceptionpublic static double toDouble(oracle.sql.Datum datum,
double defaultValue)
public static oracle.sql.NUMBER toNUMBER(double number)
throws SQLException
Double.NaN is represented as NULL to agree with JTS use.
SQLExceptionpublic static oracle.sql.ARRAY toARRAY(double[] doubles,
String dataType,
oracle.jdbc.OracleConnection connection)
throws SQLException
SQLExceptionpublic static oracle.sql.ARRAY toARRAY(int[] ints,
String dataType,
oracle.jdbc.OracleConnection connection)
throws SQLException
SQLExceptionpublic static oracle.sql.STRUCT toSTRUCT(oracle.sql.Datum[] attributes,
String dataType,
oracle.jdbc.OracleConnection connection)
throws SQLException
SQLExceptionCopyright © 2015. All rights reserved.