Because DataType is a subtype of DataType, SQLBoolean can play a role in either a DataType/Row or a DataType/Row, interchangeably.
We assume the store has a flag for nullness of the value, and simply return a 0-length array for the stored form when the value is null.
PERFORMANCE: There are likely alot of performance improvements possible for this implementation -- it new's Integer more than it probably wants to.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final SQLBoolean | |
| pack-priv static final int | |
| private static final SQLBoolean | |
| private boolean | |
| private boolean | |
| pack-priv static final SQLBoolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public BooleanDataValue | Returns: this AND otherValueThe other boolean to AND with this one otherValue)Implements org. The AND operator. |
| public DataValueDescriptor | cloneValue(boolean
any streams representing the data value will
be materialized if forceMaterialization)true, the data value will be kept as a
stream if possible if falseImplements org. Clone this DataValueDescriptor. |
| public int | compare(DataValueDescriptor
The Orderable to compare this one to. other)Implements org. Compare this Orderable with a given Orderable for the purpose of index positioning. |
| public boolean | compare(int
Orderable.ORDER_OP_EQUALS means do an = comparison.
Orderable.ORDER_OP_LESSTHAN means compare this < other.
Orderable.ORDER_OP_LESSOREQUALS means compare this <= other. op, DataValueDescriptor The DataValueDescriptor to compare this one to. other, boolean True means to treat nulls as ordered values,
that is, treat SQL null as equal to null, and less
than all other values.
False means to treat nulls as unknown values,
that is, the result of any comparison with a null
is the UNKNOWN truth value. orderedNulls, boolean The return value to use if the result of the
comparison is the UNKNOWN truth value. In other
words, if orderedNulls is false, and a null is
involved in the comparison, return unknownRV.
This parameter is not used orderedNulls is true. unknownRV)Overrides org. Implements org. Compare this Orderable with a given Orderable for the purpose of qualification and sorting. |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the two parameters are equalThe value on the left side of the = left, DataValueDescriptor The value on the right side of the = right)Overrides org. Implements org. The = operator as called from the language module, as opposed to the storage module. |
| public boolean | Returns: true if the given value equals the value in this SQLBoolean, false if notThe value to look for val)Implements org. Determine whether this SQLBoolean contains the given boolean value. |
| public int | estimateMemoryUsage()
Implements org. Estimate the memory usage in bytes of the data value and the overhead of the class. |
| public boolean | getBoolean()
Overrides org. Implements org. Gets the value in the data value descriptor as a boolean. |
| public byte | getByte()
Overrides org. Implements org. Gets the value in the data value descriptor as a byte. |
| public double | getDouble()
Overrides org. Implements org. Gets the value in the data value descriptor as a double. |
| public float | getFloat()
Overrides org. Implements org. Gets the value in the data value descriptor as a float. |
| public BooleanDataValue | Returns: An immutable BooleanDataValue with the same value as this.Implements org. Return an immutable BooleanDataValue with the same value as this. |
| public int | getInt()
Overrides org. Implements org. Gets the value in the data value descriptor as an int. |
| public int | getLength()
Implements org. Gets the length of the data value. |
| public long | getLong()
Overrides org. Implements org. Gets the value in the data value descriptor as a long. |
| public DataValueDescriptor | getNewNull()
Implements org. Get a new null value of the same type as this data value. |
| public Object | getObject()
Overrides org. Implements org. Gets the value in the data value descriptor as a Java Object. |
| public short | getShort()
Overrides org. Implements org. Gets the value in the data value descriptor as a short. |
| public String | getString()
Implements org. Gets the value in the data value descriptor as a String. |
| public int | getTypeFormatId()
Implements org. Return my format identifier. |
| public String | getTypeName()
Implements org. Get the SQL name of the datatype |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the left operand is greater than or equal to the right operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The >= operator as called from the language module, as opposed to the storage module. |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the left operand is greater than the right operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The > operator as called from the language module, as opposed to the storage module. |
| public int | |
| public BooleanDataValue | Returns: whether this IS otherValueBooleanDataValue to compare to. May be TRUE, FALSE, or UNKNOWN. otherValue)Implements org. The SQL IS operator - consult any standard SQL reference for an explanation. |
| public BooleanDataValue | Returns: NOT( this IS otherValue )BooleanDataValue to compare to. May be TRUE, FALSE, or UNKNOWN. otherValue)Implements org. Implements NOT IS. |
| public boolean | isNull()
Implements org. Return whether the value is null or not. |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the left operand is less than or equal to the right operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The <= operator as called from the language module, as opposed to the storage module. |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the left operand is less than the right operandThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The < operator as called from the language module, as opposed to the storage module. |
| private static int | |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the two parameters are not equalThe value on the left side of the operator left, DataValueDescriptor The value on the right side of the operator right)Overrides org. Implements org. The <> operator as called from the language module, as opposed to the storage module. |
| public BooleanDataValue | Returns: this OR otherValueThe other boolean to OR with this one otherValue)Implements org. The OR operator. |
| public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public DataValueDescriptor | Returns: a new SQLBoolean if this object is immutable; otherwise, this object with value set to nullOverrides org. Implements org. Recycle this SQLBoolean object if possible. |
| public void | restoreToNull()
Implements org. Restore this object to its (SQL)null value. |
| public void | setBigDecimal(BigDecimal
required to be a BigDecimal or null. bigDecimal)Overrides org. Implements org. Set this value from an application supplied java.math.BigDecimal. |
| protected void | setFrom(DataValueDescriptor
The DataValueDescriptor that holds the value to
which we want to set this DataValueDescriptor's value. theValue)Overrides org. Set the value of this DataValueDescriptor based on the value of the specified DataValueDescriptor. |
| public final void | setInto(PreparedStatement ps, int position)
Overrides org. Implements org. Set the value into a PreparedStatement. |
| pack-priv void | setObject(Object theValue)
Overrides org. Set the value from an non-null object. |
| public void | setValue(boolean
Contains the boolean value to set this to theValue)Overrides org. Implements org. Set the value. |
| public void | setValue(Boolean
Contains the boolean value to set this BooleanDataValue
to. Null means set this BooleanDataValue to null. theValue)Implements org. Set the value of this BooleanDataValue. |
| public void | setValue(byte
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor to the given byte value |
| public void | setValue(short
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor to the given short value |
| public void | setValue(int
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor to the given int value |
| public void | setValue(long
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor to the given long value |
| public void | setValue(float
A Double containing the value to set this
DataValueDescriptor to. Null means set the value
to SQL null. theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor to the given double value |
| public void | setValue(double
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor to the given double value |
| public void | setValue(String
The value to set this BooleanDataValue to theValue)Overrides org. Implements org. Set the value of this BooleanDataValue to the given String. |
| public void | setValueFromResultSet(ResultSet
The specified ResultSet. resultSet, int The 1-based column # into the resultSet. colNumber, boolean Whether or not the column is nullable
(No need to call wasNull() if not) isNullable)Implements org. Set the value based on the value for the specified DataValueDescriptor from the specified ResultSet. |
| public BooleanDataValue | Returns: thisThe SQLState of the exception to throw if
this SQLBoolean is false. sqlState, String The name of the table to include in the exception
message. tableName, String The name of the failed constraint to include
in the exception message. constraintName)Implements org. Throw an exception with the given SQLState if this BooleanDataValue is false. |
| public BooleanDataValue | throwExceptionIfImmediateAndFalse(String
The SQLState of the exception to throw if
this SQLBoolean is false. sqlState, String The name of the table to include in the exception
message. tableName, String The name of the failed constraint to include
in the exception message. constraintName, Activation The activation a, int The saved object number of the constraint's UUID. savedUUIDIdx)Implements org. If this value is false and we have a deferred constraint, remember the violation and proceed, else throw. |
| public String | |
| public static SQLBoolean | Returns: A SQLBoolean containing the desired truth value.The left operand of the binary comparison leftOperand, DataValueDescriptor The right operand of the binary comparison rightOperand, boolean The truth value of the comparison truth)Return the SQL truth value for a comparison. |
| public static SQLBoolean | truthValue(DataValueDescriptor leftOperand, DataValueDescriptor rightOperand, Boolean truth)
same as above, but takes a Boolean, if it is null, unknownTruthValue is returned |
| public static SQLBoolean | Returns: A SQLBoolean with the given truth valueThe value of the SQLBoolean value)Get a truth value. |
| public int | typePrecedence()
Overrides org. Implements org. Each built-in type in JSQL has a precedence. |
| public int | typeToBigDecimal()
Overrides org. Implements org. Implementation for BOOLEAN type. |
| public static SQLBoolean | Returns: A SQLBoolean representing the UNKNOWN truth valueReturn an unknown truth value. |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |