|
|||||||||
| 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 SQLNClob

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.SQLNationalVarchar
org.apache.derby.iapi.types.SQLNClob
- 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 SQLNClob
- extends SQLNationalVarchar
SQLNClob 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.
----- TODO: fix for NCLOB Because OrderableDataType is a subclass of DataType, SQLNationalLongvarchar can play a role in either a DataType/ValueRow or a OrderableDataType/KeyRow, interchangeably. ----- TODO: fix for NCLOB SQLNationalLongvarchar is mostly the same as SQLLongvarchar, so it is implemented as a subclass of SQLLongvarchar. Only those methods with different behavior are implemented here.
| 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 | |
SQLNClob()
|
|
SQLNClob(java.lang.String val,
org.apache.derby.iapi.services.i18n.LocaleFinder localeFinder)
|
|
| Method Summary | |
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. |
DataValueDescriptor |
getNewNull()
Get a new null value of the same type as this data value. |
protected StringDataValue |
getNewVarchar()
Get a SQLVarchar for a built-in string function. |
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 |
int |
hashCode()
Get a value that represents this Object, as uniquely as possible within the confines of an int. |
protected boolean |
isNationalString()
Return whether or not this is a national character datatype. |
protected void |
setFrom(DataValueDescriptor theValue)
|
void |
setValue(java.sql.Date theValue,
java.util.Calendar cal)
Set the value of this DataValueDescriptor. |
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. |
protected int |
stringCompare(SQLChar char1,
SQLChar char2)
---- TODO: Disable? Compare two SQLChars. |
int |
typePrecedence()
Each built-in type in JSQL has a precedence. |
| Methods inherited from class org.apache.derby.iapi.types.SQLNationalVarchar |
normalize |
| Methods inherited from class org.apache.derby.iapi.types.SQLVarchar |
growBy, normalize |
| Methods inherited from class org.apache.derby.iapi.types.DataType |
checkHostVariable, coalesce, dataTypeConversion, equals, flip, genericSetObject, getBytes, 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, getBytes, in, isNotNull, isNullOp, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue |
| Constructor Detail |
SQLNClob
public SQLNClob()
SQLNClob
public SQLNClob(java.lang.String val, org.apache.derby.iapi.services.i18n.LocaleFinder localeFinder)
| 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 classSQLNationalVarchar
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 classSQLNationalVarchar
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 classSQLNationalVarchar
getTypeFormatId
public int getTypeFormatId()
- Return my format identifier.
- Specified by:
getTypeFormatIdin interfaceorg.apache.derby.iapi.services.io.TypedFormat- Overrides:
getTypeFormatIdin classSQLNationalVarchar
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 classSQLNationalVarchar
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 classSQLNationalVarchar
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 classSQLNationalVarchar
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 classSQLNationalVarchar
stringCompare
protected int stringCompare(SQLChar char1, SQLChar char2) throws org.apache.derby.iapi.error.StandardException
- ---- TODO: Disable?
Compare two SQLChars. This method will be overriden in the
National char wrappers so that the appropriate comparison
is done.
- Overrides:
stringComparein classSQLNationalVarchar
getNewVarchar
protected StringDataValue getNewVarchar()
- Get a SQLVarchar for a built-in string function.
(Could be either a SQLVarchar or SQLNationalVarchar.)
- Overrides:
getNewVarcharin classSQLNationalVarchar
isNationalString
protected boolean isNationalString()
- Return whether or not this is a national character datatype.
- Overrides:
isNationalStringin classSQLNationalVarchar
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 classSQLNationalVarchar
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 classSQLNationalVarchar
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 classSQLNationalVarchar
setFrom
protected void setFrom(DataValueDescriptor theValue) throws org.apache.derby.iapi.error.StandardException
- Overrides:
setFromin classSQLNationalVarchar
hashCode
public int hashCode()
- Description copied from class:
java.lang.Object - Get a value that represents this Object, as uniquely as
possible within the confines of an int.
There are some requirements on this method which subclasses must follow:
- Semantic equality implies identical hashcodes. In other
words, if
a.equals(b)is true, thena.hashCode() == b.hashCode()must be as well. However, the reverse is not necessarily true, and two objects may have the same hashcode without being equal. - It must be consistent. Whichever value o.hashCode() returns on the first invocation must be the value returned on all later invocations as long as the object exists. Notice, however, that the result of hashCode may change between separate executions of a Virtual Machine, because it is not invoked on the same object.
Notice that since
hashCodeis used in java.util.Hashtable and other hashing classes, a poor implementation will degrade the performance of hashing (so don't blindly implement it as returning a constant!). Also, if calculating the hash is time-consuming, a class may consider caching the results.The default implementation returns
System.identityHashCode(this)- Overrides:
hashCodein classSQLNationalVarchar
- Semantic equality implies identical hashcodes. In other
words, if
|
|||||||||
| 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