org.objectweb.telosys.dal.metadata
Class DbMetaData

java.lang.Object
  extended byorg.objectweb.telosys.dal.metadata.DbMetaData

public class DbMetaData
extends java.lang.Object

This Class allow user to access Metadata from a Database.


Constructor Summary
DbMetaData()
           
 
Method Summary
static DbColumn getColumn(java.lang.String columnName, DbTable table)
          Return the column, specified by columnName, of the indicated table from the current Database
static DbColumn getColumn(java.lang.String columnName, DbTable table, java.sql.Connection con)
          Return the column, specified by columnName, of the indicated table from the specified Database
static DbColumn getColumn(java.lang.String columnName, DbTable table, DatabaseSession session)
          Return the column, specified by columnName, of the indicated table from the specified Database
static DbColumn getColumn(java.lang.String columnName, DbTable table, int iDatabaseId)
          Return the column, specified by columnName, of the indicated table from the specified Database
static DbColumn[] getColumns(DbTable table)
          Return all columns of the indicated DbTable table, on the current DataBase
static DbColumn[] getColumns(DbTable table, java.sql.Connection con)
          Return all columns of the indicated DbTable table, on the specified DataBase
static DbColumn[] getColumns(DbTable table, DatabaseSession session)
          Return all columns of the indicated DbTable table, on the specified DataBase
static DbColumn[] getColumns(DbTable table, int iDatabaseId)
          Return all columns of the indicated DbTable table, on the specified DataBase
static java.sql.DatabaseMetaData getMetaData()
          Return MetaData about the current DataBase
static java.sql.DatabaseMetaData getMetaData(java.sql.Connection con)
          Return MetaData about the DataBase identify by her Connection con
static java.sql.DatabaseMetaData getMetaData(DatabaseSession session)
          Return MetaData about the DataBase identify by the session's connection
static java.sql.DatabaseMetaData getMetaData(int iDatabaseId)
          Return MetaData about the DataBase identify by her id iDatabaseId
static java.lang.String[] getSchemas()
          Return all Schemas of the current DataBase
static java.lang.String[] getSchemas(java.sql.Connection con)
          Return all Schemas of the DataBase identify by her Connection
static java.lang.String[] getSchemas(DatabaseSession session)
          Return all Schemas of the DataBase identify by the session's connection
static java.lang.String[] getSchemas(int iDatabaseId)
          Return all Schemas of the DataBase identify by her id iDatabaseId
static DbTable getTable(java.lang.String tableName)
          Return the table, specified by tableName from the current Database
static DbTable getTable(java.lang.String tableName, java.sql.Connection con)
          Return the table, specified by tableName from the specified Database
static DbTable getTable(java.lang.String tableName, DatabaseSession session)
          Return the table, specified by tableName from the specified Database
static DbTable getTable(java.lang.String tableName, int iDatabaseId)
          Return the table, specified by tableName from the specified Database
static DbTable[] getTables()
          Return all information about the tables in the current DataBase.
static DbTable[] getTables(java.sql.Connection con)
          Return all information about the tables in the DataBase identify by the connection
static DbTable[] getTables(DatabaseSession session)
          Return all information about the tables in the DataBase identify by the session's connection
static DbTable[] getTables(int iDatabaseId)
          Return all information about the tables in the DataBase identify by the given id
static DbTable[] getTables(java.lang.String sCatalog, java.lang.String sSchema, java.lang.String tableName, java.lang.String[] arrayTableTypes)
          Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the current DataBase
static DbTable[] getTables(java.lang.String sCatalog, java.lang.String sSchema, java.lang.String tableName, java.lang.String[] arrayTableTypes, java.sql.Connection con)
          Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the DataBase identify by her Connection con
static DbTable[] getTables(java.lang.String sCatalog, java.lang.String sSchema, java.lang.String tableName, java.lang.String[] arrayTableTypes, DatabaseSession session)
          Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the DataBase identify by the session's connection
static DbTable[] getTables(java.lang.String sCatalog, java.lang.String sSchema, java.lang.String tableName, java.lang.String[] arrayTableTypes, int iDatabaseId)
          Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the DataBase identify by her id iDatabaseId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbMetaData

public DbMetaData()
Method Detail

getTables

public static DbTable[] getTables()
                           throws TelosysException
Return all information about the tables in the current DataBase.

Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(int iDatabaseId)
                           throws TelosysException
Return all information about the tables in the DataBase identify by the given id

Parameters:
iDatabaseId -
Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(java.sql.Connection con)
                           throws TelosysException
Return all information about the tables in the DataBase identify by the connection

Parameters:
con -
Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(DatabaseSession session)
                           throws TelosysException
Return all information about the tables in the DataBase identify by the session's connection

Parameters:
session -
Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(java.lang.String sCatalog,
                                  java.lang.String sSchema,
                                  java.lang.String tableName,
                                  java.lang.String[] arrayTableTypes)
                           throws TelosysException
Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the current DataBase

Parameters:
sCatalog -
sSchema -
tableName -
arrayTableTypes -
Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(java.lang.String sCatalog,
                                  java.lang.String sSchema,
                                  java.lang.String tableName,
                                  java.lang.String[] arrayTableTypes,
                                  int iDatabaseId)
                           throws TelosysException
Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the DataBase identify by her id iDatabaseId

Parameters:
sCatalog -
sSchema -
tableName -
arrayTableTypes -
iDatabaseId -
Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(java.lang.String sCatalog,
                                  java.lang.String sSchema,
                                  java.lang.String tableName,
                                  java.lang.String[] arrayTableTypes,
                                  java.sql.Connection con)
                           throws TelosysException
Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the DataBase identify by her Connection con

Parameters:
sCatalog -
sSchema -
tableName -
arrayTableTypes -
con -
Returns:
DbTable[]
Throws:
TelosysException

getTables

public static DbTable[] getTables(java.lang.String sCatalog,
                                  java.lang.String sSchema,
                                  java.lang.String tableName,
                                  java.lang.String[] arrayTableTypes,
                                  DatabaseSession session)
                           throws TelosysException
Return all information about the tables identify by Catalog, Schema, tableName or/and Type in the DataBase identify by the session's connection

Parameters:
sCatalog -
sSchema -
tableName -
arrayTableTypes -
session -
Returns:
DbTable[]
Throws:
TelosysException

getTable

public static DbTable getTable(java.lang.String tableName)
                        throws TelosysException
Return the table, specified by tableName from the current Database

Parameters:
tableName -
Returns:
DbTable
Throws:
TelosysException

getTable

public static DbTable getTable(java.lang.String tableName,
                               int iDatabaseId)
                        throws TelosysException
Return the table, specified by tableName from the specified Database

Parameters:
tableName -
iDatabaseId -
Returns:
DbTable
Throws:
TelosysException

getTable

public static DbTable getTable(java.lang.String tableName,
                               java.sql.Connection con)
                        throws TelosysException
Return the table, specified by tableName from the specified Database

Parameters:
tableName -
con -
Returns:
DbTable
Throws:
TelosysException

getTable

public static DbTable getTable(java.lang.String tableName,
                               DatabaseSession session)
                        throws TelosysException
Return the table, specified by tableName from the specified Database

Parameters:
tableName -
session -
Returns:
DbTable
Throws:
TelosysException

getMetaData

public static java.sql.DatabaseMetaData getMetaData()
                                             throws TelosysException
Return MetaData about the current DataBase

Returns:
DatabaseMetaData
Throws:
TelosysException

getMetaData

public static java.sql.DatabaseMetaData getMetaData(int iDatabaseId)
                                             throws TelosysException
Return MetaData about the DataBase identify by her id iDatabaseId

Parameters:
iDatabaseId -
Returns:
DatabaseMetaData
Throws:
TelosysException

getMetaData

public static java.sql.DatabaseMetaData getMetaData(java.sql.Connection con)
                                             throws TelosysException
Return MetaData about the DataBase identify by her Connection con

Parameters:
con -
Returns:
DatabaseMetaData
Throws:
TelosysException

getMetaData

public static java.sql.DatabaseMetaData getMetaData(DatabaseSession session)
                                             throws TelosysException
Return MetaData about the DataBase identify by the session's connection

Parameters:
session -
Returns:
DatabaseMetaData
Throws:
TelosysException

getSchemas

public static java.lang.String[] getSchemas()
                                     throws TelosysException,
                                            java.sql.SQLException
Return all Schemas of the current DataBase

Returns:
String[]
Throws:
TelosysException
java.sql.SQLException

getSchemas

public static java.lang.String[] getSchemas(int iDatabaseId)
                                     throws TelosysException
Return all Schemas of the DataBase identify by her id iDatabaseId

Returns:
String[]
Throws:
TelosysException

getSchemas

public static java.lang.String[] getSchemas(java.sql.Connection con)
                                     throws TelosysException
Return all Schemas of the DataBase identify by her Connection

Returns:
String[]
Throws:
TelosysException

getSchemas

public static java.lang.String[] getSchemas(DatabaseSession session)
                                     throws TelosysException
Return all Schemas of the DataBase identify by the session's connection

Returns:
String[]
Throws:
TelosysException

getColumns

public static DbColumn[] getColumns(DbTable table)
                             throws TelosysException
Return all columns of the indicated DbTable table, on the current DataBase

Parameters:
table -
Returns:
DbColumn[]
Throws:
TelosysException

getColumns

public static DbColumn[] getColumns(DbTable table,
                                    int iDatabaseId)
                             throws TelosysException
Return all columns of the indicated DbTable table, on the specified DataBase

Parameters:
table -
Returns:
DbColumn[]
Throws:
TelosysException

getColumns

public static DbColumn[] getColumns(DbTable table,
                                    java.sql.Connection con)
                             throws TelosysException
Return all columns of the indicated DbTable table, on the specified DataBase

Parameters:
table -
Returns:
DbColumn[]
Throws:
TelosysException

getColumns

public static DbColumn[] getColumns(DbTable table,
                                    DatabaseSession session)
                             throws TelosysException
Return all columns of the indicated DbTable table, on the specified DataBase

Parameters:
table -
Returns:
DbColumn[]
Throws:
TelosysException

getColumn

public static DbColumn getColumn(java.lang.String columnName,
                                 DbTable table)
                          throws TelosysException
Return the column, specified by columnName, of the indicated table from the current Database

Parameters:
columnName -
table -
Returns:
DbColumn
Throws:
TelosysException

getColumn

public static DbColumn getColumn(java.lang.String columnName,
                                 DbTable table,
                                 int iDatabaseId)
                          throws TelosysException
Return the column, specified by columnName, of the indicated table from the specified Database

Parameters:
columnName -
table -
iDatabaseId -
Returns:
DbColumn
Throws:
TelosysException

getColumn

public static DbColumn getColumn(java.lang.String columnName,
                                 DbTable table,
                                 java.sql.Connection con)
                          throws TelosysException
Return the column, specified by columnName, of the indicated table from the specified Database

Parameters:
columnName -
table -
con -
Returns:
DbColumn
Throws:
TelosysException

getColumn

public static DbColumn getColumn(java.lang.String columnName,
                                 DbTable table,
                                 DatabaseSession session)
                          throws TelosysException
Return the column, specified by columnName, of the indicated table from the specified Database

Parameters:
columnName -
table -
session -
Returns:
DbColumn
Throws:
TelosysException