org.dbunit.dataset.datatype
Class StringIgnoreCaseDataType

java.lang.Object
  extended by org.dbunit.dataset.datatype.DataType
      extended by org.dbunit.dataset.datatype.AbstractDataType
          extended by org.dbunit.dataset.datatype.StringDataType
              extended by org.dbunit.dataset.datatype.StringIgnoreCaseDataType

public class StringIgnoreCaseDataType
extends StringDataType

String data type that ignore case when comparing String values.

Since:
2.4.0
Version:
$Revision: 909 $ $Date: 2008-12-04 21:20:00 +0100 (Thu, 04 Dec 2008) $
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $

Field Summary
 
Fields inherited from class org.dbunit.dataset.datatype.DataType
BIGINT, BINARY, BIT, BLOB, BOOLEAN, CHAR, CLOB, DATE, DECIMAL, DOUBLE, FLOAT, INTEGER, LONGVARBINARY, LONGVARCHAR, NUMERIC, REAL, SMALLINT, TIME, TIMESTAMP, TINYINT, UNKNOWN, VARBINARY, VARCHAR
 
Constructor Summary
StringIgnoreCaseDataType(String name, int sqlType)
           
 
Method Summary
protected  int compareNonNulls(Object value1, Object value2)
          Compares non-null values to each other.
 
Methods inherited from class org.dbunit.dataset.datatype.StringDataType
getSqlValue, setSqlValue, typeCast
 
Methods inherited from class org.dbunit.dataset.datatype.AbstractDataType
areObjectsEqual, compare, getSqlType, getTypeClass, isDateTime, isNumber, loadClass, loadClass, toString
 
Methods inherited from class org.dbunit.dataset.datatype.DataType
asString, forObject, forSqlType, forSqlTypeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringIgnoreCaseDataType

public StringIgnoreCaseDataType(String name,
                                int sqlType)
Method Detail

compareNonNulls

protected int compareNonNulls(Object value1,
                              Object value2)
                       throws TypeCastException
Description copied from class: AbstractDataType
Compares non-null values to each other. Both objects are guaranteed to be not null and to implement the interface Comparable. The two given objects are the results of the DataType.typeCast(Object) method call which is usually implemented by a specialized DataType implementation.

Overrides:
compareNonNulls in class AbstractDataType
Parameters:
value1 - First value resulting from the DataType.typeCast(Object) method call
value2 - Second value resulting from the DataType.typeCast(Object) method call
Returns:
The result of the Comparable.compareTo(Object) invocation.
Throws:
TypeCastException


Copyright © 2002-2012. All Rights Reserved.