JProjects.eab.data.wizzard
Class JDBCTypes
java.lang.Object
|
+--JProjects.eab.data.wizzard.JDBCTypes
- public class JDBCTypes
- extends java.lang.Object
JDBC types support. Translates between human readable Types description and
codes from java.sql.Types, java data types etc. This class is for internal
use and gets public due to implementation constarints.
- Author:
- Alexander Jaremenko < jarem@altavista.net >
- See Also:
DCGenerator
Method Summary |
static java.lang.String |
getSQLType(int sqlT)
Perform reverse mapping: from JDBC type code to name. |
static int |
mapToSQLType(java.lang.String n)
Convert string, naming JDBC type to type code. |
static int[] |
parseDT(java.lang.String sqlT)
Do same thing that mapToSQLType plus parses scale specification. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
JDBCTypes
public JDBCTypes()
mapToSQLType
public static int mapToSQLType(java.lang.String n)
- Convert string, naming JDBC type to type code.
- Parameters:
n
- human readable JDBC type's name- Returns:
- JDBC type's code as defined in java.sql.Types or -1 if
arg is not valid type name.
getSQLType
public static java.lang.String getSQLType(int sqlT)
- Perform reverse mapping: from JDBC type code to name.
- Parameters:
sqlT
- JDBC type code as defined in java.sql.Types- Returns:
- human readable JDBC type's name
parseDT
public static int[] parseDT(java.lang.String sqlT)
- Do same thing that mapToSQLType plus parses scale specification.
- Parameters:
sqlT
- JDBC type name with optional scale specification (e.g.
"NUMBER.2")- Returns:
- 2 - dimentional array. First element of an row holds JDBC
type code and the second one scale value.