KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > serversystem > TriggerExecutionContext


1 package com.daffodilwoods.daffodildb.server.serversystem;
2
3 import java.util.*;
4
5 import com.daffodilwoods.daffodildb.server.serversystem.dmlvalidation.triggersystem.*;
6 import com.daffodilwoods.daffodildb.server.sql99.common.*;
7 import com.daffodilwoods.database.general.*;
8 import com.daffodilwoods.database.resource.*;
9 import com.daffodilwoods.database.sqlinitiator.*;
10 public class TriggerExecutionContext implements _TriggerExecutionContext
11 {
12   ArrayList setOfStateChange ;
13
14   public TriggerExecutionContext() throws DException {
15       setOfStateChange = new ArrayList();
16   }
17
18   public void addStateChange( QualifiedIdentifier tableName , UniqueParameterisedCondition condition , int[] columns , String JavaDoc triggerType ) throws DException {
19     StateChange stateChange = new StateChange( tableName, condition, columns, triggerType );
20     setOfStateChange.add( stateChange );
21     }
22
23   public boolean ValidateStateOfRow( QualifiedIdentifier tableName , UniqueParameterisedCondition condition , int[] columns , String JavaDoc triggerType )throws DException{
24     StateChange stateChange = new StateChange( tableName, condition , columns, triggerType );
25     if( setOfStateChange.size() > 0 ){
26        for( int i=0; i< setOfStateChange.size(); i++ ){
27           if( stateChange.compareTo( (StateChange) setOfStateChange.get(i) ) == 0 )
28               return false;
29        }
30     }
31     return true ;
32   }
33    public void addStateChange(String JavaDoc tableName, ParameterisedCondition condition, int[] columns, String JavaDoc triggerType) throws DException {
34       /**@todo: Implement this com.daffodilwoods.daffodildb.server.serversystem._TriggerExecutionContext method*/
35       throw new java.lang.UnsupportedOperationException JavaDoc("Method addStateChange() not yet implemented.");
36    }
37    public boolean ValidateStateOfRow(String JavaDoc tableName, ParameterisedCondition condition, int[] columns, String JavaDoc triggerType) throws DException {
38       /**@todo: Implement this com.daffodilwoods.daffodildb.server.serversystem._TriggerExecutionContext method*/
39       throw new java.lang.UnsupportedOperationException JavaDoc("Method ValidateStateOfRow() not yet implemented.");
40    }
41
42 }
43
Popular Tags