| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteasik.sketch.util.Export.Constraints.ExportTriggerFormatter
public class ExportTriggerFormatter
A class to format all triggers for SQL exportation. There are three different types of triggers which are created: insert, update, and delete triggers.
| Field Summary | |
|---|---|
private  java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> | 
_afterInsertProcedures
Hash map of all after insert procedures, indexed by the table to which they apply  | 
private  java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> | 
_beforeDeleteProcedures
Hash map of all before delete procedures, indexed by the table to which they apply  | 
private  java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> | 
_beforeInsertProcedures
Hash map of all before insert procedures, indexed by the table to which they apply  | 
private  java.util.ArrayList<java.lang.String> | 
_triggerStrings
List of all trigger strings formatted for SQL  | 
static java.lang.String | 
AFTER_INSERT_TIME
SQL statement to set trigger to activate after insert  | 
static java.lang.String | 
BEFORE_DELETE_TIME
SQL statement to set trigger to activate before delete  | 
static java.lang.String | 
BEFORE_INSERT_TIME
SQL statement to set trigger to activate before insert  | 
| Constructor Summary | |
|---|---|
ExportTriggerFormatter()
Constructor.  | 
|
| Method Summary | |
|---|---|
private  void | 
addTimeTrigger(java.lang.String time,
               java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> triggers,
               ExportConstraint c)
Records constraint to be activated at the given time.  | 
 void | 
addTrigger(ExportConstraint con)
Adds information about the requirement for a trigger.  | 
 java.util.ArrayList<java.lang.String> | 
getAllTriggers()
Returns an arraylist of all trigger strings.  | 
private  void | 
setTimeTriggers(java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> triggers,
                java.lang.String name,
                java.lang.String time,
                java.lang.String procVar)
Sets all triggers based on the  | 
 void | 
setTriggers()
Sets all triggers by determining all procedures that must be called from inside a each respective trigger.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String BEFORE_INSERT_TIME
public static final java.lang.String AFTER_INSERT_TIME
public static final java.lang.String BEFORE_DELETE_TIME
private java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> _beforeInsertProcedures
private java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> _afterInsertProcedures
private java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> _beforeDeleteProcedures
private java.util.ArrayList<java.lang.String> _triggerStrings
| Constructor Detail | 
|---|
public ExportTriggerFormatter()
| Method Detail | 
|---|
public void setTriggers()
public void addTrigger(ExportConstraint con)
con - The constraint for which a trigger must be enforced.public java.util.ArrayList<java.lang.String> getAllTriggers()
private void addTimeTrigger(java.lang.String time,
                            java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> triggers,
                            ExportConstraint c)
time - The time at which the constraint should be enforcedtriggers - The current hash map of triggers, specific for that time.c - The constraint to be added to the hash map of triggers
private void setTimeTriggers(java.util.HashMap<java.lang.String,java.util.LinkedList<ExportConstraint>> triggers,
                             java.lang.String name,
                             java.lang.String time,
                             java.lang.String procVar)
triggers - The triggers which need to be setname - The unique name of the triggertime - The time at which the trigger is to be calledprocVar - The variables which must be passed when formatting the 
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||