|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.ejen.ext.db.MetaDataNodeBuilder
|
+--org.ejen.ext.db.TableMetaDataNodeBuilder
Table metadata abstract class
(see BasicMetaDataConnection for usage).
| Field Summary | |
static String |
S_TABLE_METADATA_NODE_NAME
|
| Constructor Summary | |
TableMetaDataNodeBuilder()
|
|
| Method Summary | |
static Node |
getTableMetaData(ExpressionContext context,
String table)
Gets table metadata. |
static Node |
getTableMetaData(ExpressionContext context,
String catalog,
String schema,
String table)
Gets table metadata. |
protected static Node |
getTableMetaData(String catalog,
String schema,
String table,
Document doc)
Gets table metadata. |
| Methods inherited from class org.ejen.ext.db.MetaDataNodeBuilder |
appendErrorNode, getConnection, getDatabaseInformation, getErrors, getExportedKeys, getExportedKeys, getExportedKeys, getImportedKeys, getImportedKeys, getImportedKeys, getImportedOrExportedKeys, getIndexInfo, getIndexInfo, getIndexInfo, getPrimaryKeys, getPrimaryKeys, getPrimaryKeys, getResultSetMetaData, getResultSetMetaData, getResultSetMetaData, noNull |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String S_TABLE_METADATA_NODE_NAME
| Constructor Detail |
public TableMetaDataNodeBuilder()
| Method Detail |
public static Node getTableMetaData(ExpressionContext context,
String table)
<xsl:copy-of select="mta:getTableMetaData('ADDRESS')"/>
|
The returned Node has the following format:
<metadata>
<primary-key column-name="ID"
key-seq="1"
pk-name="SYSTEM_PK"
table-cat="#NULL"
table-name="ADDRESS"
table-shem="#NULL"/>
<index asc-or-desc="A"
cardinality="#NULL"
column-name="ID"
filter-condition="#NULL"
index-name="SYSTEM_PK"
index-qualifier="#NULL"
non-unique="false"
ordinal-position="1"
pages="#NULL"
table-cat="#NULL"
table-name="ADDRESS"
table-shem="#NULL" type="3"/>
[... Other index nodes]
<column auto-increment="false"
case-sensitive="true"
catalog-name=""
column-class-name="#NOT_SUPPORTED"
column-display-size="0"
column-label="ID"
column-name="ID"
column-no-nulls="0"
column-nullable="1"
column-nullable-unknown="2"
column-type="4"
column-type-name="INTEGER"
currency="false"
definitely-writable="true"
nullable="1"
precision="0"
read-only="false"
scale="0"
schema-name=""
searchable="true"
sequence="true"
signed="true"
table-name="ADDRESS"
writable="true"/>
[... Other column nodes]
</metadata>
|
Any null value returned by a
ResultSetMetaData.get*() or a
ResultSet.get*(int columnIndex) is marked as
#NULL.
Any exception thrown by a ResultSetMetaData.get*() method
is marked as #NOT_SUPPORTED.
Important database errors (table does not exists, ...) are not thrown. Instead,
an errors NodeSet is built and can be retreived by the
MetaDataNodeBuilder.getErrors(ExpressionContext) method.
See MetaDataNodeBuilder.getPrimaryKeys(ExpressionContext,String),
MetaDataNodeBuilder.getIndexInfo(ExpressionContext,String) and
MetaDataNodeBuilder.getResultSetMetaData(ExpressionContext,String).
context - automatically passed by the xalan extension mechanism.table - table name from which metadata are to be retreived.
Node containing the table metadata informations.
public static Node getTableMetaData(ExpressionContext context,
String catalog,
String schema,
String table)
<xsl:copy-of select="mta:getTableMetaData('CAT','SCH','ADDRESS')"/>
|
See getTableMetaData(ExpressionContext,String).
context - automatically passed by the xalan extension mechanism.catalog - the table catalog name.schema - the table schema name.table - the table name from which metadata are to be retreived.
Node containing the table metadata informations.
protected static Node getTableMetaData(String catalog,
String schema,
String table,
Document doc)
See getTableMetaData(ExpressionContext,String).
catalog - the table catalog name.schema - the table schema name.table - the table name from which metadata are to be retreived.doc - a Document object used to build the
metadata Node.
Node containing the table metadata informations.
WrappedRuntimeException - if something goes
wrong (except database errors).
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||