|
|||||||||
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.SQLChar
org.apache.derby.iapi.types.SQLVarchar
org.apache.derby.iapi.types.SQLLongvarchar
org.apache.derby.iapi.types.CollatorSQLLongvarchar
class CollatorSQLLongvarchar
CollatorSQLLongvarchar class differs from SQLLongvarchar based on how the 2 classes use different collations to collate their data. SQLLongvarchar uses Derby's default collation which is UCS_BASIC. Whereas, this class uses the RuleBasedCollator object that was passed to it in it's constructor and that RuleBasedCollator object decides the collation. In Derby 10.3, this class will be passed a RuleBasedCollator which is based on the database's territory. In future releases of Derby, this class can be used to do other kinds of collations like case-insensitive collation etc by just passing an appropriate RuleBasedCollator object for that kind of collation.
Field Summary | |
---|---|
private WorkHorseForCollatorDatatypes |
holderForCollationSensitiveInfo
|
Fields inherited from class org.apache.derby.iapi.types.SQLChar |
---|
_clobValue, arg_passer, CHAR_HEADER_GENERATOR, RETURN_SPACE_THRESHOLD, stream |
Fields inherited from interface org.apache.derby.iapi.types.StringDataValue |
---|
BOTH, COLLATION_DERIVATION_EXPLICIT, COLLATION_DERIVATION_IMPLICIT, COLLATION_DERIVATION_NONE, COLLATION_TYPE_TERRITORY_BASED, COLLATION_TYPE_TERRITORY_BASED_IDENTICAL, COLLATION_TYPE_TERRITORY_BASED_PRIMARY, COLLATION_TYPE_TERRITORY_BASED_SECONDARY, COLLATION_TYPE_TERRITORY_BASED_TERTIARY, COLLATION_TYPE_UCS_BASIC, LEADING, TRAILING |
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 |
Fields inherited from interface org.apache.derby.iapi.types.VariableSizeDataValue |
---|
IGNORE_PRECISION |
Constructor Summary | |
---|---|
CollatorSQLLongvarchar(java.text.RuleBasedCollator collatorForCharacterDatatypes)
Create SQL LONG VARCHAR value initially set to NULL that performs collation according to collatorForCharacterDatatypes |
|
CollatorSQLLongvarchar(java.lang.String val,
java.text.RuleBasedCollator collatorForCharacterDatatypes)
Create SQL LONG VARCHAR value initially set to value that performs collation according to collatorForCharacterDatatypes |
Method Summary | |
---|---|
DataValueDescriptor |
cloneValue(boolean forceMaterialization)
Clone this DataValueDescriptor. |
int[] |
getCollationElementsForString()
This method translates the string into a series of collation elements. |
protected java.text.RuleBasedCollator |
getCollatorForCollation()
Get the RuleBasedCollator for this instance of CollatorSQLLongvarchar. |
int |
getCountOfCollationElements()
This method returns the count of collation elements for this instance of CollationElementsInterface. |
DataValueDescriptor |
getNewNull()
Get a new null value of the same type as this data value. |
StringDataValue |
getValue(java.text.RuleBasedCollator collatorForComparison)
We do not anticipate this method on collation sensitive DVD to be ever called in Derby 10.3 In future, when Derby will start supporting SQL standard COLLATE clause, this method might get called on the collation sensitive DVDs. |
int |
hashCode()
Return a hash code that is consistent with stringCompare(SQLChar, SQLChar) . |
BooleanDataValue |
like(DataValueDescriptor pattern)
This method implements the like function for char (with no escape value). |
BooleanDataValue |
like(DataValueDescriptor pattern,
DataValueDescriptor escape)
This method implements the like function for char with an escape value. |
protected void |
setCollator(java.text.RuleBasedCollator collatorForCharacterDatatypes)
Set the RuleBasedCollator for this instance of CollatorSQLLongvarchar. |
protected int |
stringCompare(SQLChar char1,
SQLChar char2)
Compare two SQLChars. |
Methods inherited from class org.apache.derby.iapi.types.SQLLongvarchar |
---|
concatenate, getTypeFormatId, getTypeName, normalize, typePrecedence |
Methods inherited from class org.apache.derby.iapi.types.SQLVarchar |
---|
growBy, normalize |
Methods inherited from class org.apache.derby.iapi.types.DataType |
---|
checkHostVariable, coalesce, compare, compare, compareTo, dataTypeConversion, equals, flip, genericSetObject, getBytes, getNationalString, getTypeName, hasStream, in, invalidFormat, isNotNull, isNullOp, outOfRange, recycle, setInto, setObject, setToNull, setValue, 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, compare, compare, getBytes, hasStream, in, isNotNull, isNullOp, recycle, setInto, setToNull, setValue, setValue, setValue, setValue, setValue |
Field Detail |
---|
private WorkHorseForCollatorDatatypes holderForCollationSensitiveInfo
Constructor Detail |
---|
CollatorSQLLongvarchar(java.text.RuleBasedCollator collatorForCharacterDatatypes)
CollatorSQLLongvarchar(java.lang.String val, java.text.RuleBasedCollator collatorForCharacterDatatypes)
Method Detail |
---|
protected void setCollator(java.text.RuleBasedCollator collatorForCharacterDatatypes)
protected java.text.RuleBasedCollator getCollatorForCollation() throws StandardException
getCollatorForCollation
in class SQLChar
StandardException
public int[] getCollationElementsForString() throws StandardException
CollationElementsInterface
getCollationElementsForString
in interface CollationElementsInterface
StandardException
CollationElementsInterface.getCollationElementsForString()
public int getCountOfCollationElements()
CollationElementsInterface
getCountOfCollationElements
in interface CollationElementsInterface
CollationElementsInterface.getCountOfCollationElements()
public 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 DataValueDescriptor
cloneValue
in class SQLLongvarchar
forceMaterialization
- 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 DataValueDescriptor
getNewNull
in class SQLLongvarchar
DataValueDescriptor.getNewNull()
public StringDataValue getValue(java.text.RuleBasedCollator collatorForComparison)
getValue
in interface StringDataValue
getValue
in class SQLLongvarchar
StringDataValue.getValue(RuleBasedCollator)
protected int stringCompare(SQLChar char1, SQLChar char2) throws StandardException
SQLChar
stringCompare
in class SQLChar
StandardException
- Thrown on errorSQLChar.stringCompare(SQLChar, SQLChar)
public int hashCode()
stringCompare(SQLChar, SQLChar)
.
hashCode
in class SQLChar
public BooleanDataValue like(DataValueDescriptor pattern) throws StandardException
like
in interface StringDataValue
like
in class SQLChar
pattern
- The pattern to use
StandardException
- Thrown on errorpublic BooleanDataValue like(DataValueDescriptor pattern, DataValueDescriptor escape) throws StandardException
like
in interface StringDataValue
like
in class SQLChar
pattern
- The pattern to useescape
- the escape character
StandardException
- Thrown on error
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |