Java Doc for TriggerDescriptor.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » sql » dictionary » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.sql.dictionary 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.sql.dictionary.TupleDescriptor
      org.apache.derby.iapi.sql.dictionary.TriggerDescriptor

TriggerDescriptor
public class TriggerDescriptor extends TupleDescriptor implements UniqueSQLObjectDescriptor,Provider,Dependent,Formatable(Code)
A trigger.

We are dependent on TableDescriptors, SPSDescriptors (for our WHEN clause and our action). Note that we don't strictly need to be dependent on out SPSes because we could just disallow anyone from dropping an sps of type 'T', but to keep dependencies uniform, we'll do be dependent.

We are a provider for DML (PreparedStatements or SPSes) The public methods for this class are:

  1. getUUID
  2. getName
  3. getSchemaDescriptor
  4. public boolean listensForEvent(int event);
  5. public int getTriggerEventMask();
  6. public Timestamp getCreationTimestamp();
  7. public boolean isBeforeTrigger();
  8. public boolean isRowTrigger();
  9. public UUID getActionId();
  10. public SPSDescriptor getActionSPS();
  11. public UUID getWhenClauseId();
  12. public SPSDescriptor getWhenClauseSPS()
  13. public TableDescriptor getTableDescriptor()
  14. public ReferencedColumns getReferencedColumnsDescriptor()
  15. public int[] getReferencedCols();
  16. public boolean isEnabled();
  17. public void setEnabled();
  18. public void setDisabled();
  19. public boolean needsToFire(int stmtType, int[] modifiedCols)
  20. public String getTriggerDefinition();
  21. public boolean getReferencingOld();
  22. public boolean getReferencingNew();
  23. public String getOldReferencingName();
  24. public String getNewReferencingName();

author:
   Jamie


Field Summary
final public static  intSYSTRIGGERS_STATE_FIELD
    
final public static  intTRIGGER_EVENT_DELETE
    
final public static  intTRIGGER_EVENT_INSERT
    
final public static  intTRIGGER_EVENT_UPDATE
    

Constructor Summary
public  TriggerDescriptor()
    
public  TriggerDescriptor(DataDictionary dataDictionary, SchemaDescriptor sd, UUID id, String name, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor td, UUID whenSPSId, UUID actionSPSId, Timestamp creationTimestamp, int[] referencedCols, String triggerDefinition, boolean referencingOld, boolean referencingNew, String oldReferencingName, String newReferencingName)
     Constructor.

Method Summary
public  UUIDgetActionId()
    
public  SPSDescriptorgetActionSPS(LanguageConnectionContext lcc)
    
public  StringgetClassType()
     Get the provider's type.
public  TimestampgetCreationTimestamp()
     Get the time that this trigger was created.
protected  DataDictionarygetDataDictionary()
    
public  DependableFindergetDependableFinder()
    
public  StringgetDescriptorName()
    
public  StringgetDescriptorType()
    
public  StringgetName()
    
public  StringgetNewReferencingName()
     Get the new Referencing name, if any, from the REFERENCING clause.
public  UUIDgetObjectID()
    
public  StringgetObjectName()
     Return the name of this Provider.
public  StringgetOldReferencingName()
     Get the old Referencing name, if any, from the REFERENCING clause.
public  int[]getReferencedCols()
    
public  booleangetReferencingNew()
     Get whether or not NEW was replaced in the REFERENCING clause.
public  booleangetReferencingOld()
     Get whether or not OLD was replaced in the REFERENCING clause.
public  SchemaDescriptorgetSchemaDescriptor()
    
public  TableDescriptorgetTableDescriptor()
    
public  UUIDgetTableId()
    
public  StringgetTriggerDefinition()
     Get the original trigger definition.
public  intgetTriggerEventMask()
     Get the trigger event mask.
public  intgetTypeFormatId()
     Get the formatID which corresponds to this class.
public  UUIDgetUUID()
    
public  UUIDgetWhenClauseId()
    
public  SPSDescriptorgetWhenClauseSPS()
    
public  booleanisBeforeTrigger()
    
public  booleanisEnabled()
    
public  booleanisRowTrigger()
    
public synchronized  booleanisValid()
     Check that all of the dependent's dependencies are valid.
public  booleanlistensForEvent(int event)
     Indicate whether this trigger listens for this type of event.
public  voidmakeInvalid(int action, LanguageConnectionContext lcc)
     Mark the dependent as invalid (due to at least one of its dependencies being invalid).
public  voidmakeValid(LanguageConnectionContext lcc)
     Attempt to revalidate the dependent.
public  booleanneedsToFire(int stmtType, int[] modifiedCols)
    
public  voidprepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc)
     Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
public  voidreadExternal(ObjectInput in)
     Read this object from a stream of stored objects.
public  voidsetDisabled()
    
public  voidsetEnabled()
    
public  StringtoString()
    
public  voidwriteExternal(ObjectOutput out)
     Write this object to a stream of stored objects.

Field Detail
SYSTRIGGERS_STATE_FIELD
final public static int SYSTRIGGERS_STATE_FIELD(Code)



TRIGGER_EVENT_DELETE
final public static int TRIGGER_EVENT_DELETE(Code)



TRIGGER_EVENT_INSERT
final public static int TRIGGER_EVENT_INSERT(Code)



TRIGGER_EVENT_UPDATE
final public static int TRIGGER_EVENT_UPDATE(Code)




Constructor Detail
TriggerDescriptor
public TriggerDescriptor()(Code)
Niladic constructor, for formatable



TriggerDescriptor
public TriggerDescriptor(DataDictionary dataDictionary, SchemaDescriptor sd, UUID id, String name, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor td, UUID whenSPSId, UUID actionSPSId, Timestamp creationTimestamp, int[] referencedCols, String triggerDefinition, boolean referencingOld, boolean referencingNew, String oldReferencingName, String newReferencingName)(Code)
Constructor. Used when creating a trigger from SYS.SYSTRIGGERS
Parameters:
  dataDictionary - the data dictionary
Parameters:
  sd - the schema descriptor for this trigger
Parameters:
  id - the trigger id
Parameters:
  name - the trigger name
Parameters:
  eventMask - TriggerDescriptor.TRIGGER_EVENT_XXXX
Parameters:
  isBefore - is this a before (as opposed to after) trigger
Parameters:
  isRow - is this a row trigger or statement trigger
Parameters:
  isEnabled - is this trigger enabled or disabled
Parameters:
  td - the table upon which this trigger is defined
Parameters:
  whenSPSId - the sps id for the when clause (may be null)
Parameters:
  actionSPSId - the spsid for the trigger action (may be null)
Parameters:
  creationTimestamp - when was this trigger created?
Parameters:
  referencedCols - what columns does this trigger reference (may be null)
Parameters:
  triggerDefinition - The original user text of the trigger action
Parameters:
  referencingOld - whether or not OLD appears in REFERENCING clause
Parameters:
  referencingNew - whether or not NEW appears in REFERENCING clause
Parameters:
  oldReferencingName - old referencing table name, if any, that appears in REFERCING clause
Parameters:
  newReferencingName - new referencing table name, if any, that appears in REFERCING clause




Method Detail
getActionId
public UUID getActionId()(Code)
Get the trigger action sps UUID the uuid of the sps action



getActionSPS
public SPSDescriptor getActionSPS(LanguageConnectionContext lcc) throws StandardException(Code)
Get the trigger action sps the trigger action sps
exception:
  StandardException - on error



getClassType
public String getClassType()(Code)
Get the provider's type. char The provider's type.



getCreationTimestamp
public Timestamp getCreationTimestamp()(Code)
Get the time that this trigger was created. the time the trigger was created



getDataDictionary
protected DataDictionary getDataDictionary() throws StandardException(Code)



getDependableFinder
public DependableFinder getDependableFinder()(Code)
the stored form of this provider
See Also:   Dependable.getDependableFinder



getDescriptorName
public String getDescriptorName()(Code)

See Also:   TupleDescriptor.getDescriptorName
See Also:   



getDescriptorType
public String getDescriptorType()(Code)

See Also:   TupleDescriptor.getDescriptorType
See Also:   



getName
public String getName()(Code)
Get the trigger name the name



getNewReferencingName
public String getNewReferencingName()(Code)
Get the new Referencing name, if any, from the REFERENCING clause. The new Referencing name, if any,from the REFERENCING clause.



getObjectID
public UUID getObjectID()(Code)
Get the provider's UUID The provider's UUID



getObjectName
public String getObjectName()(Code)
Return the name of this Provider. (Useful for errors.) String The name of this provider.



getOldReferencingName
public String getOldReferencingName()(Code)
Get the old Referencing name, if any, from the REFERENCING clause. The old Referencing name, if any,from the REFERENCING clause.



getReferencedCols
public int[] getReferencedCols()(Code)
Get the referenced column array for this trigger, used in "alter table drop column", we get the handle and change it the referenced column array



getReferencingNew
public boolean getReferencingNew()(Code)
Get whether or not NEW was replaced in the REFERENCING clause. Whether or not NEW was replacedin the REFERENCING clause.



getReferencingOld
public boolean getReferencingOld()(Code)
Get whether or not OLD was replaced in the REFERENCING clause. Whether or not OLD was replacedin the REFERENCING clause.



getSchemaDescriptor
public SchemaDescriptor getSchemaDescriptor() throws StandardException(Code)
Get the triggers schema descriptor the schema descriptor
exception:
  StandardException - on error



getTableDescriptor
public TableDescriptor getTableDescriptor() throws StandardException(Code)
Get the trigger table descriptor the table descripor upon which this triggeris declared
exception:
  StandardException - on error



getTableId
public UUID getTableId()(Code)



getTriggerDefinition
public String getTriggerDefinition()(Code)
Get the original trigger definition. The trigger definition.



getTriggerEventMask
public int getTriggerEventMask()(Code)
Get the trigger event mask. Currently, a trigger may only listen for a single event, though it may OR multiple events in the future. the trigger event mask



getTypeFormatId
public int getTypeFormatId()(Code)
Get the formatID which corresponds to this class. the formatID of this class



getUUID
public UUID getUUID()(Code)
Get the trigger UUID the id



getWhenClauseId
public UUID getWhenClauseId()(Code)
Get the trigger when clause sps UUID the uuid of the sps action



getWhenClauseSPS
public SPSDescriptor getWhenClauseSPS() throws StandardException(Code)
Get the trigger when clause sps the sps of the when clause
exception:
  StandardException - on error



isBeforeTrigger
public boolean isBeforeTrigger()(Code)
Is this a before trigger true if it is a before trigger



isEnabled
public boolean isEnabled()(Code)
Is this trigger enabled true if it is enabled



isRowTrigger
public boolean isRowTrigger()(Code)
Is this a row trigger true if it is a before trigger



isValid
public synchronized boolean isValid()(Code)
Check that all of the dependent's dependencies are valid. true if the dependent is currently valid



listensForEvent
public boolean listensForEvent(int event)(Code)
Indicate whether this trigger listens for this type of event.
Parameters:
  event - TRIGGER_EVENT_XXXX true if it listens to the specified event.



makeInvalid
public void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException(Code)
Mark the dependent as invalid (due to at least one of its dependencies being invalid). Always an error for a trigger -- should never have gotten here.
Parameters:
  lcc - the language connection context
Parameters:
  action - The action causing the invalidation
exception:
  StandardException - thrown if called in sanity mode



makeValid
public void makeValid(LanguageConnectionContext lcc)(Code)
Attempt to revalidate the dependent. Meaningless for a trigger.
Parameters:
  lcc - the language connection context



needsToFire
public boolean needsToFire(int stmtType, int[] modifiedCols) throws StandardException(Code)
Does this trigger need to fire on this type of DML?
Parameters:
  stmtType - the type of DML (StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE)
Parameters:
  modifiedCols - the columns modified, or null for all true/false
exception:
  StandardException - on error



prepareToInvalidate
public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException(Code)
Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
Parameters:
  action - The action causing the invalidation
Parameters:
  p - the provider
Parameters:
  lcc - the language connection context
exception:
  StandardException - thrown if unable to make it invalid



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Read this object from a stream of stored objects.
Parameters:
  in - read this.
exception:
  IOException - thrown on error
exception:
  ClassNotFoundException - thrown on error



setDisabled
public void setDisabled()(Code)
Mark this trigger as disabled



setEnabled
public void setEnabled()(Code)
Mark this trigger as enabled



toString
public String toString()(Code)



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Write this object to a stream of stored objects.
Parameters:
  out - write bytes here.
exception:
  IOException - thrown on error



Fields inherited from org.apache.derby.iapi.sql.dictionary.TupleDescriptor
final public static int COLUMN_LIST(Code)(Java Doc)
final public static int CONGLOMERATE_LIST(Code)(Java Doc)
final public static int CONSTRAINT_LIST(Code)(Java Doc)
final public static int TRIGGER_LIST(Code)(Java Doc)

Methods inherited from org.apache.derby.iapi.sql.dictionary.TupleDescriptor
DependableFinder getColumnDependableFinder(int formatId, byte[] columnBitMap)(Code)(Java Doc)
protected DataDictionary getDataDictionary() throws StandardException(Code)(Java Doc)
public DependableFinder getDependableFinder(int formatId)(Code)(Java Doc)
public String getDescriptorName()(Code)(Java Doc)
public String getDescriptorType()(Code)(Java Doc)
public boolean isPersistent()(Code)(Java Doc)
protected void setDataDictionary(DataDictionary dd)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.