net.sf.farrago.test
Class FarragoJdbcTest.TestSqlType

java.lang.Object
  extended by net.sf.farrago.test.FarragoJdbcTest.TestSqlType
Direct Known Subclasses:
FarragoJdbcTest.TestSqlApproxType, FarragoJdbcTest.TestSqlDecimalType, FarragoJdbcTest.TestSqlIntegralType
Enclosing class:
FarragoJdbcTest

private static class FarragoJdbcTest.TestSqlType
extends Object

Defines a SQL type, and a corresponding column in the datatypes table, and some operations particular to each type.


Field Summary
private static FarragoJdbcTest.TestSqlType[] all
           
static int BADFORMAT
           
private static FarragoJdbcTest.TestSqlType Bigint
          Definition of the BIGINT SQL type.
private static FarragoJdbcTest.TestSqlType Binary
          Definition of the BINARY(10) SQL type.
private static FarragoJdbcTest.TestSqlType Boolean
          Definition of the BOOLEAN SQL type.
private static FarragoJdbcTest.TestSqlType Char
          Definition of the CHAR(100) SQL type.
private static FarragoJdbcTest.TestSqlType Date
          Definition of the DATE SQL type.
private static FarragoJdbcTest.TestSqlType Decimal
          Definition of the DECIMAL SQL type.
private static FarragoJdbcTest.TestSqlType Decimal73
           
private static FarragoJdbcTest.TestSqlType Double
          Definition of the DOUBLE SQL type.
static Pattern[] exceptionPatterns
           
private static FarragoJdbcTest.TestSqlType Float
          Definition of the FLOAT SQL type.
private static FarragoJdbcTest.TestSqlType Integer
          Definition of the INTEGER SQL type.
static int INVALID
           
static int NOTNULLABLE
           
private  int ordinal
           
static int OUTOFRANGE
           
private static FarragoJdbcTest.TestSqlType Real
          Definition of the REAL SQL type.
private static FarragoJdbcTest.TestSqlType Smallint
          Definition of the SMALLINT SQL type.
private  String string
           
private static FarragoJdbcTest.TestSqlType Time
          Definition of the TIME(0) SQL type.
private static FarragoJdbcTest.TestSqlType Timestamp
          Definition of the TIMESTAMP SQL type.
private static FarragoJdbcTest.TestSqlType Tinyint
          Definition of the TINYINT SQL type.
static int TOOLONG
           
private static FarragoJdbcTest.TestSqlType[] typesBinary
           
private static FarragoJdbcTest.TestSqlType[] typesChar
           
private static FarragoJdbcTest.TestSqlType[] typesDateTime
           
private static FarragoJdbcTest.TestSqlType[] typesNumeric
           
private static FarragoJdbcTest.TestSqlType[] typesNumericAndChars
           
static int VALID
           
static String[] validityName
           
private static FarragoJdbcTest.TestSqlType Varbinary
          Definition of the VARBINARY(20) SQL type.
private static FarragoJdbcTest.TestSqlType Varchar
          Definition of the VARCHAR(200) SQL type.
 
Constructor Summary
FarragoJdbcTest.TestSqlType(int ordinal, String example)
           
 
Method Summary
 int checkIsValid(Object value)
           
 int checkIsValid(Object value, boolean strict)
           
 Object getExpected(Object value)
           
protected static boolean isBetween(Number number, double min, double max)
           
protected static boolean isBetween(Number number, long min, long max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Tinyint

private static final FarragoJdbcTest.TestSqlType Tinyint
Definition of the TINYINT SQL type.


Smallint

private static final FarragoJdbcTest.TestSqlType Smallint
Definition of the SMALLINT SQL type.


Integer

private static final FarragoJdbcTest.TestSqlType Integer
Definition of the INTEGER SQL type.


Bigint

private static final FarragoJdbcTest.TestSqlType Bigint
Definition of the BIGINT SQL type.


Real

private static final FarragoJdbcTest.TestSqlType Real
Definition of the REAL SQL type.


Float

private static final FarragoJdbcTest.TestSqlType Float
Definition of the FLOAT SQL type.


Double

private static final FarragoJdbcTest.TestSqlType Double
Definition of the DOUBLE SQL type.


Boolean

private static final FarragoJdbcTest.TestSqlType Boolean
Definition of the BOOLEAN SQL type.


Char

private static final FarragoJdbcTest.TestSqlType Char
Definition of the CHAR(100) SQL type.


Varchar

private static final FarragoJdbcTest.TestSqlType Varchar
Definition of the VARCHAR(200) SQL type.


Binary

private static final FarragoJdbcTest.TestSqlType Binary
Definition of the BINARY(10) SQL type.


Varbinary

private static final FarragoJdbcTest.TestSqlType Varbinary
Definition of the VARBINARY(20) SQL type.


Time

private static final FarragoJdbcTest.TestSqlType Time
Definition of the TIME(0) SQL type.


Date

private static final FarragoJdbcTest.TestSqlType Date
Definition of the DATE SQL type.


Timestamp

private static final FarragoJdbcTest.TestSqlType Timestamp
Definition of the TIMESTAMP SQL type.


Decimal

private static final FarragoJdbcTest.TestSqlType Decimal
Definition of the DECIMAL SQL type.


Decimal73

private static final FarragoJdbcTest.TestSqlType Decimal73

all

private static final FarragoJdbcTest.TestSqlType[] all

typesNumericAndChars

private static final FarragoJdbcTest.TestSqlType[] typesNumericAndChars

typesNumeric

private static final FarragoJdbcTest.TestSqlType[] typesNumeric

typesChar

private static final FarragoJdbcTest.TestSqlType[] typesChar

typesBinary

private static final FarragoJdbcTest.TestSqlType[] typesBinary

typesDateTime

private static final FarragoJdbcTest.TestSqlType[] typesDateTime

VALID

public static final int VALID
See Also:
Constant Field Values

INVALID

public static final int INVALID
See Also:
Constant Field Values

OUTOFRANGE

public static final int OUTOFRANGE
See Also:
Constant Field Values

TOOLONG

public static final int TOOLONG
See Also:
Constant Field Values

BADFORMAT

public static final int BADFORMAT
See Also:
Constant Field Values

NOTNULLABLE

public static final int NOTNULLABLE
See Also:
Constant Field Values

validityName

public static final String[] validityName

exceptionPatterns

public static final Pattern[] exceptionPatterns

ordinal

private final int ordinal

string

private final String string
Constructor Detail

FarragoJdbcTest.TestSqlType

FarragoJdbcTest.TestSqlType(int ordinal,
                            String example)
Method Detail

isBetween

protected static boolean isBetween(Number number,
                                   long min,
                                   long max)

isBetween

protected static boolean isBetween(Number number,
                                   double min,
                                   double max)

getExpected

public Object getExpected(Object value)

checkIsValid

public int checkIsValid(Object value)

checkIsValid

public int checkIsValid(Object value,
                        boolean strict)