class CollatorSQLVarchar extends SQLVarchar implements CollationElementsInterface
Modifier and Type | Field and Description |
---|---|
private WorkHorseForCollatorDatatypes |
holderForCollationSensitiveInfo |
_clobValue, arg_passer, CHAR_HEADER_GENERATOR, RETURN_SPACE_THRESHOLD, stream
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
UNKNOWN_LOGICAL_LENGTH
ORDER_OP_EQUALS, ORDER_OP_GREATEROREQUALS, ORDER_OP_GREATERTHAN, ORDER_OP_LESSOREQUALS, ORDER_OP_LESSTHAN
IGNORE_PRECISION
Constructor and Description |
---|
CollatorSQLVarchar(java.text.RuleBasedCollator collatorForCharacterDatatypes)
Create SQL VARCHAR value initially set to NULL that
performs collation according to collatorForCharacterDatatypes
|
CollatorSQLVarchar(java.lang.String val,
java.text.RuleBasedCollator collatorForCharacterDatatypes)
Create SQL VARCHAR value initially set to value that
performs collation according to collatorForCharacterDatatypes
|
Modifier and Type | Method and Description |
---|---|
DataValueDescriptor |
cloneValue(boolean forceMaterialization)
Clone this DataValueDescriptor.
|
protected java.text.RuleBasedCollator |
getCollatorForCollation()
Get the RuleBasedCollator for this instance of CollatorSQLVarchar.
|
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.
|
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) . |
boolean |
hasSingleCollationElement()
Check if this instance represents a value that has a single
collation element.
|
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.
|
private void |
setCollator(java.text.RuleBasedCollator collatorForCharacterDatatypes)
Set the RuleBasedCollator for this instance of CollatorSQLVarchar.
|
protected int |
stringCompare(SQLChar char1,
SQLChar char2)
Compare two SQLChars.
|
getTypeFormatId, getTypeName, growBy, normalize, normalize, typePrecedence
ansiTrim, charLength, cloneHolder, compare, compare, concatenate, copyState, equals, estimateMemoryUsage, getBoolean, getByte, getCharArray, getCollationKey, getDate, getDate, getDouble, getFloat, getInt, getLength, getLocaleFinder, getLong, getObject, getRawDataAndZeroIt, getShort, getStream, getStreamHeaderGenerator, getStreamWithDescriptor, getString, getTime, getTime, getTimestamp, getTimestamp, getTraceString, greaterOrEquals, greaterThan, hashCodeForCollation, hasNonBlankChars, isNull, lessOrEquals, lessThan, loadStream, locate, lower, notEquals, readExternal, readExternal, readExternalClobFromArray, readExternalFromArray, restoreToNull, returnStream, setBigDecimal, setFrom, setInto, setLocaleFinder, setObjectForCast, setStream, setStreamHeaderFormat, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromResultSet, setWidth, stringCompare, stringCompare, substring, throwStreamingIOException, toString, typeToBigDecimal, upper, writeClobUTF, writeExternal, zeroRawData
checkHostVariable, coalesce, compare, compare, compareTo, dataTypeConversion, equals, flip, genericSetObject, getBytes, getTypeName, hasStream, in, invalidFormat, isNotNull, isNullOp, outOfRange, recycle, setInto, setObject, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, throwLangSetMismatch, throwLangSetMismatch
private WorkHorseForCollatorDatatypes holderForCollationSensitiveInfo
CollatorSQLVarchar(java.text.RuleBasedCollator collatorForCharacterDatatypes)
CollatorSQLVarchar(java.lang.String val, java.text.RuleBasedCollator collatorForCharacterDatatypes)
private void setCollator(java.text.RuleBasedCollator collatorForCharacterDatatypes)
protected java.text.RuleBasedCollator getCollatorForCollation() throws StandardException
getCollatorForCollation
in class SQLChar
StandardException
public boolean hasSingleCollationElement() throws StandardException
CollationElementsInterface
hasSingleCollationElement
in interface CollationElementsInterface
true
if the value has exactly one collation element,
or false
otherwiseStandardException
- if an error occurs when accessing the valuepublic 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 SQLVarchar
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 SQLVarchar
DataValueDescriptor.getNewNull()
protected StringDataValue getNewVarchar() throws StandardException
SQLChar
getNewVarchar
in class SQLChar
StandardException
- Thrown on errorpublic StringDataValue getValue(java.text.RuleBasedCollator collatorForComparison)
getValue
in interface StringDataValue
getValue
in class SQLVarchar
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)
.public BooleanDataValue like(DataValueDescriptor pattern) throws StandardException
like
in interface StringDataValue
like
in class SQLChar
pattern
- The pattern to useStandardException
- 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 characterStandardException
- Thrown on errorApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.