Because OrderableDataType is a subtype of ValueColumn, SQLSmallint can play a role in either a ValueColumn/Row or a OrderableDataType/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 Short more than it probably wants to.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private boolean | |
| pack-priv static final int | |
| private short |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| private | |
| 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. always false for non-nullable columns |
| 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
is not. right)Overrides org. Implements org. The < operator as called from the language module, as opposed to the storage module. |
| public NumberDataValue | Returns: A SQLSmalllint 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 smallint. |
| 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(smallint, smallint) |
| 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 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(short
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Common code to handle converting a short to this value by using the int to this value conversion. |
| public void | setValue(byte
The value to set this DataValueDescriptor to theValue)Overrides org. Implements org. Common code to handle converting a byte to this value by using the int to this value conversion. |
| 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 SQLSmallint 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 "smallint * smallint". |
| 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. |