Package oracle.sql
Class BOOLEAN
- java.lang.Object
-
- oracle.sql.Datum
-
- oracle.sql.BOOLEAN
-
- All Implemented Interfaces:
java.io.Serializable
public class BOOLEAN extends Datum
The BOOLEAN class is a representation of the Oracle BOOLEAN datatype. It is intended to be immutable. The user should not try to change its contents once it is constructed.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class oracle.sql.Datum
ojiOracleDatumWithConnection, targetDatum
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isConvertibleTo(java.lang.Class<?> cls)
Determines if the object can be converted to a particular classjava.lang.Object
makeJdbcArray(int arraySize)
Returns a JDBC array representation of the datumstatic boolean
toBoolean(byte[] bytes)
Convert an Oracle Number to a Java boolean.boolean
toBooleanValue()
Calls toBoolean to convert into a Java Boolean.java.lang.Object
toJdbc()
Returns the JDBC representation of the datum object-
Methods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, bytesEqual, bytesHashCode, byteValue, characterStreamValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getConnectionDuringExceptionHandling, getLength, getStream, intValue, isNull, longValue, setBytes, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClass
-
-
-
-
Constructor Detail
-
BOOLEAN
public BOOLEAN(byte[] _bytes)
Construct a BOOLEAN from a byte array.- Parameters:
_bytes
- input data from which this class instance is constructed.
-
BOOLEAN
public BOOLEAN(boolean bool)
Construct a BOOLEAN from a primitive boolean.- Parameters:
bool
- input data from which this class instance is constructed.
-
BOOLEAN
public BOOLEAN(java.lang.Boolean bool)
Construct a BOOLEAN from an instance of java.lang.Boolean.- Parameters:
bool
- input data from which this class instance is constructed.
-
-
Method Detail
-
isConvertibleTo
public boolean isConvertibleTo(java.lang.Class<?> cls)
Determines if the object can be converted to a particular class- Specified by:
isConvertibleTo
in classDatum
- Parameters:
cls
- Class to convert to- Returns:
- true, if conversion to cls is permitted false, if conversion to cls is not permitted
-
toJdbc
public java.lang.Object toJdbc() throws java.sql.SQLException
Returns the JDBC representation of the datum object
-
toBooleanValue
public boolean toBooleanValue() throws java.sql.SQLException
Calls toBoolean to convert into a Java Boolean.- Returns:
- a Java Boolean value
- Throws:
java.sql.SQLException
-
toBoolean
public static boolean toBoolean(byte[] bytes)
Convert an Oracle Number to a Java boolean. A zero value translates tofalse
and non-zero values translate totrue
- Parameters:
bytes
- in byte array format- Returns:
- a Java boolean value
-
makeJdbcArray
public java.lang.Object makeJdbcArray(int arraySize)
Returns a JDBC array representation of the datum- Specified by:
makeJdbcArray
in classDatum
- Parameters:
arraySize
- size of the array- Returns:
- an object containing the JDBC array value
- Throws:
java.sql.SQLException
- if conversion to JDBC array representation results in an error
-
-