Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.types
Interface BooleanDataValue  view BooleanDataValue download BooleanDataValue.java

All Superinterfaces:
DataValueDescriptor, java.io.Externalizable, org.apache.derby.iapi.services.io.Formatable, Orderable, java.io.Serializable, org.apache.derby.iapi.services.io.Storable, org.apache.derby.iapi.services.io.TypedFormat
All Known Implementing Classes:
SQLBoolean

public interface BooleanDataValue
extends DataValueDescriptor


Field Summary
 
Fields inherited from interface org.apache.derby.iapi.types.Orderable
ORDER_OP_EQUALS, ORDER_OP_GREATEROREQUALS, ORDER_OP_GREATERTHAN, ORDER_OP_LESSOREQUALS, ORDER_OP_LESSTHAN
 
Method Summary
 BooleanDataValue and(BooleanDataValue otherValue)
          The SQL AND operator.
 boolean equals(boolean value)
          Tell whether a BooleanDataValue has the given value.
 boolean getBoolean()
          Gets the value in the data value descriptor as a boolean.
 BooleanDataValue is(BooleanDataValue otherValue)
          The SQL IS operator - consult any standard SQL reference for an explanation.
 BooleanDataValue isNot(BooleanDataValue otherValue)
          Implements NOT IS.
 BooleanDataValue or(BooleanDataValue otherValue)
          The SQL OR operator.
 void setValue(java.lang.Boolean theValue)
          Set the value of this BooleanDataValue.
 BooleanDataValue throwExceptionIfFalse(java.lang.String SQLState, java.lang.String tableName, java.lang.String constraintName)
          Throw an exception with the given SQLState if this BooleanDataValue is false.
 
Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor
checkHostVariable, coalesce, compare, compare, equals, estimateMemoryUsage, getByte, getBytes, getClone, getDate, getDouble, getFloat, getInt, getLength, getLong, getNewNull, getObject, getShort, getStream, getString, getTime, getTimestamp, getTypeName, greaterOrEquals, greaterThan, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, readExternalFromArray, setBigDecimal, setInto, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromResultSet, typePrecedence, typeToBigDecimal
 
Methods inherited from interface org.apache.derby.iapi.services.io.Storable
isNull, restoreToNull
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 
Methods inherited from interface org.apache.derby.iapi.services.io.TypedFormat
getTypeFormatId
 

Method Detail

getBoolean

public boolean getBoolean()
Description copied from interface: DataValueDescriptor
Gets the value in the data value descriptor as a boolean. Throws an exception if the data value is not a boolean. For DataValueDescriptor, this is the preferred interface for BIT, but for this no-casting interface, it isn't, because BIT is stored internally as a Bit, not as a Boolean.

Specified by:
getBoolean in interface DataValueDescriptor

and

public BooleanDataValue and(BooleanDataValue otherValue)
The SQL AND operator. This provides SQL semantics for AND with unknown truth values - consult any standard SQL reference for an explanation.


or

public BooleanDataValue or(BooleanDataValue otherValue)
The SQL OR operator. This provides SQL semantics for OR with unknown truth values - consult any standard SQL reference for an explanation.


is

public BooleanDataValue is(BooleanDataValue otherValue)
The SQL IS operator - consult any standard SQL reference for an explanation. Implements the following truth table: otherValue | TRUE | FALSE | UNKNOWN this |---------------------------- | TRUE | TRUE | FALSE | FALSE FALSE | FALSE | TRUE | FALSE UNKNOWN | FALSE | FALSE | TRUE


isNot

public BooleanDataValue isNot(BooleanDataValue otherValue)
Implements NOT IS. This reverses the sense of the is() call.


throwExceptionIfFalse

public BooleanDataValue throwExceptionIfFalse(java.lang.String SQLState,
                                              java.lang.String tableName,
                                              java.lang.String constraintName)
                                       throws org.apache.derby.iapi.error.StandardException
Throw an exception with the given SQLState if this BooleanDataValue is false. This method is useful for evaluating constraints.


setValue

public void setValue(java.lang.Boolean theValue)
Set the value of this BooleanDataValue.


equals

public boolean equals(boolean value)
Tell whether a BooleanDataValue has the given value. This is useful for short-circuiting.