|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.db.DBMetaData
public class DBMetaData
This class wraps the metadata retrieved from a table on the DB.
Constructor Summary | |
---|---|
DBMetaData(java.lang.String aTable,
java.lang.String[] aColumns,
int[] aColTypes,
int[] aColSizes)
Constructor that allows the specification of table name, column names and column types. |
|
DBMetaData(java.lang.String aTable,
java.lang.String[] aColumns,
int[] aColTypes,
int[] aColSizes,
java.lang.String[] aPKColumns)
Constructor that allows the specification of table name, column names and column types and the primary key columns.. |
|
DBMetaData(java.lang.String aTable,
java.util.Vector aColumns,
java.util.Vector aColTypes,
java.util.Vector aColSizes)
Constructor that allows the specification of table name, column names and column types. |
|
DBMetaData(java.lang.String aTable,
java.util.Vector aColumns,
java.util.Vector aColTypes,
java.util.Vector aColSizes,
java.util.Vector aPKColumns)
Constructor that allows the specification of table name, column names, column types, column sizes and the primary key columns. |
Method Summary | |
---|---|
int |
getCodedColumnType(int aColumnIndex)
This method returns the coded columntype for the specified column index. |
int |
getCodedColumnType(java.lang.String aColumnName)
This method returns the coded column type for the specified column. |
int[] |
getCodedColumnTypes()
This method reports on all the coded column types. |
int |
getColumnCount()
This method returns the column count for this table. |
java.lang.String |
getColumnName(int aColumnIndex)
This method returns the name of the specified column. |
java.lang.String[] |
getColumnNames()
This method reports on all the column names. |
int |
getColumnSize(int aColumnIndex)
This method returns the column size for the specified column index. |
int |
getColumnSize(java.lang.String aColumnName)
This method returns the column size for the specified column. |
int[] |
getColumnSizes()
This method reports on all the column sizes. |
java.lang.String |
getConvertedColumnType(int aColumnIndex)
This method returns the converted columntype for the specified column index. |
java.lang.String |
getConvertedColumnType(java.lang.String aColumnName)
This method returns the converted column type for the specified column. |
java.lang.String[] |
getConvertedColumnTypes()
This method reports on all the converted column types. |
java.lang.String[] |
getPrimaryKeyColumns()
This method reports on the primary key columns for the table. |
java.lang.String |
getTableName()
This method reports on the tablename. |
java.lang.String |
toString()
This method presents a String representation for this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DBMetaData(java.lang.String aTable, java.lang.String[] aColumns, int[] aColTypes, int[] aColSizes)
aTable
- String with the table nameaColumns
- String[] with the column namesaColTypes
- int[] with the coded column typesaColSizes
- int[] with the column sizespublic DBMetaData(java.lang.String aTable, java.lang.String[] aColumns, int[] aColTypes, int[] aColSizes, java.lang.String[] aPKColumns)
aTable
- String with the table nameaColumns
- String[] with the column namesaColTypes
- int[] with the coded column typesaColSizes
- int[] with the column sizesaPKColumns
- String[] with the names for the primary key columns.public DBMetaData(java.lang.String aTable, java.util.Vector aColumns, java.util.Vector aColTypes, java.util.Vector aColSizes)
aTable
- String with the table nameaColumns
- Vector with the column names (should contain only Strings)aColTypes
- Vector with the coded column types (should contain only Integers)aColSizes
- Vector with the column sizes (should contain only integers).public DBMetaData(java.lang.String aTable, java.util.Vector aColumns, java.util.Vector aColTypes, java.util.Vector aColSizes, java.util.Vector aPKColumns)
aTable
- String with the table nameaColumns
- Vector with the column names (should contain only Strings)aColTypes
- Vector with the coded column types (should contain only Integers)aColSizes
- Vector with the column sizes (should contain only integers).aPKColumns
- Vector with the names for the primary key columns.Method Detail |
---|
public java.lang.String getTableName()
public java.lang.String[] getColumnNames()
public int[] getCodedColumnTypes()
public int[] getColumnSizes()
public java.lang.String[] getConvertedColumnTypes()
public int getColumnCount()
public java.lang.String getColumnName(int aColumnIndex)
aColumnIndex
- int with the index of the column
for which to retrieve the name.
public int getCodedColumnType(java.lang.String aColumnName)
aColumnName
- String with the column name.
public int getColumnSize(java.lang.String aColumnName)
aColumnName
- String with the column name.
public java.lang.String getConvertedColumnType(java.lang.String aColumnName)
aColumnName
- String with the column name.
public int getCodedColumnType(int aColumnIndex)
aColumnIndex
- int with the column index
public int getColumnSize(int aColumnIndex)
aColumnIndex
- int with the column index
public java.lang.String getConvertedColumnType(int aColumnIndex)
aColumnIndex
- int with the column index
public java.lang.String[] getPrimaryKeyColumns()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |