org.h2.value
Class ValueStringIgnoreCase

java.lang.Object
  extended by org.h2.value.Value
      extended by org.h2.value.ValueString
          extended by org.h2.value.ValueStringIgnoreCase

public class ValueStringIgnoreCase
extends ValueString

Implementation of the VARCHAR_IGNORECASE data type.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.h2.value.Value
Value.ValueBlob, Value.ValueClob
 
Field Summary
 
Fields inherited from class org.h2.value.ValueString
value
 
Fields inherited from class org.h2.value.Value
ARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, FLOAT, INT, JAVA_OBJECT, LONG, NULL, RESULT_SET, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIMESTAMP, TYPE_COUNT, UNKNOWN, UUID
 
Constructor Summary
protected ValueStringIgnoreCase(java.lang.String value)
           
 
Method Summary
protected  int compareSecure(Value o, CompareMode mode)
          Compare the value with another value of the same type.
 boolean equals(java.lang.Object other)
          Check if the two values have the same hash code.
static ValueStringIgnoreCase get(java.lang.String s)
          Get or create a case insensitive string value for the given string.
protected  Value getNew(java.lang.String s)
          Create a new String value of the current class.
 java.lang.String getSQL()
          Get the SQL expression for this value.
 int getType()
          Get the value type.
 int hashCode()
           
 
Methods inherited from class org.h2.value.ValueString
convertPrecision, getDisplaySize, getMemory, getObject, getPrecision, getString, set
 
Methods inherited from class org.h2.value.Value
add, checkPrecision, clearCache, close, compareTo, compareTypeSave, convertScale, convertTo, copyToTemp, divide, getBigDecimal, getBoolean, getByte, getBytes, getBytesNoCopy, getDate, getDateNoCopy, getDouble, getFloat, getHigherOrder, getInputStream, getInt, getLong, getReader, getScale, getShort, getSignum, getSmall, getTableId, getTime, getTimeNoCopy, getTimestamp, getTimestampNoCopy, getTraceSQL, isFileBased, isLinked, link, multiply, negate, subtract, throwUnsupportedExceptionForType, toString, unlink
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueStringIgnoreCase

protected ValueStringIgnoreCase(java.lang.String value)
Method Detail

getType

public int getType()
Description copied from class: Value
Get the value type.

Overrides:
getType in class ValueString
Returns:
the type

compareSecure

protected int compareSecure(Value o,
                            CompareMode mode)
Description copied from class: Value
Compare the value with another value of the same type.

Overrides:
compareSecure in class ValueString
Parameters:
o - the other value
mode - the compare mode
Returns:
0 if both values are equal, -1 if the other value is smaller, and 1 otherwise

equals

public boolean equals(java.lang.Object other)
Description copied from class: Value
Check if the two values have the same hash code. No data conversion is made; this method returns false if the other object is not of the same class. For some values, compareTo may return 0 even if equals return false. Example: ValueDecimal 0.0 and 0.00.

Overrides:
equals in class ValueString
Parameters:
other - the other value
Returns:
true if they are equal

hashCode

public int hashCode()
Overrides:
hashCode in class ValueString

getSQL

public java.lang.String getSQL()
Description copied from class: Value
Get the SQL expression for this value.

Overrides:
getSQL in class ValueString
Returns:
the SQL expression

get

public static ValueStringIgnoreCase get(java.lang.String s)
Get or create a case insensitive string value for the given string. The value will have the same case as the passed string.

Parameters:
s - the string
Returns:
the value

getNew

protected Value getNew(java.lang.String s)
Description copied from class: ValueString
Create a new String value of the current class. This method is meant to be overridden by subclasses.

Overrides:
getNew in class ValueString
Parameters:
s - the string
Returns:
the value