Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enableit.db
Class SqlType  view SqlType download SqlType.java

java.lang.Object
  extended byorg.enableit.db.SqlType
All Implemented Interfaces:
java.io.Serializable

public class SqlType
extends java.lang.Object
implements java.io.Serializable

This class has a primary purpose of representing a null value to be inserted into some SQL call handled by the proxy objects

This is necessary to allow the proxies to receive a null object yet still provide the JDBC driver with a known object type as required by PreparedStatement.setNull

The integer used in the constructor should be one of the static final members of Types

Version:
__VERSION__

Field Summary
static java.lang.String about
          Information on the exact CVS version accessible after compilation
static int BIGDECIMAL
          Represents a BigDecimal
static int BOOLEAN
          Represents a Boolean
static int BYTEARRAY
          Represents a Byte[]
static int CHARACTER
          Represents a Character
private  int dataType
          the internal storage for this dataType.
static int DATE
          Represents a java.util.Date
static int DOUBLE
          Represents a Double
static int FLOAT
          Represents a Float
static int INTEGER
          Deprecated.  
static int LONG
          Represents a Long
private  int precision
          the internal storage for this data type's precision
private  int scale
          the internal storage for this data type's scale
static int SHORT
          Represents a Short
static int SQLDATE
          Represents a SQL Date
static int SQLTIME
          Represents a SQL Time
static int SQLTIMESTAMP
           
static int STRING
          Represents a String
 
Constructor Summary
SqlType(int dataType)
          Constructs a new instance of this class initialised with the integer constant of its type.
SqlType(int dataType, int scale, int precision)
          Constructs a new instance of this class initialised with the integer constant of its type.
 
Method Summary
 int getDataType()
          Returns the datatype that this class represents
 java.lang.String toString()
          Returns a string name of the datatype represented by this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BOOLEAN

public static final int BOOLEAN
Represents a Boolean

See Also:
Constant Field Values

CHARACTER

public static final int CHARACTER
Represents a Character

See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
Represents a Double

See Also:
Constant Field Values

FLOAT

public static final int FLOAT
Represents a Float

See Also:
Constant Field Values

INTEGER

public static final int INTEGER
Deprecated.  

Represents an Integer

See Also:
Constant Field Values

LONG

public static final int LONG
Represents a Long

See Also:
Constant Field Values

SHORT

public static final int SHORT
Represents a Short

See Also:
Constant Field Values

STRING

public static final int STRING
Represents a String

See Also:
Constant Field Values

BIGDECIMAL

public static final int BIGDECIMAL
Represents a BigDecimal

See Also:
Constant Field Values

DATE

public static final int DATE
Represents a java.util.Date

See Also:
Constant Field Values

BYTEARRAY

public static final int BYTEARRAY
Represents a Byte[]

See Also:
Constant Field Values

SQLDATE

public static final int SQLDATE
Represents a SQL Date

See Also:
Constant Field Values

SQLTIME

public static final int SQLTIME
Represents a SQL Time

See Also:
Constant Field Values

SQLTIMESTAMP

public static final int SQLTIMESTAMP
See Also:
Constant Field Values

dataType

private int dataType
the internal storage for this dataType.


scale

private int scale
the internal storage for this data type's scale


precision

private int precision
the internal storage for this data type's precision


about

public static final java.lang.String about
Information on the exact CVS version accessible after compilation

See Also:
Constant Field Values
Constructor Detail

SqlType

public SqlType(int dataType)
Constructs a new instance of this class initialised with the integer constant of its type.


SqlType

public SqlType(int dataType,
               int scale,
               int precision)
Constructs a new instance of this class initialised with the integer constant of its type.

Method Detail

toString

public java.lang.String toString()
Returns a string name of the datatype represented by this object


getDataType

public int getDataType()
Returns the datatype that this class represents