Top Description Constructors Methods
org.apache.derby.iapi.types

public Class SQLLongvarchar

extends SQLVarchar
Class Inheritance
Known Direct Subclasses
org.apache.derby.iapi.types.CollatorSQLLongvarchar
Imports
java.text.RuleBasedCollator, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.services.io.StoredFormatIds, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.util.StringUtil

SQLLongvarchar represents a LONG VARCHAR value with UCS_BASIC collation. SQLLongvarchar is mostly the same as SQLVarchar, so it is implemented as a subclass of SQLVarchar. Only those methods with different behavior are implemented here.

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public DataValueDescriptor
cloneValue(boolean
any streams representing the data value will be materialized if true, the data value will be kept as a stream if possible if false
forceMaterialization
)

Overrides org.apache.derby.iapi.types.SQLVarchar.cloneValue.

Implements org.apache.derby.iapi.types.DataValueDescriptor.cloneValue.

Clone this DataValueDescriptor.

public StringDataValue
concatenate(StringDataValue
String on the left hand side of '||'
leftOperand
,
StringDataValue
String on the right hand side of '||'
rightOperand
,
StringDataValue
The result of a previous call to this method, null if not called yet.
result
)

Overrides org.apache.derby.iapi.types.SQLChar.concatenate.

Implements org.apache.derby.iapi.types.StringDataValue.concatenate.

The SQL concatenation '||' operator.

public DataValueDescriptor
getNewNull()

Overrides org.apache.derby.iapi.types.SQLVarchar.getNewNull.

Implements org.apache.derby.iapi.types.DataValueDescriptor.getNewNull.

Get a new null value of the same type as this data value.

public int
public String
public StringDataValue
getValue(RuleBasedCollator collatorForComparison)

Overrides org.apache.derby.iapi.types.SQLVarchar.getValue.

Implements org.apache.derby.iapi.types.StringDataValue.getValue.

Gets either SQLChar/SQLVarchar/SQLLongvarchar/SQLClob(base classes) or CollatorSQLChar/CollatorSQLVarchar/CollatorSQLLongvarch/CollatorSQLClob (subclasses).

protected void
public int
Inherited from org.apache.derby.iapi.types.SQLVarchar:
growBynormalize

Constructor Detail

SQLLongvarcharback to summary
public SQLLongvarchar()
SQLLongvarcharback to summary
public SQLLongvarchar(String val)

Method Detail

cloneValueback to summary
public DataValueDescriptor cloneValue(boolean forceMaterialization)

Overrides org.apache.derby.iapi.types.SQLVarchar.cloneValue.

Implements org.apache.derby.iapi.types.DataValueDescriptor.cloneValue.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.cloneValue.

Clone this DataValueDescriptor. Results in a new object that has the same value as this but can be modified independently.

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.

Parameters
forceMaterialization:boolean

any streams representing the data value will be materialized if true, the data value will be kept as a stream if possible if false

Returns:DataValueDescriptor

A clone of the DataValueDescriptor with the same initial value as this.

See Also
DataValueDescriptor#cloneValue
concatenateback to summary
public StringDataValue concatenate(StringDataValue leftOperand, StringDataValue rightOperand, StringDataValue result) throws StandardException

Overrides org.apache.derby.iapi.types.SQLChar.concatenate.

Implements org.apache.derby.iapi.types.StringDataValue.concatenate.

Doc from org.apache.derby.iapi.types.StringDataValue.concatenate.

The SQL concatenation '||' operator.

Parameters
leftOperand:StringDataValue

String on the left hand side of '||'

rightOperand:StringDataValue

String on the right hand side of '||'

result:StringDataValue

The result of a previous call to this method, null if not called yet.

Returns:StringDataValue

A ConcatableDataValue containing the result of the '||'

Exceptions
StandardException:
Thrown on error
See Also
StringDataValue#concatenate
getNewNullback to summary
public DataValueDescriptor getNewNull()

Overrides org.apache.derby.iapi.types.SQLVarchar.getNewNull.

Implements org.apache.derby.iapi.types.DataValueDescriptor.getNewNull.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.getNewNull.

Get a new null value of the same type as this data value.

See Also
DataValueDescriptor#getNewNull
getTypeFormatIdback to summary
public int getTypeFormatId()

Overrides org.apache.derby.iapi.types.SQLVarchar.getTypeFormatId.

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Return my format identifier.

Returns:int

Doc from org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

The identifier. (A UUID stuffed in an array of 16 bytes).

See Also
org.apache.derby.iapi.services.io.TypedFormat#getTypeFormatId
getTypeNameback to summary
public String getTypeName()

Overrides org.apache.derby.iapi.types.SQLVarchar.getTypeName.

Implements org.apache.derby.iapi.types.DataValueDescriptor.getTypeName.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.getTypeName.

Get the SQL name of the datatype

Returns:String

The SQL name of the datatype

getValueback to summary
public StringDataValue getValue(RuleBasedCollator collatorForComparison)

Overrides org.apache.derby.iapi.types.SQLVarchar.getValue.

Implements org.apache.derby.iapi.types.StringDataValue.getValue.

Doc from org.apache.derby.iapi.types.StringDataValue.getValue.

Gets either SQLChar/SQLVarchar/SQLLongvarchar/SQLClob(base classes) or CollatorSQLChar/CollatorSQLVarchar/CollatorSQLLongvarch/CollatorSQLClob (subclasses). Whether this method returns the base class or the subclass depends on the value of the RuleBasedCollator. If RuleBasedCollator is null, then the object returned would be baseclass otherwise it would be subcalss.

See Also
StringDataValue#getValue(RuleBasedCollator)
normalizeback to summary
protected void normalize(DataTypeDescriptor desiredType, String sourceValue) throws StandardException

Overrides org.apache.derby.iapi.types.SQLVarchar.normalize.

typePrecedenceback to summary
public int typePrecedence()

Overrides org.apache.derby.iapi.types.SQLVarchar.typePrecedence.

Implements org.apache.derby.iapi.types.DataValueDescriptor.typePrecedence.

Doc from org.apache.derby.iapi.types.DataValueDescriptor.typePrecedence.

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.

Returns:int

The precedence of this type.