AdventNet Web NMS 4 API Specification

com.adventnet.nms.db
Interface JdbcAPI

All Superinterfaces:
CommonModuleAPI, java.rmi.Remote

public interface JdbcAPI
extends java.rmi.Remote, CommonModuleAPI

A Remote API which contains methods related to Database tables. Mostly they are RelationalUtil methods.

Since:
Web NMS 2.3
See Also:
Remote

Method Summary
 boolean doesThisColumnExist(java.lang.String tableName, java.lang.String column)
          Returns true if the specified column is exists in the specified table.
 java.lang.String getAlias(java.lang.String columnName)
          This method gets the alias for the given column name.
 java.lang.String getAntiAlias(java.lang.String alias)
          This method gets the column name for the given alias.
 java.util.Vector getClassnamesBelongingToModule(java.lang.String module)
          Returns class names belonging to the specified module.
 java.util.Vector getColumnNamesOfTable(java.lang.String tableName)
          Gets the column names for the given table.
 java.lang.String getDatabaseName()
          Returns the name of the Database product in use.
 java.util.Vector getNumericColumnsOfTable(java.lang.String tableName)
          Gets the Numeric columns of the given Table and returns a Vector containing the same.
 java.util.Vector getPrimaryKeysOfTable(java.lang.String tableName)
          Gets the primary keys of the given table and returns a vector containing the same.
 java.util.Hashtable getTableHierarchy(java.lang.String module)
          Returns a Hashtable containing table name vs table hierarchy, where table hierarchy is the String array representing hierarchy of tables starting from the base table of the module.
 java.lang.String[] getTableHierarchy(java.lang.String module, java.lang.String tableName)
          Returns a String array of table names representing the hierarchy of the given table.
 java.lang.String getTableNameForClass(java.lang.String className)
          Gets the Table name associated with the given class.
 java.util.Vector getTablesBelongingToModule(java.lang.String module)
          Gets the list of database table names which are defined for this module.
 boolean isNumericField(java.lang.String tableName, java.lang.String column)
          Returns true if this object is numeric field.
 

Method Detail

getDatabaseName

public java.lang.String getDatabaseName()
                                 throws java.rmi.RemoteException
Returns the name of the Database product in use.
Returns:
name of the database product
Throws:
java.rmi.RemoteException - if an error occurs

getTablesBelongingToModule

public java.util.Vector getTablesBelongingToModule(java.lang.String module)
                                            throws java.rmi.RemoteException
Gets the list of database table names which are defined for this module.
Parameters:
module - the name of the module for which the table names list is required
Returns:
a list of table names
Throws:
java.rmi.RemoteException - if an error occurs

getClassnamesBelongingToModule

public java.util.Vector getClassnamesBelongingToModule(java.lang.String module)
                                                throws java.rmi.RemoteException
Returns class names belonging to the specified module.
Parameters:
module - name of the module for which the list of classes should be returned
Returns:
list of class names belonging to the module
Throws:
java.rmi.RemoteException - if an error occurs

getTableNameForClass

public java.lang.String getTableNameForClass(java.lang.String className)
                                      throws java.rmi.RemoteException
Gets the Table name associated with the given class.
Parameters:
className - the Class for which the table Name is required
Returns:
the Table Name
Throws:
java.rmi.RemoteException - if an error occurs

getAlias

public java.lang.String getAlias(java.lang.String columnName)
                          throws java.rmi.RemoteException
This method gets the alias for the given column name. It returns the alias if the given column name exists , otherwise returns the same column name.
Parameters:
columnName - the column name for which alias is required.
Returns:
the alias
Throws:
java.rmi.RemoteException - if an error occurs

getAntiAlias

public java.lang.String getAntiAlias(java.lang.String alias)
                              throws java.rmi.RemoteException
This method gets the column name for the given alias. It returns the column name if the alias exists , otherwise returns the same alias.
Parameters:
alias - the alias for which the column name is required.
Returns:
the column name
Throws:
java.rmi.RemoteException - if an error occurs

getColumnNamesOfTable

public java.util.Vector getColumnNamesOfTable(java.lang.String tableName)
                                       throws java.rmi.RemoteException
Gets the column names for the given table. It returns a Vector containing the column name and is null, if the table name is null or if it does not contain any column.
Parameters:
tableName - Table for which the column names are required
Returns:
a vector containing the column names
Throws:
java.rmi.RemoteException - if an error occurs

getNumericColumnsOfTable

public java.util.Vector getNumericColumnsOfTable(java.lang.String tableName)
                                          throws java.rmi.RemoteException
Gets the Numeric columns of the given Table and returns a Vector containing the same.
Parameters:
tableName - table for which the numeric column is required
Returns:
a vector containing the numeric column name
Throws:
java.rmi.RemoteException - if an error occurs

getPrimaryKeysOfTable

public java.util.Vector getPrimaryKeysOfTable(java.lang.String tableName)
                                       throws java.rmi.RemoteException
Gets the primary keys of the given table and returns a vector containing the same.
Parameters:
tablename - table for which the primary keys are required
Returns:
a vector containing the primary keys.
Throws:
java.rmi.RemoteException - if an error occurs

isNumericField

public boolean isNumericField(java.lang.String tableName,
                              java.lang.String column)
                       throws java.rmi.RemoteException
Returns true if this object is numeric field.
Parameters:
tableName - a String table name value
column - a String column name value
Returns:
a boolean value true, if this object is numeric field.
Throws:
java.rmi.RemoteException - if an error occurs

doesThisColumnExist

public boolean doesThisColumnExist(java.lang.String tableName,
                                   java.lang.String column)
                            throws java.rmi.RemoteException
Returns true if the specified column is exists in the specified table.
Parameters:
tableName - a String table name.
column - a String columns name.
Returns:
a boolean value true, if the specified column is exists.
Throws:
java.rmi.RemoteException - if an error occurs

getTableHierarchy

public java.util.Hashtable getTableHierarchy(java.lang.String module)
                                      throws java.rmi.RemoteException
Returns a Hashtable containing table name vs table hierarchy, where table hierarchy is the String array representing hierarchy of tables starting from the base table of the module.
Parameters:
module - the name of the module for which the hierarchy information is needed.
Returns:
a Hashtable containing String array of table names representing the hierarchy of each table in the module.
Throws:
java.rmi.RemoteException - if an error occurs

getTableHierarchy

public java.lang.String[] getTableHierarchy(java.lang.String module,
                                            java.lang.String tableName)
                                     throws java.rmi.RemoteException
Returns a String array of table names representing the hierarchy of the given table.
Parameters:
module - the name of the module to which the table belongs to.
tableName - the name of the table for which the hierarchy is required.
Returns:
the table names representing the hierarchy of the given table.
Throws:
java.rmi.RemoteException - if an error occurs

AdventNet Web NMS 4 API Specification