SPT RWT Application API

com.sptci.rwt
Class OracleTriggerAnalyser

java.lang.Object
  extended by com.sptci.rwt.Analyser
      extended by com.sptci.rwt.AbstractTriggerAnalyser
          extended by com.sptci.rwt.OracleTriggerAnalyser

 class OracleTriggerAnalyser
extends AbstractTriggerAnalyser

An analyser for analysing trigger type objects in the database.

© Copyright 2007 Sans Pareil Technologies, Inc.

Since:
Version 1.2
Version:
$Id: OracleTriggerAnalyser.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-11-02

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sptci.rwt.Analyser
Analyser.CatalogueSchema
 
Field Summary
 
Fields inherited from class com.sptci.rwt.Analyser
logger, manager
 
Constructor Summary
OracleTriggerAnalyser(ConnectionManager manager)
          Create a new instance of the class using the specified connection manager.
 
Method Summary
protected  void createMetaData(ResultSet resultSet, Collection<TriggerMetaData> collection, MetaData... parameters)
          Create a new metadata object out of the data in the specified result set.
protected  PreparedStatement createStatement(Connection connection, MetaData... parameters)
          Create a PreparedStatement based on the parameters passed in.
protected  TriggerMetaData.Event getEvent(String manipulation)
          Map the event_manipulation field value to an appropriate TriggerMetaData.Event type.
protected  TriggerMetaData.Orientation getOrientation(String action)
          Map the action_orientation field value to an appropriate TriggerMetaData.Orientation type.
protected  TriggerMetaData.Timing getTiming(String condition)
          Map the condition_timing field value to an appropriate TriggerMetaData.Timing type.
 
Methods inherited from class com.sptci.rwt.AbstractTriggerAnalyser
analyse
 
Methods inherited from class com.sptci.rwt.Analyser
getNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleTriggerAnalyser

OracleTriggerAnalyser(ConnectionManager manager)
Create a new instance of the class using the specified connection manager.

Parameters:
manager - The manager for obtaining database connections.
Method Detail

createStatement

protected PreparedStatement createStatement(Connection connection,
                                            MetaData... parameters)
                                     throws SQLException
Create a PreparedStatement based on the parameters passed in.

Specified by:
createStatement in class AbstractTriggerAnalyser
Parameters:
connection - The database connection to use.
parameters - The array of SchemaMetaData and TableMetaData objects.
Returns:
PreparedStatement The initialised statement that can be executed.
Throws:
SQLException - If errors are encountered while creating the statement.
See Also:
Analyser.getNames(com.sptci.rwt.MetaData)

createMetaData

protected void createMetaData(ResultSet resultSet,
                              Collection<TriggerMetaData> collection,
                              MetaData... parameters)
                       throws SQLException
Create a new metadata object out of the data in the specified result set.

Specified by:
createMetaData in class AbstractTriggerAnalyser
Parameters:
resultSet - The result set from which to create the metadata.
collection - The collection to which the metadata objects are to be added.
parameters - The array of RootMetaData and TableMetaData objects.
Throws:
SQLException - If errors are encountered while fetching the data from the result set.
See Also:
getEvent(java.lang.String), getOrientation(java.lang.String)

getEvent

protected TriggerMetaData.Event getEvent(String manipulation)
Map the event_manipulation field value to an appropriate TriggerMetaData.Event type.

Parameters:
manipulation - The value to be mapped.
Returns:
The appropriate enumerated type.

getOrientation

protected TriggerMetaData.Orientation getOrientation(String action)
Map the action_orientation field value to an appropriate TriggerMetaData.Orientation type.

Parameters:
action - The value to be mapped.
Returns:
The appropriate enumerated type.

getTiming

protected TriggerMetaData.Timing getTiming(String condition)
Map the condition_timing field value to an appropriate TriggerMetaData.Timing type.

Parameters:
condition - The value to be mapped.
Returns:
The appropriate enumerated type.

SPT RWT Application API