Java Doc for MetaDataValues.java in  » Database-Client » executequery » org » executequery » databasemediators » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » executequery » org.executequery.databasemediators 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.executequery.databasemediators.MetaDataValues

MetaDataValues
public class MetaDataValues implements ConnectionListener(Code)
This class provides access to the current connection's database meta data. Each method performs specific requests as may be required by the calling object to display the relevant data usually within a table or similar widget. Depending on the calling class and its requirements, the connection to the database may be left open thereby removing the overhead associated with connection retrieval - as in the case of the Database Browser which makes frequent database access requests. Other objects not requiring a dedicated connection simply choose not to maintain one and make their requests as required.
author:
   Takis Diakoumis
version:
   $Revision: 1.15 $


Field Summary
final public static  intNUMERIC_FUNCTIONS
    
final public static  intSTRING_FUNCTIONS
    
final public static  intTIME_DATE_FUNCTIONS
    

Constructor Summary
public  MetaDataValues()
    

Constructs a new instance where the conection is returned following each request.

public  MetaDataValues(boolean keepAlive)
    

Constructs a new instance where the conection is returned following each request only if the passed boolean value is 'false'.

public  MetaDataValues(DatabaseConnection databaseConnection, boolean keepAlive)
    

Method Summary
public  voidcloseConnection()
     Closes the open connection and releases all resources attached to it.
public  voidconnected(ConnectionEvent connectionEvent)
     Indicates a connection has been established.
public  voiddisconnected(ConnectionEvent connectionEvent)
     Indicates a connection has been closed.
public  StringgetCatalogName()
    
public  ColumnData[]getColumnMetaData(String tableName, String schemaName)
    

Retrieves complete and detailed meta data for all columns within the specified table and schema.

The meta data will include data type, size and all primary and foreign keys for the specified table.

public  ColumnData[]getColumnMetaData(String catalog, String schema, String name)
    
public  Vector<ColumnData>getColumnMetaDataVector(String name, String schema, String catalog)
    
public  Vector<ColumnData>getColumnMetaDataVector(String name, String schema)
    

Retrieves the complete column meta data for the specified database table and schema.

public  String[]getColumnNames(String table, String schema)
    

Retrieves the column names for the specified database table and schema as an array.

public  Vector<String>getColumnNamesVector(String table, String schema)
    

Retrieves the column names for the specified database table and schema as a Vector object.

public  MapgetColumnProperties(String schema, String table, String column)
    

Retrieves the column names for the specified database table and schema as an array.

public  StringgetDataSourceName()
    

Retrieves the connected data source name.

public  String[]getDataTypesArray()
    

Retrieves the database SQL data type names only.

public  ResultSetgetDataTypesResultSet()
    

Retrieves the database SQL data types as a ResultSet object.

public  String[]getDatabaseKeywords()
    

Retrieves the connected databases SQL keyword list via a call to the DatabaseMetaData object's getSQLKeywords() method.

public  StringgetDatabaseProductName()
     Retrieves the database product name from the connection's meta data.
public  StringgetDatabaseProductNameVersion()
     Retrieves the database product version from the connection's meta data.
public  StringgetDatabaseProductVersion()
     Retrieves the database product version from the connection's meta data.
public  HashtablegetDatabaseProperties()
    

Retrieves key/value type pairs using the Reflection API to call and retrieve values from the connection's meta data object's methods and variables.

public  VectorgetDatabaseTablesVector()
    

Retrieves the currently connected schema's database table names within a Vector.

public  String[]getExportedKeyTables(String catalog, String schema, String table)
    
public  StringgetHost()
    

Retrieves the connected host name.

public  ListgetHostedCatalogSchemas()
    
public  Vector<String>getHostedCatalogsVector()
     Retrieves the current connection's hosted schema names.
public  Vector<String>getHostedSchemasVector()
    

Retrieves the current connection's hosted schema names.

public  String[]getImportedKeyTables(String catalog, String schema, String table)
    
public  intgetPort()
    

Retrieves the connected port number.

public  TablePrivilege[]getPrivileges(String catalog, String schema, String table)
    
public  DatabaseProceduregetProcedureColumns(String schema, String name)
    
public  DatabaseProceduregetProcedureColumns(String catalog, String schema, String name)
    
public  String[]getProcedureNames(String catalog, String schema, String name)
    
public  StringgetProcedureTerm()
     Returns the procedure term used in the current connected database.
public  DatabaseProcedure[]getProcedures(String schema, String[] names)
    
public  DatabaseProcedure[]getProcedures(String catalog, String schema, String[] names)
    
public  StringgetSchemaName()
     Retrieves the connected schema name.
public  Vector<String>getSchemaTables(String schema)
    

Retrieves the specified schema's database table names within a Vector.

public  DatabaseProcedure[]getStoredObjects(String schema, String[] types)
    
public  DatabaseProcedure[]getStoredObjects(String catalog, String schema, String[] types)
    
public  String[]getSystemFunctions(int type)
    
public  ResultSetgetTableData(String schema, String table)
     Retrieves the data in its entirety from the specified table using SELECT * FROM table_name.
public  intgetTableDataRowCount(String schema, String table)
     Retrieves the table data row count for the specified table.
public  Vector<ColumnIndex>getTableIndexes(String catalog, String schema, String table)
     Retrieves a Vector of ColumnIndexData objects containing all relevant information on the table indexes for the specified table.
public  ResultSetgetTableMetaData(String catalog, String schema, String name)
     Returns the table column meta data as a result set.
public  String[]getTableTypes()
    
public  DatabaseObject[]getTables(String catalog, String schema, String[] types)
    
public  String[]getTables(String catalog, String schema, String metaType)
    
public  StringgetURL()
    

Retrieves the connected JDBC URL.

public  StringgetUser()
    

Retrieves the connected user.

public  booleanhasStoredObjects(String schema, String[] types)
    
public  booleanhasStoredObjects(String catalog, String schema, String[] types)
    
public  voidrecycleConnection(DatabaseConnection dc)
     Recycles the specified connection object.
public  voidsetDatabaseConnection(DatabaseConnection dc)
     Sets the database connection object to that specified.

Field Detail
NUMERIC_FUNCTIONS
final public static int NUMERIC_FUNCTIONS(Code)



STRING_FUNCTIONS
final public static int STRING_FUNCTIONS(Code)



TIME_DATE_FUNCTIONS
final public static int TIME_DATE_FUNCTIONS(Code)




Constructor Detail
MetaDataValues
public MetaDataValues()(Code)

Constructs a new instance where the conection is returned following each request.




MetaDataValues
public MetaDataValues(boolean keepAlive)(Code)

Constructs a new instance where the conection is returned following each request only if the passed boolean value is 'false'. Otherwise the connection is initialised and maintained following the first request and reused for any subsequent requests.
Parameters:
  whether - to keep the connection open




MetaDataValues
public MetaDataValues(DatabaseConnection databaseConnection, boolean keepAlive)(Code)




Method Detail
closeConnection
public void closeConnection()(Code)
Closes the open connection and releases all resources attached to it.



connected
public void connected(ConnectionEvent connectionEvent)(Code)
Indicates a connection has been established.
Parameters:
  the - encapsulating event



disconnected
public void disconnected(ConnectionEvent connectionEvent)(Code)
Indicates a connection has been closed.
Parameters:
  the - encapsulating event



getCatalogName
public String getCatalogName()(Code)



getColumnMetaData
public ColumnData[] getColumnMetaData(String tableName, String schemaName) throws DataSourceException(Code)

Retrieves complete and detailed meta data for all columns within the specified table and schema.

The meta data will include data type, size and all primary and foreign keys for the specified table. The results of this method are specifically displayed within the Database Browser feature for each selected table from the browser's tree structure.
Parameters:
  the - table name
Parameters:
  the - schema name the column meta data as a ColumnData array




getColumnMetaData
public ColumnData[] getColumnMetaData(String catalog, String schema, String name) throws DataSourceException(Code)



getColumnMetaDataVector
public Vector<ColumnData> getColumnMetaDataVector(String name, String schema, String catalog) throws DataSourceException(Code)



getColumnMetaDataVector
public Vector<ColumnData> getColumnMetaDataVector(String name, String schema) throws DataSourceException(Code)

Retrieves the complete column meta data for the specified database table and schema.

Each column and associated data is stored within ColumnData objects and added to the Vector object to be returned.
Parameters:
  the - database table name
Parameters:
  the - database schema name the table column meta data




getColumnNames
public String[] getColumnNames(String table, String schema) throws DataSourceException(Code)

Retrieves the column names for the specified database table and schema as an array.
Parameters:
  the - database table name
Parameters:
  the - database schema name the column names array




getColumnNamesVector
public Vector<String> getColumnNamesVector(String table, String schema) throws DataSourceException(Code)

Retrieves the column names for the specified database table and schema as a Vector object.
Parameters:
  the - database table name
Parameters:
  the - database schema name the column names Vector




getColumnProperties
public Map getColumnProperties(String schema, String table, String column) throws DataSourceException(Code)

Retrieves the column names for the specified database table and schema as an array.
Parameters:
  the - database table name
Parameters:
  the - database schema name the column name




getDataSourceName
public String getDataSourceName()(Code)

Retrieves the connected data source name. the data source name




getDataTypesArray
public String[] getDataTypesArray() throws DataSourceException(Code)

Retrieves the database SQL data type names only. the SQL data type names within an array




getDataTypesResultSet
public ResultSet getDataTypesResultSet() throws DataSourceException(Code)

Retrieves the database SQL data types as a ResultSet object.

This will be typically used to display the complete data types meta data retrieved from the JDBC driver. the SQL data types




getDatabaseKeywords
public String[] getDatabaseKeywords() throws DataSourceException(Code)

Retrieves the connected databases SQL keyword list via a call to the DatabaseMetaData object's getSQLKeywords() method.

The retrieved keywords are stored within a 2-dimensional array for display with the relevant header within a table. the schema names array




getDatabaseProductName
public String getDatabaseProductName() throws DataSourceException(Code)
Retrieves the database product name from the connection's meta data. the database product name



getDatabaseProductNameVersion
public String getDatabaseProductNameVersion() throws DataSourceException(Code)
Retrieves the database product version from the connection's meta data. the database product version



getDatabaseProductVersion
public String getDatabaseProductVersion() throws DataSourceException(Code)
Retrieves the database product version from the connection's meta data. the database product version



getDatabaseProperties
public Hashtable getDatabaseProperties() throws DataSourceException(Code)

Retrieves key/value type pairs using the Reflection API to call and retrieve values from the connection's meta data object's methods and variables.

The values are returned within a 2-dimensional array of key/value pairs. the database properties as key/value pairs




getDatabaseTablesVector
public Vector getDatabaseTablesVector() throws DataSourceException(Code)

Retrieves the currently connected schema's database table names within a Vector. the table names




getExportedKeyTables
public String[] getExportedKeyTables(String catalog, String schema, String table) throws DataSourceException(Code)



getHost
public String getHost()(Code)

Retrieves the connected host name. the host name




getHostedCatalogSchemas
public List getHostedCatalogSchemas() throws DataSourceException(Code)



getHostedCatalogsVector
public Vector<String> getHostedCatalogsVector() throws DataSourceException(Code)
Retrieves the current connection's hosted schema names. The names are stored within a Vector object as single String objects. the schema names within a Vector



getHostedSchemasVector
public Vector<String> getHostedSchemasVector() throws DataSourceException(Code)

Retrieves the current connection's hosted schema names. The names are stored within a Vector object as single String objects. the schema names within a Vector




getImportedKeyTables
public String[] getImportedKeyTables(String catalog, String schema, String table) throws DataSourceException(Code)



getPort
public int getPort()(Code)

Retrieves the connected port number. the port number




getPrivileges
public TablePrivilege[] getPrivileges(String catalog, String schema, String table) throws DataSourceException(Code)



getProcedureColumns
public DatabaseProcedure getProcedureColumns(String schema, String name) throws DataSourceException(Code)



getProcedureColumns
public DatabaseProcedure getProcedureColumns(String catalog, String schema, String name) throws DataSourceException(Code)



getProcedureNames
public String[] getProcedureNames(String catalog, String schema, String name) throws DataSourceException(Code)



getProcedureTerm
public String getProcedureTerm() throws DataSourceException(Code)
Returns the procedure term used in the current connected database. the procedure term



getProcedures
public DatabaseProcedure[] getProcedures(String schema, String[] names) throws DataSourceException(Code)



getProcedures
public DatabaseProcedure[] getProcedures(String catalog, String schema, String[] names) throws DataSourceException(Code)



getSchemaName
public String getSchemaName()(Code)
Retrieves the connected schema name. the schema name



getSchemaTables
public Vector<String> getSchemaTables(String schema) throws DataSourceException(Code)

Retrieves the specified schema's database table names within a Vector. the table names




getStoredObjects
public DatabaseProcedure[] getStoredObjects(String schema, String[] types) throws DataSourceException(Code)



getStoredObjects
public DatabaseProcedure[] getStoredObjects(String catalog, String schema, String[] types) throws DataSourceException(Code)



getSystemFunctions
public String[] getSystemFunctions(int type) throws DataSourceException(Code)



getTableData
public ResultSet getTableData(String schema, String table) throws DataSourceException(Code)
Retrieves the data in its entirety from the specified table using SELECT * FROM table_name.
Parameters:
  schema - - the schema name (may be null)
Parameters:
  table - - the table name the table data



getTableDataRowCount
public int getTableDataRowCount(String schema, String table) throws DataSourceException(Code)
Retrieves the table data row count for the specified table.
Parameters:
  schema - - the schema name (may be null)
Parameters:
  table - - the table name the data row count



getTableIndexes
public Vector<ColumnIndex> getTableIndexes(String catalog, String schema, String table) throws DataSourceException(Code)
Retrieves a Vector of ColumnIndexData objects containing all relevant information on the table indexes for the specified table.
Parameters:
  the - table's name a Vector of ColumnIndexData objects



getTableMetaData
public ResultSet getTableMetaData(String catalog, String schema, String name) throws DataSourceException(Code)
Returns the table column meta data as a result set.
Parameters:
  the - table name
Parameters:
  the - schema name
Parameters:
  the - table name



getTableTypes
public String[] getTableTypes() throws DataSourceException(Code)



getTables
public DatabaseObject[] getTables(String catalog, String schema, String[] types) throws DataSourceException(Code)



getTables
public String[] getTables(String catalog, String schema, String metaType) throws DataSourceException(Code)



getURL
public String getURL()(Code)

Retrieves the connected JDBC URL. the JDBC URL




getUser
public String getUser()(Code)

Retrieves the connected user. the user name




hasStoredObjects
public boolean hasStoredObjects(String schema, String[] types) throws DataSourceException(Code)



hasStoredObjects
public boolean hasStoredObjects(String catalog, String schema, String[] types) throws DataSourceException(Code)



recycleConnection
public void recycleConnection(DatabaseConnection dc) throws DataSourceException(Code)
Recycles the specified connection object.
Parameters:
  dc - - the connection to be recycled



setDatabaseConnection
public void setDatabaseConnection(DatabaseConnection dc)(Code)
Sets the database connection object to that specified.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.