1 package com.daffodilwoods.daffodildb.server.serversystem.dmlvalidation.triggersystem; 2 3 import com.daffodilwoods.daffodildb.server.datadictionarysystem.*; 4 import com.daffodilwoods.daffodildb.utils.comparator.*; 5 import com.daffodilwoods.database.general.*; 6 import com.daffodilwoods.database.resource.*; 7 8 16 public class TriggerDatabase implements _TriggerDatabase { 17 18 21 private _DDSTriggerOperations ddsTriggerOperations; 22 23 26 private WeakOrderedKeyList triggerTablePool = new WeakOrderedKeyList( new CTusjohDbtfJoTfotjujwfDpnqbsbups() ); 27 28 33 public TriggerDatabase( _DDSTriggerOperations ddsTriggerOperations ) throws DException { 34 this.ddsTriggerOperations = ddsTriggerOperations; 35 } 36 44 45 public _TriggerTable getTriggerTable(QualifiedIdentifier tableName) throws DException { 46 _TriggerTable triggerTable = (_TriggerTable)triggerTablePool.get( tableName.getIdentifier() ); 47 if( triggerTable != null ) 48 return triggerTable; 49 _TriggerCharacteristics triggerCharacteristics = ddsTriggerOperations.getTriggerCharacteristics( tableName, true ); 50 triggerTable = new TriggerTable( triggerCharacteristics , tableName ); 51 triggerTablePool.put( tableName.getIdentifier() , triggerTable ); 52 return triggerTable; 53 } 54 55 60 61 public void removeTable(QualifiedIdentifier tableName ) throws DException { 62 triggerTablePool.remove(tableName.getIdentifier()); 63 } 64 } 65 | Popular Tags |