DBWeb
Class SqlTable

java.lang.Object
  |
  +--DBWeb.SqlTable

public class SqlTable
extends java.lang.Object

SqlTable represents our knowledge of the contents of a specific table in an SQL database. This is less than we might need to know if we were implementing the database itself. table name * and for each column: column name column type (according to java.sql.Types) column typeName (redundant with type, but handy) column content length (for chars, numbers, etc.)


Field Summary
 int[] colLengths
           
 java.lang.String[] colNames
           
 int[] colPrecs
           
 java.lang.String[] colTypeNames
           
 int[] colTypes
           
 java.lang.String tableName
           
 
Constructor Summary
SqlTable(java.lang.String table, java.lang.String[] names, int[] typesin, java.lang.String[] typenames, int[] lengths, int[] precs)
           
 
Method Summary
 int colNum(java.lang.String colName)
           
 java.lang.String toHtml()
           
static java.lang.String typeName(int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableName

public java.lang.String tableName

colNames

public java.lang.String[] colNames

colTypes

public int[] colTypes

colTypeNames

public java.lang.String[] colTypeNames

colLengths

public int[] colLengths

colPrecs

public int[] colPrecs
Constructor Detail

SqlTable

public SqlTable(java.lang.String table,
                java.lang.String[] names,
                int[] typesin,
                java.lang.String[] typenames,
                int[] lengths,
                int[] precs)
Method Detail

colNum

public int colNum(java.lang.String colName)

toHtml

public java.lang.String toHtml()

typeName

public static java.lang.String typeName(int type)