|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.iapi.types.DataType
org.apache.derby.iapi.types.SQLRef
public class SQLRef
| Field Summary | |
|---|---|
private static int |
BASE_MEMORY_USAGE
|
protected RowLocation |
value
|
| Fields inherited from interface org.apache.derby.iapi.types.DataValueDescriptor |
|---|
UNKNOWN_LOGICAL_LENGTH |
| 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 |
| Constructor Summary | |
|---|---|
SQLRef()
|
|
SQLRef(RowLocation rowLocation)
|
|
| Method Summary | |
|---|---|
DataValueDescriptor |
cloneValue(boolean forceMaterialization)
Clone this DataValueDescriptor. |
int |
compare(DataValueDescriptor other)
Compare this Orderable with a given Orderable for the purpose of index positioning. |
boolean |
compare(int op,
DataValueDescriptor other,
boolean orderedNulls,
boolean unknownRV)
Compare this Orderable with a given Orderable for the purpose of qualification and sorting. |
int |
estimateMemoryUsage()
Estimate the memory usage in bytes of the data value and the overhead of the class. |
int |
getLength()
Gets the length of the data value. |
DataValueDescriptor |
getNewNull()
Get a new null value of the same type as this data value. |
java.lang.Object |
getObject()
Gets the value in the data value descriptor as a int. |
java.lang.String |
getString()
Gets the value in the data value descriptor as a String. |
int |
getTypeFormatId()
Return my format identifier. |
java.lang.String |
getTypeName()
Get the SQL name of the datatype |
boolean |
isNull()
Return whether the value is null or not. |
void |
readExternal(java.io.ObjectInput in)
|
void |
restoreToNull()
Restore this object to its (SQL)null value. |
protected void |
setFrom(DataValueDescriptor theValue)
Set the value of this DataValueDescriptor based on the value of the specified DataValueDescriptor. |
void |
setInto(java.sql.PreparedStatement ps,
int position)
Set this value into a PreparedStatement. |
void |
setValue(RowLocation rowLocation)
Set the value of this RefDataValue. |
void |
setValueFromResultSet(java.sql.ResultSet resultSet,
int colNumber,
boolean isNullable)
Set the value based on the value for the specified DataValueDescriptor from the specified ResultSet. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class org.apache.derby.iapi.types.DataType |
|---|
checkHostVariable, cloneHolder, coalesce, compare, compare, compareTo, dataTypeConversion, equals, equals, flip, genericSetObject, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLong, getShort, getStream, getTime, getTimestamp, getTraceString, getTypeName, greaterOrEquals, greaterThan, hasStream, in, invalidFormat, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, outOfRange, readExternalFromArray, recycle, setBigDecimal, setInto, setObject, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, throwLangSetMismatch, throwLangSetMismatch, typePrecedence, typeToBigDecimal |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor |
|---|
checkHostVariable, cloneHolder, coalesce, compare, compare, equals, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLong, getShort, getStream, getTime, getTimestamp, getTraceString, greaterOrEquals, greaterThan, hasStream, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, readExternalFromArray, recycle, setBigDecimal, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, typePrecedence, typeToBigDecimal |
| Field Detail |
|---|
protected RowLocation value
private static final int BASE_MEMORY_USAGE
| Constructor Detail |
|---|
public SQLRef()
public SQLRef(RowLocation rowLocation)
| Method Detail |
|---|
public int estimateMemoryUsage()
DataValueDescriptor
estimateMemoryUsage in interface DataValueDescriptorpublic java.lang.String getString()
DataValueDescriptor
getString in interface DataValueDescriptorpublic java.lang.Object getObject()
DataType
getObject in interface DataValueDescriptorgetObject in class DataType
protected void setFrom(DataValueDescriptor theValue)
throws StandardException
DataType
setFrom in class DataTypetheValue - The DataValueDescriptor that holds the value to
which we want to set this DataValueDescriptor's value.
StandardExceptionpublic int getLength()
DataValueDescriptor
getLength in interface DataValueDescriptorpublic java.lang.String getTypeName()
DataValueDescriptor
getTypeName in interface DataValueDescriptorpublic int getTypeFormatId()
getTypeFormatId in interface TypedFormatTypedFormat.getTypeFormatId()public boolean isNull()
Storable
isNull in interface Storable
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException - Thrown on error reading the object
java.lang.ClassNotFoundException - Thrown if the class of the object
read from the stream can't be found
(not likely, since it's supposed to
be SQLRef).Externalizable.readExternal(java.io.ObjectInput)public void restoreToNull()
Storable
restoreToNull in interface StorableStorable.restoreToNull()
public boolean compare(int op,
DataValueDescriptor other,
boolean orderedNulls,
boolean unknownRV)
throws StandardException
DataValueDescriptor
compare in interface DataValueDescriptorcompare in class DataTypeop - Orderable.ORDER_OP_EQUALS means do an = comparison.
Orderable.ORDER_OP_LESSTHAN means compare this < other.
Orderable.ORDER_OP_LESSOREQUALS means compare this <= other.other - The DataValueDescriptor to compare this one to.orderedNulls - 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.unknownRV - 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.
StandardException - Thrown on error
public int compare(DataValueDescriptor other)
throws StandardException
DataValueDescriptor
compare in interface DataValueDescriptorother - The Orderable to compare this one to.
StandardException - Thrown on errorpublic DataValueDescriptor cloneValue(boolean forceMaterialization)
DataValueDescriptor
Even though the objects can be modified independently regardless of the
value of forceMaterialization, both the clone and the
original may be dependent on the store state if
forceMaterialization is set to false. An example is if
you need to access the value you just read using cloneValue
after the current transaction has ended, or after the source result set
has been closed.
cloneValue in interface DataValueDescriptorforceMaterialization - any streams representing the data value will
be materialized if true, the data value will be kept as a
stream if possible if false
DataValueDescriptor with the same initial
value as this.DataValueDescriptor.cloneValue(boolean)public DataValueDescriptor getNewNull()
DataValueDescriptor
getNewNull in interface DataValueDescriptorDataValueDescriptor.getNewNull()
public void setValueFromResultSet(java.sql.ResultSet resultSet,
int colNumber,
boolean isNullable)
DataValueDescriptor
setValueFromResultSet in interface DataValueDescriptorresultSet - The specified ResultSet.colNumber - The 1-based column # into the resultSet.isNullable - Whether or not the column is nullable
(No need to call wasNull() if not)DataValueDescriptor.setValueFromResultSet(java.sql.ResultSet, int, boolean)
public void setInto(java.sql.PreparedStatement ps,
int position)
DataValueDescriptor
setInto in interface DataValueDescriptorsetInto in class DataTypepublic void setValue(RowLocation rowLocation)
RefDataValue
setValue in interface RefDataValuerowLocation - Contains the boolean value to set this RefDataValue
to. Null means set this RefDataValue to null.public java.lang.String toString()
toString in class java.lang.Object
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||