public class SQLTypes
extends java.lang.Object
Title: Structured Data Objects: Row Set
Description: Defines the constants that are used to identify SQL types for Row Set and Row inteface type reporting.
Copyright: Copyright (c) 2008
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static int |
ARRAY
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
ARRAY . |
static int |
BIGINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BIGINT . |
static int |
BINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BINARY . |
static int |
BLOB
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
BLOB . |
static int |
BOOLEAN
The constant in the Java programming language, somtimes referred to
as a type code, that identifies the generic SQL type
BOOLEAN . |
static int |
CHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
CHAR . |
static int |
CLOB
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
CLOB |
static int |
DATALINK
The constant in the Java programming language, somtimes referred to
as a type code, that identifies the generic SQL type
DATALINK . |
static int |
DATE
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DATE . |
static java.lang.String |
DateClassName |
static int |
DECIMAL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DECIMAL . |
static java.lang.String |
DecimalClassName |
static int |
DISTINCT
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
DISTINCT . |
static int |
DOUBLE
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DOUBLE . |
static int |
FLOAT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
FLOAT . |
static int |
INTEGER
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
INTEGER . |
static int |
JAVA_OBJECT
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
JAVA_OBJECT . |
static int |
LONGVARBINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
LONGVARBINARY . |
static int |
LONGVARCHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
LONGVARCHAR . |
static int |
MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE |
static int |
NULL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
NULL . |
static int |
NUMERIC
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
NUMERIC . |
static int |
OTHER
The constant in the Java programming language that indicates
that the SQL type is database-specific and
gets mapped to a Java object that can be accessed via
the methods
getObject and setObject . |
static int |
REAL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
REAL . |
static int |
REF
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
REF . |
static int |
SMALLINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
SMALLINT . |
static int |
STRUCT
The constant in the Java programming language, sometimes referred to
as a type code, that identifies the generic SQL type
STRUCT . |
static int |
TIME
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TIME . |
static java.lang.String |
TimeClassName |
static int |
TIMESTAMP
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TIMESTAMP . |
static java.lang.String |
TimestampClassName |
static int |
TINYINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TINYINT . |
static int |
UNDEFINED
A constant representing an undefined (not set) type value.
|
static int |
VARBINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
VARBINARY . |
static int |
VARCHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
VARCHAR . |
static int |
VARCHAR_IGNORECASE |
static int |
XML
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the recent SQL 200n SQL type
XML . |
Constructor and Description |
---|
SQLTypes() |
Modifier and Type | Method and Description |
---|---|
static boolean |
acceptsPrecisionCreateParam(int type)
Types that accept precision params in column definition or casts.
|
static boolean |
acceptsScaleCreateParam(int type) |
static java.lang.Class |
getClassFromSQLType(java.lang.String sqlType)
Returns the class instance that matches the specified SQL Type.
|
static java.lang.String |
getClassNameFromSQLType(java.lang.String sqlType)
Returns the name of the class that matches the specified SQL Type.
|
static java.lang.String |
getColStClsName(int type) |
static int |
getPrecision(int type) |
static int |
getSQLType(java.lang.Class clazz)
Returns the SQL Type that is represented by the class instance.
|
static int |
getSQLType(java.lang.String typeName)
Returns the SQL Type of a specific data type.
|
static int |
getSQLTypeMaxDisplaySize(int type)
Get the maximum display size for a given Type.
|
static java.lang.String |
getTypeClass(int type)
Returns a 'best guess' class name that represents the SQL type of this
Result Set element.
|
static java.lang.String |
getTypeName(int type)
Returns the upper case name name of a given Type.
|
static java.lang.String |
getTypeString(int type)
Returns SQL type string for a java.sql.Types enumerated data type.
|
static java.lang.String |
getTypeString(int type,
int precision,
int scale)
Returns SQL type string for a java.sql.Types enumerated data type with the
appriate precision decorations.
|
static java.lang.Boolean |
isCaseSensitive(int type) |
static boolean |
isSearchable(int type) |
static java.lang.Boolean |
isUnsignedAttribute(int type) |
static int |
numericPrecisionCreateParamRadix(int type) |
public static final java.lang.String DecimalClassName
public static final java.lang.String DateClassName
public static final java.lang.String TimeClassName
public static final java.lang.String TimestampClassName
public static final int UNDEFINED
public static final int ARRAY
ARRAY
.public static final int BIGINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BIGINT
.
public static final int BINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BINARY
.
public static final int BLOB
BLOB
.public static final int BOOLEAN
BOOLEAN
.public static final int CHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
CHAR
.
public static final int CLOB
CLOB
public static final int DATALINK
DATALINK
.public static final int DATE
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DATE
.
public static final int DECIMAL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DECIMAL
.
public static final int DISTINCT
DISTINCT
.public static final int DOUBLE
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DOUBLE
.
public static final int FLOAT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
FLOAT
.
public static final int INTEGER
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
INTEGER
.
public static final int JAVA_OBJECT
JAVA_OBJECT
.public static final int LONGVARBINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
LONGVARBINARY
.
public static final int LONGVARCHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
LONGVARCHAR
.
public static final int NULL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
NULL
.
public static final int NUMERIC
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
NUMERIC
.
public static final int OTHER
getObject
and setObject
.public static final int REAL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
REAL
.
public static final int REF
REF
.public static final int SMALLINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
SMALLINT
.
public static final int STRUCT
STRUCT
.public static final int TIME
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TIME
.
public static final int TIMESTAMP
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TIMESTAMP
.
public static final int TINYINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TINYINT
.
public static final int VARBINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
VARBINARY
.
public static final int VARCHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
VARCHAR
.
public static final int XML
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the recent SQL 200n SQL type
XML
.
public static final int VARCHAR_IGNORECASE
public static final int MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE
public static java.lang.String getClassNameFromSQLType(java.lang.String sqlType)
sqlType
- Stringpublic static java.lang.Class getClassFromSQLType(java.lang.String sqlType)
sqlType
- Stringpublic static int getSQLType(java.lang.Class clazz)
clazz
- Classpublic static int getSQLType(java.lang.String typeName)
pseudo-type
based on java.sql.Types,
for instance INTEGER
or CHAR
. It may
also be expressed as Java type objects like java.lang.String
or as primitives such as int
or double
.typeName
- String Representing SQL Type or Java Class to resolve to valid java.sql.Types
java.sql.Types
enumerated type.public static java.lang.String getTypeClass(int type)
UNDEFINED
.type
- intpublic static java.lang.String getTypeString(int type)
This function may be used to decode the type or obtain the string name for building DDL or DML.
type
- int Enumeration of Types.[type] representing the data type.public static java.lang.String getTypeString(int type, int precision, int scale)
CHAR(30)
or FLOAT(10,2)
.
This function may be used to decode the type or obtain the string name for building DDL or DML.
type
- int Enumeration of Types.[type] representing the data type.precision
- int Precision of data type.scale
- int Scale of the type.public static boolean acceptsPrecisionCreateParam(int type)
public static int numericPrecisionCreateParamRadix(int type)
public static boolean acceptsScaleCreateParam(int type)
public static java.lang.String getTypeName(int type)
type
- int Type enumerated data.public static int getSQLTypeMaxDisplaySize(int type)
type
- int The SQL Type to check.public static boolean isSearchable(int type)
public static java.lang.Boolean isCaseSensitive(int type)
public static java.lang.Boolean isUnsignedAttribute(int type)
public static int getPrecision(int type)
public static java.lang.String getColStClsName(int type)
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.