public class TypeInfo
extends java.lang.Object
implements java.lang.Comparable
getTypeInfo().
Provides a suitable natural ordering.
This class probably shouldn't be public, but is required to be so by the
tests.| Modifier and Type | Field and Description |
|---|---|
private boolean |
autoIncrement |
private boolean |
caseSensitive |
private java.lang.String |
createParams |
private int |
dataType |
private int |
distanceFromJdbcType |
private boolean |
fixedPrecScale |
private java.lang.String |
literalPrefix |
private java.lang.String |
literalSuffix |
private java.lang.String |
localTypeName |
private short |
maximumScale |
private short |
minimumScale |
private int |
normalizedType |
private short |
nullable |
(package private) static int |
NUM_COLS |
private int |
numPrecRadix |
private int |
precision |
private short |
searchable |
private int |
sqlDataType |
private int |
sqlDatetimeSub |
private java.lang.String |
typeName |
private boolean |
unsigned |
| Constructor and Description |
|---|
TypeInfo(java.sql.ResultSet rs,
boolean useLOBs) |
TypeInfo(java.lang.String typeName,
int dataType,
boolean autoIncrement)
For testing only.
|
| Modifier and Type | Method and Description |
|---|---|
private int |
compare(int i1,
int i2) |
int |
compareTo(java.lang.Object o)
Comparable implementation that orders by dataType, then by how closely
the data type maps to the corresponding JDBC SQL type.
|
private int |
determineDistanceFromJdbcType()
Determine how close this type is to the corresponding JDBC type.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
static int |
normalizeDataType(int serverDataType,
boolean useLOBs)
Return a
Types-defined type for an SQL Server specific data type. |
java.lang.String |
toString() |
void |
update(java.sql.ResultSet rs) |
static final int NUM_COLS
private final java.lang.String typeName
private final int dataType
private final int precision
private final java.lang.String literalPrefix
private final java.lang.String literalSuffix
private final java.lang.String createParams
private final short nullable
private final boolean caseSensitive
private final short searchable
private final boolean unsigned
private final boolean fixedPrecScale
private final boolean autoIncrement
private final java.lang.String localTypeName
private final short minimumScale
private final short maximumScale
private final int sqlDataType
private final int sqlDatetimeSub
private final int numPrecRadix
private final int normalizedType
private final int distanceFromJdbcType
public TypeInfo(java.sql.ResultSet rs,
boolean useLOBs)
throws java.sql.SQLException
java.sql.SQLExceptionpublic TypeInfo(java.lang.String typeName,
int dataType,
boolean autoIncrement)
compareTo() method (set name, type, and auto
increment).public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void update(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableprivate int compare(int i1,
int i2)
private int determineDistanceFromJdbcType()
normalizedType value.public static int normalizeDataType(int serverDataType,
boolean useLOBs)
Types-defined type for an SQL Server specific data type.serverDataType - the data type, as returned by the serveruseLOBs - whether LOB data types are used for large typesjava.sql.TypesGenerated on June 8 2013