| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private Object |
| Access | Constructor and Description |
|---|---|
| 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 int | compare(DataValueDescriptor
The Orderable to compare this one to. other)Implements org. Orderable interface |
| 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 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 byte[] | getBytes()
Overrides org. Implements org. Gets the value in the data value descriptor as a byte array. |
| public Date | getDate(Calendar
calendar for object creation cal)Overrides org. Implements org. Gets the value in the data value descriptor as a java.sql.Date. |
| 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 Time | getTime(Calendar
calendar for object creation cal)Overrides org. Implements org. Gets the value in the data value descriptor as a java.sql.Time. |
| public Timestamp | getTimestamp(Calendar
calendar for object creation cal)Overrides org. Implements org. Gets the value in the data value descriptor as a java.sql.Timestamp. |
| public int | getTypeFormatId()
Implements org. Return my format identifier. |
| public String | getTypeName()
Implements org. Get the SQL name of the datatype |
| pack-priv String | getTypeName(String className)
Overrides org. Get the type name of this value, overriding with the passed in class name (for user/java types). |
| public int | |
| public final boolean | Returns: Whether or not value is logically null.Implements org. Check if the value is null. |
| 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. |
| public void | setBigDecimal(BigDecimal
required to be a BigDecimal or null. theValue)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. |
| pack-priv void | setObject(Object theValue)
Overrides org. Set the value from an non-null object. |
| public void | setValue(Object
The value to set this UserDataValue to value)Overrides org. Implements org. Set the value of this UserDataValue to the given Object |
| 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 | 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 String | |
| 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 | |
| value | back to summary |
|---|---|
| private Object value | |
| UserType | back to summary |
|---|---|
| public UserType() no-arg constructor required by Formattable | |
| UserType | back to summary |
|---|---|
| public UserType(Object value) | |
| 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
| |
| compare | back to summary |
|---|---|
| public int compare(DataValueDescriptor other) throws StandardException Implements org. Orderable interface
| |
| compare | back to summary |
|---|---|
| public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException Overrides org. Implements org. Doc from org. Compare this Orderable with a given Orderable for the purpose of qualification and sorting. The caller gets to determine how nulls should be treated - they can either be ordered values or unknown values.
| |
| 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() throws StandardException 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.
| |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() throws StandardException Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a byte array. Throws an exception if the data value is not a byte array.
| |
| getDate | back to summary |
|---|---|
| public Date getDate(Calendar cal) throws StandardException Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a java.sql.Date. Throws an exception if the data value is not a Date.
| |
| getDouble | back to summary |
|---|---|
| public double getDouble() throws StandardException 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() throws StandardException 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() throws StandardException 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() throws StandardException 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.
| |
| getTime | back to summary |
|---|---|
| public Time getTime(Calendar cal) throws StandardException Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a java.sql.Time. Throws an exception if the data value is not a Time.
| |
| getTimestamp | back to summary |
|---|---|
| public Timestamp getTimestamp(Calendar cal) throws StandardException Overrides org. Implements org. Doc from org. Gets the value in the data value descriptor as a java.sql.Timestamp. Throws an exception if the data value is not a Timestamp.
| |
| 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
| |
| getTypeName | back to summary |
|---|---|
| pack-priv String getTypeName(String className) Overrides org. Get the type name of this value, overriding with the passed in class name (for user/java types). | |
| 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
| |
| isNull | back to summary |
|---|---|
| public final boolean isNull() Implements org. Check if the value is null.
| |
| 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 void readExternal(ObjectInput in) throws IOException, ClassNotFoundException 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. | |
| setBigDecimal | back to summary |
|---|---|
| public void setBigDecimal(BigDecimal theValue) Overrides org. Implements org. Doc from org. Set this value from an application supplied java.math.BigDecimal. This is to support the PreparedStatement.setBigDecimal method and similar JDBC methods that allow an application to pass in a BigDecimal to any SQL type.
| |
| 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.
| |
| setObject | back to summary |
|---|---|
| pack-priv void setObject(Object theValue) Overrides org. Doc from org. Set the value from an non-null object. Usually overridden. This implementation throws an exception. The object will have been correctly typed from the call to setObjectForCast. | |
| setValue | back to summary |
|---|---|
| public void setValue(Object value) Overrides org. Implements org. Doc from org. Set the value of this UserDataValue to the given Object
| |
| setValue | back to summary |
|---|---|
| public void setValue(String theValue) Overrides org. Implements org. Doc from org. Set the value of this DataValueDescriptor.
| |
| 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.
| |
| 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-
| |
| 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.
| |