java.lang.Object
com.aoapps.dbc.meta.Table
A friendly wrapper around database meta data.
- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Two tables are equal if they have the same schema name and table name.getColumn
(int ordinalPosition) Gets the column of the provided ordinal position, where positions start at one.Gets the column of the provided name.Gets all columns for this schema keyed by unique name.getColumnOptional
(int ordinalPosition) Gets the column of the provided ordinal position, where positions start at one.getColumnOptional
(String name) Gets the column of the provided name.Gets all columns for this schema in their ordinal position order.Gets the set of tables that depend on this table.Gets the set of tables that this table depends on.getName()
Gets the primary key for this table ornull
if not found.int
hashCode()
toString()
-
Constructor Details
-
Table
-
-
Method Details
-
toString
-
equals
Two tables are equal if they have the same schema name and table name. -
hashCode
public int hashCode() -
getSchema
-
getName
-
getTableType
-
getColumnMap
Gets all columns for this schema keyed by unique name.- Throws:
SQLException
- See Also:
-
getColumnOptional
Gets the column of the provided name.- Throws:
SQLException
-
getColumn
Gets the column of the provided name.- Throws:
NoRowException
- if the column doesn't existSQLException
-
getColumns
Gets all columns for this schema in their ordinal position order. Column with ordinal position one is at index zero.- Throws:
SQLException
- See Also:
-
getColumnOptional
Gets the column of the provided ordinal position, where positions start at one.- Throws:
SQLException
-
getColumn
Gets the column of the provided ordinal position, where positions start at one.- Throws:
NoRowException
- if the column doesn't existSQLException
-
getPrimaryKey
Gets the primary key for this table ornull
if not found.- Throws:
SQLException
-
getImportedTables
Gets the set of tables that this table depends on.This is based on
DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)
.- Throws:
SQLException
-
getExportedTables
Gets the set of tables that depend on this table.This is based on
DatabaseMetaData.getExportedKeys(java.lang.String, java.lang.String, java.lang.String)
.- Throws:
SQLException
-