com.knowgate.datacopy
Class DataTblDef
java.lang.Object
com.knowgate.datacopy.DataTblDef
public class DataTblDef
- extends java.lang.Object
Keeps information about each table definition.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cPKs
public int cPKs
bMayInheritPK
public boolean bMayInheritPK
PrimaryKeys
public java.lang.String[] PrimaryKeys
ColNames
public java.lang.String[] ColNames
ColTypes
public int[] ColTypes
ColSizes
public int[] ColSizes
ColCount
public int ColCount
BaseTable
public java.lang.String BaseTable
DataTblDef
public DataTblDef()
readMetaData
public void readMetaData(java.sql.Connection oConn,
java.lang.String sTable,
java.lang.String sPK)
throws java.sql.SQLException
- Read table metadata
- Parameters:
oConn - JDBC ConnectionsTable - Table Name (case insensitive)sPK - List of primary key columns delimited by commas
- Throws:
java.sql.SQLException
getPrimaryKeys
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
- Get table primary key
- Parameters:
oConn - JDBC ConnectionsSchema - String Schema namesCatalog - String Catalog NamesTable - String Table Name (case sensitive)
- Returns:
- String List of table primary key columns delimited by commas, if table does not have a
primary key then return value is null
- Throws:
java.sql.SQLException
findColumnPosition
public int findColumnPosition(java.lang.String sColName)
findColumnType
public int findColumnType(java.lang.String sColName)
inheritsPK
public boolean inheritsPK(DataTblDef oTblDef)
throws java.lang.ArrayIndexOutOfBoundsException
- Throws:
java.lang.ArrayIndexOutOfBoundsException
bestMatch
public boolean bestMatch(int iThisCol,
DataTblDef oTblDef,
int iParentPK)
isPrimaryKey
public boolean isPrimaryKey(int iCol)
isPrimaryKey
public boolean isPrimaryKey(java.lang.String sCol)