generalDatabase
Class SQLTypes

java.lang.Object
  extended by generalDatabase.SQLTypes
Direct Known Subclasses:
MSAccessSQLTypes, MySQLSQLTypes

public class SQLTypes
extends java.lang.Object

Utilities for converting between java.sql.types numeric and text formats.

Author:
Doug Gillespie
See Also:
Types

Constructor Summary
SQLTypes()
           
 
Method Summary
 java.lang.String typeToString(int sqlType, int length)
          Converts a numeric SQL type and length to a text string that can be used in SQL statements.
 java.lang.String typeToString(int sqlType, int length, boolean counter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLTypes

public SQLTypes()
Method Detail

typeToString

public java.lang.String typeToString(int sqlType,
                                     int length)
Converts a numeric SQL type and length to a text string that can be used in SQL statements. The length parameter is generally only required by text and character types.

Parameters:
sqlType - SQL type as defined in java.sql.Types
length - length of character and text fields
Returns:
string representation of the type

typeToString

public java.lang.String typeToString(int sqlType,
                                     int length,
                                     boolean counter)