Package oracle.sql
Class BOOLEAN
java.lang.Object
oracle.sql.Datum
oracle.sql.BOOLEAN
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class oracle.sql.Datum
ojiOracleDatumWithConnection, targetDatum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCallstoBooleanValue()to convert into a Java Boolean.booleanisConvertibleTo(Class<?> cls) Determines if the object can be converted to a particular classmakeJdbcArray(int arraySize) Returns a JDBC array representation of the datumstatic booleantoBoolean(byte[] bytes) Convert an Oracle Number to a Java boolean.booleanCalls toBoolean to convert into a Java Boolean.toJdbc()Returns the JDBC representation of the datum objectMethods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, 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 Details
-
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
Construct a BOOLEAN from an instance of java.lang.Boolean.- Parameters:
bool- input data from which this class instance is constructed.
-
-
Method Details
-
isConvertibleTo
Determines if the object can be converted to a particular class- Specified by:
isConvertibleToin classDatum- Parameters:
cls- Class to convert to- Returns:
- true, if conversion to cls is permitted false, if conversion to cls is not permitted
-
toJdbc
Returns the JDBC representation of the datum object- Specified by:
toJdbcin classDatum- Returns:
- an object containing the JDBC value
- Throws:
SQLException- if conversion to JDBC representation results in an error
-
toBooleanValue
Calls toBoolean to convert into a Java Boolean.- Returns:
- a Java Boolean value
- Throws:
SQLException
-
booleanValue
CallstoBooleanValue()to convert into a Java Boolean.- Overrides:
booleanValuein classDatum- Returns:
- Java boolean representation of this object
- Throws:
SQLException
-
toBoolean
public static boolean toBoolean(byte[] bytes) Convert an Oracle Number to a Java boolean. A zero value translates tofalseand non-zero values translate totrue- Parameters:
bytes- in byte array format- Returns:
- a Java boolean value
-
makeJdbcArray
Returns a JDBC array representation of the datum- Specified by:
makeJdbcArrayin classDatum- Parameters:
arraySize- size of the array- Returns:
- an object containing the JDBC array value
- Throws:
SQLException- if conversion to JDBC array representation results in an error
-