public class DataTblDef
extends java.lang.Object
Keeps information about each table definition.
Modifier and Type | Field and Description |
---|---|
java.lang.String |
BaseTable |
boolean |
bMayInheritPK |
int |
ColCount |
java.lang.String[] |
ColNames |
int[] |
ColSizes |
int[] |
ColTypes |
int |
cPKs |
java.lang.String[] |
PrimaryKeys |
Constructor and Description |
---|
DataTblDef() |
Modifier and Type | Method and Description |
---|---|
boolean |
bestMatch(int iThisCol,
DataTblDef oTblDef,
int iParentPK) |
int |
findColumnPosition(java.lang.String sColName) |
int |
findColumnType(java.lang.String sColName) |
java.lang.String |
getPrimaryKeys(java.sql.Connection oConn,
java.lang.String sSchema,
java.lang.String sCatalog,
java.lang.String sTable)
Get table primary key
|
boolean |
inheritsPK(DataTblDef oTblDef) |
boolean |
isPrimaryKey(int iCol) |
boolean |
isPrimaryKey(java.lang.String sCol) |
void |
readMetaData(java.sql.Connection oConn,
java.lang.String sTable,
java.lang.String sPK)
Read table metadata
|
public int cPKs
public boolean bMayInheritPK
public java.lang.String[] PrimaryKeys
public java.lang.String[] ColNames
public int[] ColTypes
public int[] ColSizes
public int ColCount
public java.lang.String BaseTable
public void readMetaData(java.sql.Connection oConn, java.lang.String sTable, java.lang.String sPK) throws java.sql.SQLException
oConn
- JDBC ConnectionsTable
- Table Name (case insensitive)sPK
- List of primary key columns delimited by commasjava.sql.SQLException
public java.lang.String getPrimaryKeys(java.sql.Connection oConn, java.lang.String sSchema, java.lang.String sCatalog, java.lang.String sTable) throws java.sql.SQLException
oConn
- JDBC ConnectionsSchema
- String Schema namesCatalog
- String Catalog NamesTable
- String Table Name (case sensitive)java.sql.SQLException
public int findColumnPosition(java.lang.String sColName)
public int findColumnType(java.lang.String sColName)
public boolean inheritsPK(DataTblDef oTblDef) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public boolean bestMatch(int iThisCol, DataTblDef oTblDef, int iParentPK)
public boolean isPrimaryKey(int iCol)
public boolean isPrimaryKey(java.lang.String sCol)