|
||||||||||
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(String aTable,
String[] aColumns,
int[] aColTypes,
int[] aColSizes)
Constructor that allows the specification of table name, column names and column types. |
|
DBMetaData(String aTable,
String[] aColumns,
int[] aColTypes,
int[] aColSizes,
String[] aPKColumns)
Constructor that allows the specification of table name, column names and column types and the primary key columns.. |
|
DBMetaData(String aTable,
Vector aColumns,
Vector aColTypes,
Vector aColSizes)
Constructor that allows the specification of table name, column names and column types. |
|
DBMetaData(String aTable,
Vector aColumns,
Vector aColTypes,
Vector aColSizes,
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(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. |
String |
getColumnName(int aColumnIndex)
This method returns the name of the specified column. |
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(String aColumnName)
This method returns the column size for the specified column. |
int[] |
getColumnSizes()
This method reports on all the column sizes. |
String |
getConvertedColumnType(int aColumnIndex)
This method returns the converted columntype for the specified column index. |
String |
getConvertedColumnType(String aColumnName)
This method returns the converted column type for the specified column. |
String[] |
getConvertedColumnTypes()
This method reports on all the converted column types. |
String[] |
getPrimaryKeyColumns()
This method reports on the primary key columns for the table. |
String |
getTableName()
This method reports on the tablename. |
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(String aTable, 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(String aTable, String[] aColumns, int[] aColTypes, int[] aColSizes, 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(String aTable, Vector aColumns, Vector aColTypes, 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(String aTable, Vector aColumns, Vector aColTypes, Vector aColSizes, 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 String getTableName()
public String[] getColumnNames()
public int[] getCodedColumnTypes()
public int[] getColumnSizes()
public String[] getConvertedColumnTypes()
public int getColumnCount()
public String getColumnName(int aColumnIndex)
aColumnIndex
- int with the index of the column
for which to retrieve the name.
public int getCodedColumnType(String aColumnName)
aColumnName
- String with the column name.
public int getColumnSize(String aColumnName)
aColumnName
- String with the column name.
public String getConvertedColumnType(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 String getConvertedColumnType(int aColumnIndex)
aColumnIndex
- int with the column index
public String[] getPrimaryKeyColumns()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |