Top Fields Methods
org.apache.derby.iapi.types

public Interface BooleanDataValue

extends DataValueDescriptor
Known Direct Implementers
org.apache.derby.iapi.types.SQLBoolean
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.Activation

Field Summary

Inherited from org.apache.derby.iapi.types.DataValueDescriptor:
UNKNOWN_LOGICAL_LENGTH

Method Summary

Modifier and TypeMethod and Description
public BooleanDataValue

Returns:

this AND otherValue
and
(BooleanDataValue
The other BooleanDataValue to AND with this one
otherValue
)

The SQL AND operator.

public boolean

Returns:

true if the BooleanDataValue contains the given value.
equals
(boolean
The value to look for
value
)

Tell whether a BooleanDataValue has the given value.

public boolean
getBoolean()

Redeclares org.apache.derby.iapi.types.DataValueDescriptor.getBoolean.

Gets the value in the data value descriptor as a boolean.

public BooleanDataValue

Returns:

An immutable BooleanDataValue with the same value as this.
getImmutable
()

Return an immutable BooleanDataValue with the same value as this.

public BooleanDataValue

Returns:

whether this IS otherValue
is
(BooleanDataValue
BooleanDataValue to compare to. May be TRUE, FALSE, or UNKNOWN.
otherValue
)

The SQL IS operator - consult any standard SQL reference for an explanation.

public BooleanDataValue

Returns:

NOT( this IS otherValue )
isNot
(BooleanDataValue
BooleanDataValue to compare to. May be TRUE, FALSE, or UNKNOWN.
otherValue
)

Implements NOT IS.

public BooleanDataValue

Returns:

this OR otherValue
or
(BooleanDataValue
The other BooleanDataValue to OR with this one
otherValue
)

The SQL OR operator.

public void
setValue(Boolean
Contains the boolean value to set this BooleanDataValue to. Null means set this BooleanDataValue to null.
theValue
)

Set the value of this BooleanDataValue.

public BooleanDataValue

Returns:

this
throwExceptionIfFalse
(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
)

Throw an exception with the given SQLState if this BooleanDataValue is false.

public BooleanDataValue

Returns:

this
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
)

If this value is false and we have a deferred constraint, remember the violation and proceed, else throw.

Inherited from org.apache.derby.iapi.types.DataValueDescriptor:
checkHostVariablecloneHoldercloneValuecoalescecomparecomparecomparecompareequalsestimateMemoryUsagegetBytegetBytesgetDategetDoublegetFloatgetIntgetLengthgetLonggetNewNullgetObjectgetShortgetStreamgetStringgetTimegetTimestampgetTraceStringgetTypeNamegreaterOrEqualsgreaterThanhasStreaminisNotNullisNullOplessOrEqualslessThannormalizenotEqualsreadExternalFromArrayrecyclesetBigDecimalsetIntosetIntosetObjectForCastsetToNullsetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValuesetValueFromResultSettypePrecedencetypeToBigDecimal

Method Detail

andback to summary
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.

Parameters
otherValue:BooleanDataValue

The other BooleanDataValue to AND with this one

Returns:BooleanDataValue

this AND otherValue

equalsback to summary
public boolean equals(boolean value)

Tell whether a BooleanDataValue has the given value. This is useful for short-circuiting.

Parameters
value:boolean

The value to look for

Returns:boolean

true if the BooleanDataValue contains the given value.

getBooleanback to summary
public boolean getBoolean()

Redeclares org.apache.derby.iapi.types.DataValueDescriptor.getBoolean.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.getBoolean.

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.

Returns:boolean

The data value as a boolean.

getImmutableback to summary
public BooleanDataValue getImmutable()

Return an immutable BooleanDataValue with the same value as this.

Returns:BooleanDataValue

An immutable BooleanDataValue with the same value as this.

isback to summary
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

Parameters
otherValue:BooleanDataValue

BooleanDataValue to compare to. May be TRUE, FALSE, or UNKNOWN.

Returns:BooleanDataValue

whether this IS otherValue

isNotback to summary
public BooleanDataValue isNot(BooleanDataValue otherValue)

Implements NOT IS. This reverses the sense of the is() call.

Parameters
otherValue:BooleanDataValue

BooleanDataValue to compare to. May be TRUE, FALSE, or UNKNOWN.

Returns:BooleanDataValue

NOT( this IS otherValue )

orback to summary
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.

Parameters
otherValue:BooleanDataValue

The other BooleanDataValue to OR with this one

Returns:BooleanDataValue

this OR otherValue

setValueback to summary
public void setValue(Boolean theValue)

Set the value of this BooleanDataValue.

Parameters
theValue:Boolean

Contains the boolean value to set this BooleanDataValue to. Null means set this BooleanDataValue to null.

throwExceptionIfFalseback to summary
public BooleanDataValue throwExceptionIfFalse(String SQLState, String tableName, String constraintName) throws StandardException

Throw an exception with the given SQLState if this BooleanDataValue is false. This method is useful for evaluating constraints.

Parameters
SQLState:String

The SQLState of the exception to throw if this SQLBoolean is false.

tableName:String

The name of the table to include in the exception message.

constraintName:String

The name of the failed constraint to include in the exception message.

Returns:BooleanDataValue

this

Exceptions
StandardException:
Thrown if this BooleanDataValue is false.
throwExceptionIfImmediateAndFalseback to summary
public BooleanDataValue throwExceptionIfImmediateAndFalse(String SQLState, String tableName, String constraintName, Activation a, int savedUUIDIdx) throws StandardException

If this value is false and we have a deferred constraint, remember the violation and proceed, else throw. See also org.apache.derby.impl.sql.compile.AndNoShortCircuitNode.

Parameters
SQLState:String

The SQLState of the exception to throw if this SQLBoolean is false.

tableName:String

The name of the table to include in the exception message.

constraintName:String

The name of the failed constraint to include in the exception message.

a:Activation

The activation

savedUUIDIdx:int

The saved object number of the constraint's UUID.

Returns:BooleanDataValue

this

Exceptions
StandardException:
Thrown if this BooleanDataValue is false.