Top Fields Constructors Methods
org.apache.derby.impl.tools.dblook

public Class DB_Trigger

extends Object
Class Inheritance
Imports
java.sql.Connection, .Statement, .ResultSet, .SQLException, org.apache.derby.tools.dblook

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static String

Returns:

The DDL for the current trigger is returned as a String.
createTrigger
(String
Name of the trigger.
trigName
,
String
Name of the table on which the trigger fires.
tableName
,
String
The WHEN clause text (possibly null).
whenClause
,
ResultSet
Information about the trigger.
aTrig
)

Generate DDL for a specific trigger.

public static void
doTriggers(Connection
Connection to the source database.
conn
,
boolean
Tells whether the database supports the trigger WHEN clause.
supportsWhenClause
)

Generate the DDL for all triggers in a given database.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EVENTback to summary
private static final String EVENT
FIRINGTIMEback to summary
private static final String FIRINGTIME
NEWREFERENCINGNAMEback to summary
private static final String NEWREFERENCINGNAME
OLDREFERENCINGNAMEback to summary
private static final String OLDREFERENCINGNAME
REFERENCEDCOLUMNSback to summary
private static final String REFERENCEDCOLUMNS
REFERENCINGNEWback to summary
private static final String REFERENCINGNEW
REFERENCINGOLDback to summary
private static final String REFERENCINGOLD
SCHEMAIDback to summary
private static final String SCHEMAID
TABLEIDback to summary
private static final String TABLEID
TRIGGERDEFINITIONback to summary
private static final String TRIGGERDEFINITION
TRIGGERNAMEback to summary
private static final String TRIGGERNAME
TYPEback to summary
private static final String TYPE
WHENCLAUSETEXTback to summary
private static final String WHENCLAUSETEXT

Constructor Detail

DB_Triggerback to summary
public DB_Trigger()

Method Detail

createTriggerback to summary
private static String createTrigger(String trigName, String tableName, String whenClause, ResultSet aTrig) throws SQLException

Generate DDL for a specific trigger.

Parameters
trigName:String

Name of the trigger.

tableName:String

Name of the table on which the trigger fires.

whenClause:String

The WHEN clause text (possibly null).

aTrig:ResultSet

Information about the trigger.

Returns:String

The DDL for the current trigger is returned as a String.

doTriggersback to summary
public static void doTriggers(Connection conn, boolean supportsWhenClause) throws SQLException

Generate the DDL for all triggers in a given database.

Parameters
conn:Connection

Connection to the source database.

supportsWhenClause:boolean

Tells whether the database supports the trigger WHEN clause.