edu.wpi.cs.DSRG.xmldb.restructuring
Class OracleDataDictionary

java.lang.Object
  |
  +--edu.wpi.cs.DSRG.xmldb.restructuring.OracleDataDictionary

public class OracleDataDictionary
extends java.lang.Object

OracleDataDictionary.java will encapsulate the Oracle' data dictionary. The major purpose of this class will query on the Oracle's data dictionary table, and get the related schema information back.


Field Summary
(package private)  JDBCClient client
           
(package private)  java.sql.PreparedStatement p_stmt
           
 
Constructor Summary
(package private) OracleDataDictionary()
          OracleDataDictionary constructor comment.
  OracleDataDictionary(JDBCClient jdbc)
          This constructor use an existing JDBC connection.
 
Method Summary
 java.util.Vector getAttributesOf(java.lang.String relation_name)
          The method getAttributesOf() will return all the attributes of a given relation name.
 java.lang.String toString()
          The method toString() returns a string that represents the value of this object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

client

JDBCClient client

p_stmt

java.sql.PreparedStatement p_stmt
Constructor Detail

OracleDataDictionary

OracleDataDictionary()
OracleDataDictionary constructor comment.

OracleDataDictionary

public OracleDataDictionary(JDBCClient jdbc)
                     throws java.lang.Exception
This constructor use an existing JDBC connection. An Exception will be throwed if the JDBC connection is null. Based on this connection, it will prepare a statement that is going to query the data dictionary tables.
Parameters:
jdbc - JDBCClient Existing JDBC connection
Method Detail

getAttributesOf

public java.util.Vector getAttributesOf(java.lang.String relation_name)
The method getAttributesOf() will return all the attributes of a given relation name. If the relation doesn't exist or has no attribute, an empty result will be returned. Otherwise, it will return a list of attribute names (in type of string) in a vector. The relation_name will be directly used in the search query. So, it following all the oracle encoding. In that sense, the name cannot containt "'" character. Also, the '%' will used as wildcards.
Parameters:
relation_name - String name of relation
Returns:
a vector containing all the attribute names

toString

public java.lang.String toString()
The method toString() returns a string that represents the value of this object.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the receiver