| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| pack-priv static final int | |
| private boolean | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| 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 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 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 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 first operand is greater than or equal to the second 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 first operand is greater than the second 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 | |
| protected boolean | Returns: A boolean. If this.value is negative, return true. For positive values or null, return false.Implements abstract org. This method implements the isNegative method. |
| public boolean | isNull()
Implements org. Return whether the value is null or not. |
| public BooleanDataValue | Returns: A SQL boolean value telling whether the first operand is less than or equal to the second 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 first operand is less than the second 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 NumberDataValue | Returns: A SQLInteger containing the result of the divisionThe result of a previous call to this method, null
if not called yet result)Implements org. This method implements the unary minus operator for int. |
| public NumberDataValue | mod(NumberDataValue
The numerator dividend, NumberDataValue The denominator divisor, NumberDataValue The result of the previous call to this method, null
if not called yet. result)Overrides org. Implements org. mod(int, 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 final 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 void | restoreToNull()
Implements org. Restore this object to its (SQL)null value. |
| 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. |
| public final void | setInto(ResultSet rs, int position)
Overrides org. Implements org. Set this value into a ResultSet for a subsequent ResultSet.insertRow or ResultSet.updateRow. |
| public void | setValue(String
The String value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Set the value of this DataValueDescriptor. |
| 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(boolean
Contains the boolean value to set this to theValue)Overrides org. Implements org. Set the value. |
| 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 NumberDataValue | Returns: A SQLInteger containing the result of the multiplicationThe first value to be multiplied left, NumberDataValue The second value to be multiplied right, NumberDataValue The result of a previous call to this method, null
if not called yet result)Implements org. This method implements the * operator for "int * int". |
| public String | |
| protected int | typeCompare(DataValueDescriptor arg)
Implements abstract org. Compare this (not null) to a non-null value. |
| public int | typePrecedence()
Overrides org. Implements org. Each built-in type in JSQL has a precedence. |
| 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. |
| BASE_MEMORY_USAGE | back to summary |
|---|---|
| private static final int BASE_MEMORY_USAGE | |
| INTEGER_LENGTH | back to summary |
|---|---|
| pack-priv static final int INTEGER_LENGTH | |
| isnull | back to summary |
|---|---|
| private boolean isnull | |
| value | back to summary |
|---|---|
| private int value | |
| SQLInteger | back to summary |
|---|---|
| public SQLInteger() no-arg constructor, required by Formattable | |
| SQLInteger | back to summary |
|---|---|
| public SQLInteger(int val) | |
| SQLInteger | back to summary |
|---|---|
| public SQLInteger(char val) | |
| SQLInteger | back to summary |
|---|---|
| public SQLInteger(Integer obj) | |
| cloneValue | back to summary |
|---|---|
| public DataValueDescriptor cloneValue(boolean forceMaterialization) Implements org. Doc from org. Clone this DataValueDescriptor. Results in a new object that has the same value as this but can be modified independently.
Even though the objects can be modified independently regardless of the
value of
| |
| equals | back to summary |
|---|---|
| public BooleanDataValue equals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException Overrides org. Implements org. The = operator as called from the language module, as opposed to the storage module.
| |
| estimateMemoryUsage | back to summary |
|---|---|
| public int estimateMemoryUsage() Implements org. Doc from org. Estimate the memory usage in bytes of the data value and the overhead of the class.
| |
| getBoolean | back to summary |
|---|---|
| public boolean getBoolean() Overrides org. Implements org. Doc from org. 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.
| |
| getByte | back to summary |
|---|---|
| public byte getByte() throws StandardException Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a byte. Throws an exception if the data value is not a byte.
| |
| getDouble | back to summary |
|---|---|
| public double getDouble() Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a double. Throws an exception if the data value is not a double.
| |
| getFloat | back to summary |
|---|---|
| public float getFloat() Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a float. Throws an exception if the data value is not a float.
| |
| getInt | back to summary |
|---|---|
| public int getInt() Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as an int. Throws an exception if the data value is not an int.
| |
| getLength | back to summary |
|---|---|
| public int getLength() Implements org. Doc from org. Gets the length of the data value. The meaning of this is implementation-dependent. For string types, it is the number of characters in the string. For numeric types, it is the number of bytes used to store the number. This is the actual length of this value, not the length of the type it was defined as. For example, a VARCHAR value may be shorter than the declared VARCHAR (maximum) length.
| |
| getLong | back to summary |
|---|---|
| public long getLong() Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a long. Throws an exception if the data value is not a long.
| |
| getNewNull | back to summary |
|---|---|
| public DataValueDescriptor getNewNull() Implements org. Doc from org. Get a new null value of the same type as this data value.
| |
| getObject | back to summary |
|---|---|
| public Object getObject() Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a Java Object. The type of the Object will be the Java object type corresponding to the data value's SQL type. JDBC defines a mapping between Java object types and SQL types - we will allow that to be extended through user type definitions. Throws an exception if the data value is not an object (yeah, right).
| |
| getShort | back to summary |
|---|---|
| public short getShort() throws StandardException Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a short. Throws an exception if the data value is not a short.
| |
| getString | back to summary |
|---|---|
| public String getString() Implements org. Doc from org. Gets the value in the data value descriptor as a String. Throws an exception if the data value is not a string.
| |
| getTypeFormatId | back to summary |
|---|---|
| public int getTypeFormatId() Implements org. Return my format identifier.
| |
| getTypeName | back to summary |
|---|---|
| public String getTypeName() Implements org. Doc from org. Get the SQL name of the datatype
| |
| greaterOrEquals | back to summary |
|---|---|
| public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException Overrides org. Implements org. The >= operator as called from the language module, as opposed to the storage module.
| |
| greaterThan | back to summary |
|---|---|
| public BooleanDataValue greaterThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException Overrides org. Implements org. The > operator as called from the language module, as opposed to the storage module.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isNegative | back to summary |
|---|---|
| protected boolean isNegative() Implements abstract org. This method implements the isNegative method.
| |
| isNull | back to summary |
|---|---|
| public boolean isNull() Implements org. Doc from org. Return whether the value is null or not.
| |
| lessOrEquals | back to summary |
|---|---|
| public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException Overrides org. Implements org. The <= operator as called from the language module, as opposed to the storage module.
| |
| lessThan | back to summary |
|---|---|
| public BooleanDataValue lessThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException Overrides org. Implements org. The < operator as called from the language module, as opposed to the storage module.
| |
| minus | back to summary |
|---|---|
| public NumberDataValue minus(NumberDataValue result) throws StandardException Implements org. This method implements the unary minus operator for int.
| |
| mod | back to summary |
|---|---|
| public NumberDataValue mod(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result) throws StandardException Overrides org. Implements org. mod(int, int)
| |
| notEquals | back to summary |
|---|---|
| public BooleanDataValue notEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException Overrides org. Implements org. The <> operator as called from the language module, as opposed to the storage module.
| |
| readExternal | back to summary |
|---|---|
| public final void readExternal(ObjectInput in) throws IOException Implements java. Doc from 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. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| restoreToNull | back to summary |
|---|---|
| public void restoreToNull() Implements org. Doc from org. Restore this object to its (SQL)null value.
| |
| setFrom | back to summary |
|---|---|
| protected void setFrom(DataValueDescriptor theValue) throws StandardException Overrides org. Doc from org. Set the value of this DataValueDescriptor based on the value of the specified DataValueDescriptor.
| |
| setInto | back to summary |
|---|---|
| public final void setInto(PreparedStatement ps, int position) throws SQLException Overrides org. Implements org. Set the value into a PreparedStatement.
| |
| setInto | back to summary |
|---|---|
| public final void setInto(ResultSet rs, int position) throws SQLException Overrides org. Implements org. Set this value into a ResultSet for a subsequent ResultSet.insertRow or ResultSet.updateRow. This method will only be called for non-null values.
| |
| setValue | back to summary |
|---|---|
| public void setValue(String theValue) throws StandardException Overrides org. Implements org. Doc from org. Set the value of this DataValueDescriptor.
| |
| setValue | back to summary |
|---|---|
| public void setValue(int theValue) Overrides org. Implements org. Doc from org. Set the value of this DataValueDescriptor to the given int value
| |
| setValue | back to summary |
|---|---|
| public void setValue(long theValue) throws StandardException Overrides org. Implements org. Doc from org. Set the value of this DataValueDescriptor to the given long value
| |
| setValue | back to summary |
|---|---|
| public void setValue(float theValue) throws StandardException Overrides org. Implements org. Doc from org. Set the value of this DataValueDescriptor to the given double value
| |
| setValue | back to summary |
|---|---|
| public void setValue(double theValue) throws StandardException Overrides org. Implements org. Doc from org. Set the value of this DataValueDescriptor to the given double value
| |
| setValue | back to summary |
|---|---|
| public void setValue(boolean theValue) Overrides org. Implements org. Doc from org. Set the value.
| |
| setValueFromResultSet | back to summary |
|---|---|
| public void setValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable) throws SQLException Implements org. Doc from org. Set the value based on the value for the specified DataValueDescriptor from the specified ResultSet.
| |
| times | back to summary |
|---|---|
| public NumberDataValue times(NumberDataValue left, NumberDataValue right, NumberDataValue result) throws StandardException Implements org. This method implements the * operator for "int * int".
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| typeCompare | back to summary |
|---|---|
| protected int typeCompare(DataValueDescriptor arg) throws StandardException Implements abstract org. Doc from org. Compare this (not null) to a non-null value.
| |
| typePrecedence | back to summary |
|---|---|
| public int typePrecedence() Overrides org. Implements org. Doc from org. Each built-in type in JSQL has a precedence. This precedence determines how to do type promotion when using binary operators. For example, float has a higher precedence than int, so when adding an int to a float, the result type is float. The precedence for some types is arbitrary. For example, it doesn't matter what the precedence of the boolean type is, since it can't be mixed with other types. But the precedence for the number types is critical. The SQL standard requires that exact numeric types be promoted to approximate numeric when one operator uses both. Also, the precedence is arranged so that one will not lose precision when promoting a type.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Implements java. Doc from 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.
| |