|
||||||||||
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
Field Summary | |
private static int |
BASE_MEMORY_USAGE
|
protected RowLocation |
value
|
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 | |
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. |
DataValueDescriptor |
getClone()
Shallow copy. |
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 Java Object. |
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 |
readExternalFromArray(ArrayInputStream in)
Read the DataValueDescriptor from the stream. |
void |
restoreToNull()
Restore this object to its (SQL)null value. |
protected void |
setFrom(DataValueDescriptor theValue)
|
void |
setInto(java.sql.PreparedStatement ps,
int position)
Set this value into a PreparedStatement. |
void |
setValue(java.lang.Object theValue)
Set the value of this DataValueDescriptor to the given value |
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, cloneObject, coalesce, dataTypeConversion, equals, equals, flip, genericSetObject, getBigDecimal, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLong, getNationalString, getShort, getStream, getTime, getTimestamp, greaterOrEquals, greaterThan, in, invalidFormat, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, outOfRange, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, throwLangSetMismatch, throwLangSetMismatch, typePrecedence |
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, coalesce, equals, getBigDecimal, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLong, getShort, getStream, getTime, getTimestamp, greaterOrEquals, greaterThan, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, typePrecedence |
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 DataValueDescriptor
public java.lang.String getString()
DataValueDescriptor
getString
in interface DataValueDescriptor
public java.lang.Object getObject()
DataValueDescriptor
getObject
in interface DataValueDescriptor
getObject
in class DataType
public void setValue(java.lang.Object theValue) throws StandardException
DataValueDescriptor
setValue
in interface DataValueDescriptor
setValue
in class DataType
StandardException
DataValueDescriptor.setValue(java.lang.Object)
protected void setFrom(DataValueDescriptor theValue) throws StandardException
setFrom
in class DataType
StandardException
public int getLength()
DataValueDescriptor
getLength
in interface DataValueDescriptor
public java.lang.String getTypeName()
DataValueDescriptor
getTypeName
in interface DataValueDescriptor
public int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
TypedFormat.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.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.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 readExternalFromArray(ArrayInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
DataValueDescriptor
Initialize the data value by reading it's values from the ArrayInputStream. This interface is provided as a way to achieve possible performance enhancement when reading an array can be optimized over reading from a generic stream from readExternal().
readExternalFromArray
in interface DataValueDescriptor
in
- The array stream positioned at the beginning of the
byte stream to read from.
java.lang.ClassNotFoundException
- If a necessary class can not be
found while reading the object from
the stream.
java.io.IOException
- Usual error is if you try to read
past limit on the stream.public void restoreToNull()
Storable
restoreToNull
in interface Storable
Storable.restoreToNull()
public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException
DataValueDescriptor
compare
in interface DataValueDescriptor
compare
in class DataType
StandardException
- Thrown on errorpublic int compare(DataValueDescriptor other) throws StandardException
DataValueDescriptor
compare
in interface DataValueDescriptor
other
- The Orderable to compare this one to.
StandardException
- Thrown on errorpublic DataValueDescriptor getClone()
DataValueDescriptor
Clone the DataValueDescriptor and copy its contents. We clone the data value wrapper (e.g. SQLDecimal) and reuse its contents (the underlying BigDecimal). The resultant DataValueDescriptor will point to the same value as the original DataValueDescriptor (unless the value is a primitive type, e.g. SQLInteger/integer).
getClone
in interface DataValueDescriptor
DataValueDescriptor.getClone()
public DataValueDescriptor getNewNull()
DataValueDescriptor
getNewNull
in interface DataValueDescriptor
DataValueDescriptor.getNewNull()
public void setValueFromResultSet(java.sql.ResultSet resultSet, int colNumber, boolean isNullable)
DataValueDescriptor
setValueFromResultSet
in interface DataValueDescriptor
resultSet
- 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 DataValueDescriptor
setInto
in class DataType
public void setValue(RowLocation rowLocation)
RefDataValue
setValue
in interface RefDataValue
rowLocation
- Contains the boolean value to set this RefDataValue
to. Null means set this RefDataValue to null.
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |