All Packages  This Package  Previous  Next 

Class JProjects.eab.data.wizzard.JDBCTypes

java.lang.Object
   |
   +----JProjects.eab.data.wizzard.JDBCTypes

public class JDBCTypes
extends 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@isb.gomel.by >
See Also:
DCGenerator

Constructor Index

 o JDBCTypes()

Method Index

 o getSQLType(int)
Perform reverse mapping: from JDBC type code to name.
 o mapToSQLType(String)
Convert string, naming JDBC type to type code.
 o parseDT(String)
Do same thing that mapToSQLType plus parses scale specification.

Constructors

 o JDBCTypes
 public JDBCTypes()

Methods

 o mapToSQLType
 public static int mapToSQLType(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.
 o getSQLType
 public static 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
 o parseDT
 public static int[] parseDT(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.

All Packages   This Package  Previous  Next