ca.sqlpower.architect
Class SQLType

java.lang.Object
  extended by ca.sqlpower.architect.SQLType

public class SQLType
extends java.lang.Object

The SQLType class is a holder for a (name, typecode) pair. The type codes come from java.sql.Types, which themselves come from the XOPEN specification.


Constructor Summary
SQLType(java.lang.String name, int type)
          You won't normally need to use this.
 
Method Summary
 java.lang.String getName()
           
 int getType()
           
static SQLType getType(int typecode)
          Returns a reference to the shared instance of SQLType that *has the requested type code.
static java.lang.String getTypeName(int typecode)
           
static SQLType[] getTypes()
          Returns a shared, static array of all defined types.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLType

public SQLType(java.lang.String name,
               int type)
You won't normally need to use this. See getTypes().

Method Detail

getTypes

public static SQLType[] getTypes()
Returns a shared, static array of all defined types. Please don't modify the returned array!


getName

public java.lang.String getName()

getType

public int getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTypeName

public static java.lang.String getTypeName(int typecode)

getType

public static SQLType getType(int typecode)
Returns a reference to the shared instance of SQLType that *has the requested type code. If typecode is not a valid type code, returns null.



Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca