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.)
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 |
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
SqlTable
public SqlTable(java.lang.String table,
java.lang.String[] names,
int[] typesin,
java.lang.String[] typenames,
int[] lengths,
int[] precs)
colNum
public int colNum(java.lang.String colName)
toHtml
public java.lang.String toHtml()
typeName
public static java.lang.String typeName(int type)