|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> [ types overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.types
Class SQLClob

java.lang.Objectorg.apache.derby.iapi.types.DataType
org.apache.derby.iapi.types.SQLChar
org.apache.derby.iapi.types.SQLVarchar
org.apache.derby.iapi.types.SQLClob
- All Implemented Interfaces:
- CloneableObject, ConcatableDataValue, DataValueDescriptor, java.io.Externalizable, org.apache.derby.iapi.services.io.Formatable, Orderable, java.io.Serializable, org.apache.derby.iapi.services.io.Storable, org.apache.derby.iapi.services.io.StreamStorable, StringDataValue, org.apache.derby.iapi.services.io.TypedFormat, VariableSizeDataValue
- public class SQLClob
- extends SQLVarchar
SQLClob uses SQLVarchar by inheritance. It satisfies the DataValueDescriptor interfaces (i.e., OrderableDataType). It implements a String holder, e.g. for storing a column value; it can be specified when constructed to not allow nulls. Nullability cannot be changed after construction.
Because OrderableDataType is a subclass of DataType, SQLLongvarchar can play a role in either a DataType/ValueRow or a OrderableDataType/KeyRow, interchangeably.
| Field Summary |
| Fields inherited from class org.apache.derby.iapi.types.SQLChar |
arg_passer, RETURN_SPACE_THRESHOLD, stream |
| Fields inherited from interface org.apache.derby.iapi.types.StringDataValue |
BOTH, LEADING, TRAILING |
| 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 |
| Fields inherited from interface org.apache.derby.iapi.types.VariableSizeDataValue |
IGNORE_PRECISION |
| Constructor Summary | |
SQLClob()
|
|
SQLClob(java.lang.String val)
|
|
| Method Summary | |
boolean |
getBoolean()
Gets the value in the data value descriptor as a boolean. |
byte |
getByte()
Gets the value in the data value descriptor as a byte. |
byte[] |
getBytes()
Gets the value in the data value descriptor as a byte array. |
DataValueDescriptor |
getClone()
Clone this DataValueDescriptor. |
java.sql.Date |
getDate(java.util.Calendar cal)
Gets the value in the data value descriptor as a java.sql.Date. |
double |
getDouble()
Gets the value in the data value descriptor as a double. |
float |
getFloat()
Gets the value in the data value descriptor as a float. |
int |
getInt()
Gets the value in the data value descriptor as an int. |
long |
getLong()
Gets the value in the data value descriptor as a long. |
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. |
short |
getShort()
Gets the value in the data value descriptor as a short. |
java.sql.Time |
getTime(java.util.Calendar cal)
Gets the value in the data value descriptor as a java.sql.Time. |
java.sql.Timestamp |
getTimestamp(java.util.Calendar cal)
Gets the value in the data value descriptor as a java.sql.Timestamp. |
int |
getTypeFormatId()
Return my format identifier. |
java.lang.String |
getTypeName()
Get the SQL name of the datatype |
void |
setBigDecimal(java.lang.Number bigDecimal)
Only to be called when an application through JDBC is setting a SQLChar to a java.math.BigDecimal. |
void |
setValue(boolean theValue)
Set the value. |
void |
setValue(byte theValue)
Set the value of this DataValueDescriptor to the given byte value |
void |
setValue(byte[] theValue)
Set the value of this DataValueDescriptor. |
void |
setValue(java.sql.Date theValue,
java.util.Calendar cal)
Set the value of this DataValueDescriptor. |
void |
setValue(double theValue)
Set the value of this DataValueDescriptor to the given double value |
void |
setValue(float theValue)
Set the value of this DataValueDescriptor to the given double value |
void |
setValue(int theValue)
Set the value of this DataValueDescriptor to the given int value |
void |
setValue(long theValue)
Set the value of this DataValueDescriptor to the given long value |
void |
setValue(java.lang.Object theValue)
Set the value of this DataValueDescriptor to the given value |
void |
setValue(short theValue)
Set the value of this DataValueDescriptor to the given short value |
void |
setValue(java.sql.Time theValue,
java.util.Calendar cal)
Set the value of this DataValueDescriptor. |
void |
setValue(java.sql.Timestamp theValue,
java.util.Calendar cal)
Set the value of this DataValueDescriptor. |
int |
typePrecedence()
Each built-in type in JSQL has a precedence. |
int |
typeToBigDecimal()
CHAR/VARCHAR/LONG VARCHAR implementation. |
| Methods inherited from class org.apache.derby.iapi.types.SQLVarchar |
growBy, normalize, normalize |
| Methods inherited from class org.apache.derby.iapi.types.SQLChar |
appendBlanks, charLength, cloneObject, compare, compare, concatenate, copyState, equals, estimateMemoryUsage, getCharArray, getCollationKey, getDate, getDateFormat, getDateFormat, getLength, getLocaleFinder, getNewVarchar, getStream, getString, getTime, getTimeFormat, getTimeFormat, getTimestamp, getTimestampFormat, getTimestampFormat, greaterOrEquals, greaterThan, hashCode, hasNonBlankChars, isNationalString, isNull, lessOrEquals, lessThan, like, like, loadStream, locate, lower, nationalGetDate, nationalGetTime, nationalGetTimestamp, nationalHashCode, notEquals, readExternal, readExternalFromArray, restoreToNull, returnStream, setFrom, setInto, setLocaleFinder, setStream, setValue, setValue, setValueFromResultSet, setWidth, stringCollatorCompare, stringCompare, stringCompare, stringCompare, substring, toString, trim, upper, writeExternal, XMLParse |
| Methods inherited from class org.apache.derby.iapi.types.DataType |
checkHostVariable, coalesce, dataTypeConversion, equals, flip, genericSetObject, getNationalString, in, invalidFormat, isNotNull, isNullOp, outOfRange, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, throwLangSetMismatch, throwLangSetMismatch |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor |
checkHostVariable, coalesce, in, isNotNull, isNullOp, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue |
| Constructor Detail |
SQLClob
public SQLClob()
SQLClob
public SQLClob(java.lang.String val)
| Method Detail |
getTypeName
public java.lang.String getTypeName()
- Description copied from interface:
DataValueDescriptor - Get the SQL name of the datatype
- Specified by:
getTypeNamein interfaceDataValueDescriptor- Overrides:
getTypeNamein classSQLVarchar
getClone
public DataValueDescriptor getClone()
- Description copied from interface:
DataValueDescriptor - Clone this DataValueDescriptor. Results in a new object
that has the same value as this but can be modified independently.
- Specified by:
getClonein interfaceDataValueDescriptor- Overrides:
getClonein classSQLVarchar
getNewNull
public DataValueDescriptor getNewNull()
- Description copied from interface:
DataValueDescriptor - Get a new null value of the same type as this data value.
- Specified by:
getNewNullin interfaceDataValueDescriptor- Overrides:
getNewNullin classSQLVarchar
getTypeFormatId
public int getTypeFormatId()
- Return my format identifier.
- Specified by:
getTypeFormatIdin interfaceorg.apache.derby.iapi.services.io.TypedFormat- Overrides:
getTypeFormatIdin classSQLVarchar
typePrecedence
public int typePrecedence()
- Description copied from interface:
DataValueDescriptor - 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.
- Specified by:
typePrecedencein interfaceDataValueDescriptor- Overrides:
typePrecedencein classSQLVarchar
getObject
public java.lang.Object getObject() throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - 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).
- Specified by:
getObjectin interfaceDataValueDescriptor- Overrides:
getObjectin classSQLChar
getBoolean
public boolean getBoolean()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - 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.
- Specified by:
getBooleanin interfaceDataValueDescriptor- Overrides:
getBooleanin classSQLChar
getByte
public byte getByte()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a byte.
Throws an exception if the data value is not a byte.
- Specified by:
getBytein interfaceDataValueDescriptor- Overrides:
getBytein classSQLChar
getShort
public short getShort()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a short.
Throws an exception if the data value is not a short.
- Specified by:
getShortin interfaceDataValueDescriptor- Overrides:
getShortin classSQLChar
getInt
public int getInt()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as an int.
Throws an exception if the data value is not an int.
- Specified by:
getIntin interfaceDataValueDescriptor- Overrides:
getIntin classSQLChar
getLong
public long getLong()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a long.
Throws an exception if the data value is not a long.
- Specified by:
getLongin interfaceDataValueDescriptor- Overrides:
getLongin classSQLChar
getFloat
public float getFloat()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a float.
Throws an exception if the data value is not a float.
- Specified by:
getFloatin interfaceDataValueDescriptor- Overrides:
getFloatin classSQLChar
getDouble
public double getDouble()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a double.
Throws an exception if the data value is not a double.
- Specified by:
getDoublein interfaceDataValueDescriptor- Overrides:
getDoublein classSQLChar
typeToBigDecimal
public int typeToBigDecimal()
throws org.apache.derby.iapi.error.StandardException
- Description copied from class:
SQLChar - CHAR/VARCHAR/LONG VARCHAR implementation. Convert to a BigDecimal using getString.
- Specified by:
typeToBigDecimalin interfaceDataValueDescriptor- Overrides:
typeToBigDecimalin classSQLChar
getBytes
public byte[] getBytes()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a byte array.
Throws an exception if the data value is not a byte array.
- Specified by:
getBytesin interfaceDataValueDescriptor- Overrides:
getBytesin classDataType
getDate
public java.sql.Date getDate(java.util.Calendar cal) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a java.sql.Date.
Throws an exception if the data value is not a Date.
- Specified by:
getDatein interfaceDataValueDescriptor- Overrides:
getDatein classSQLChar
getTime
public java.sql.Time getTime(java.util.Calendar cal) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a java.sql.Time.
Throws an exception if the data value is not a Time.
- Specified by:
getTimein interfaceDataValueDescriptor- Overrides:
getTimein classSQLChar
getTimestamp
public java.sql.Timestamp getTimestamp(java.util.Calendar cal) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Gets the value in the data value descriptor as a java.sql.Timestamp.
Throws an exception if the data value is not a Timestamp.
- Specified by:
getTimestampin interfaceDataValueDescriptor- Overrides:
getTimestampin classSQLChar
setValue
public void setValue(java.sql.Time theValue, java.util.Calendar cal) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor.
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(java.sql.Timestamp theValue, java.util.Calendar cal) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor.
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(java.sql.Date theValue, java.util.Calendar cal) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor.
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setBigDecimal
public void setBigDecimal(java.lang.Number bigDecimal) throws org.apache.derby.iapi.error.StandardException
- Description copied from class:
SQLChar - Only to be called when an application through JDBC is setting a
SQLChar to a java.math.BigDecimal.
- Specified by:
setBigDecimalin interfaceDataValueDescriptor- Overrides:
setBigDecimalin classSQLChar
setValue
public void setValue(int theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given int value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(double theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given double value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(float theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given double value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(short theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given short value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(long theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given long value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(byte theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given byte value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(boolean theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value.
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(byte[] theValue)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor.
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
setValue
public void setValue(java.lang.Object theValue) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
DataValueDescriptor - Set the value of this DataValueDescriptor to the given value
- Specified by:
setValuein interfaceDataValueDescriptor- Overrides:
setValuein classSQLChar
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> [ types overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC