KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > serversystem > dmlvalidation > triggersystem > StateChange


1 package com.daffodilwoods.daffodildb.server.serversystem.dmlvalidation.triggersystem;
2
3 import com.daffodilwoods.database.general.*;
4 import com.daffodilwoods.database.resource.*;
5 import com.daffodilwoods.database.sqlinitiator.*;
6
7 /**
8  *
9  * <p>Title: State Change </p >
10  * <p>Description: </p>
11  * contains the information for the trigger such as table name , Parameterised condition, column indexes
12  * trigger type and unique row ids.
13  */

14 public class StateChange implements Comparable JavaDoc
15 {
16   QualifiedIdentifier tableName;
17   int[] columns;
18   String JavaDoc triggerType;
19   UniqueParameterisedCondition condition;
20
21   public StateChange( QualifiedIdentifier tableName , UniqueParameterisedCondition condition , int[] columns, String JavaDoc triggerType ) throws DException {
22     this.tableName = tableName ;
23     this.columns = columns;
24     this.condition = condition ;
25     this.triggerType = triggerType;
26   }
27
28
29   /**
30    * @todo
31    * @param object
32    * @return int
33    */

34   public int compareTo( Object JavaDoc object ) {
35      try {
36      if( !(object instanceof StateChange) )
37         throw new DException("DSE237",null);
38      }catch(DException ex){
39         throw new DRuntimeException(ex.getDseCode(),ex.getParameters());
40      }
41
42      if( this.equals(object) )
43         return 0;
44      return -1;
45   }
46 }
47
Popular Tags