Source Code Cross Referenced for TriggerExecutionContext.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » db » 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.db 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.iapi.db.TriggerExecutionContext
004:
005:           Licensed to the Apache Software Foundation (ASF) under one or more
006:           contributor license agreements.  See the NOTICE file distributed with
007:           this work for additional information regarding copyright ownership.
008:           The ASF licenses this file to you under the Apache License, Version 2.0
009:           (the "License"); you may not use this file except in compliance with
010:           the License.  You may obtain a copy of the License at
011:
012:              http://www.apache.org/licenses/LICENSE-2.0
013:
014:           Unless required by applicable law or agreed to in writing, software
015:           distributed under the License is distributed on an "AS IS" BASIS,
016:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:           See the License for the specific language governing permissions and
018:           limitations under the License.
019:
020:         */
021:
022:        package org.apache.derby.iapi.db;
023:
024:        import java.sql.ResultSet;
025:        import java.sql.SQLException;
026:        import org.apache.derby.catalog.UUID;
027:
028:        /**
029:         * A trigger execution context holds information that is
030:         * available from the context of a trigger invocation.
031:         */
032:        public interface TriggerExecutionContext {
033:            /**
034:             * Return value from </I>getEventType()</I> for
035:             * an update trigger.
036:             */
037:            public static final int UPDATE_EVENT = 1;
038:
039:            /**
040:             * Return value from </I>getEventType()</I> for
041:             * a delete trigger.
042:             */
043:            public static final int DELETE_EVENT = 2;
044:
045:            /**
046:             * Return value from </I>getEventType()</I> for
047:             * an insert trigger.
048:             */
049:            public static final int INSERT_EVENT = 3;
050:
051:            /**
052:             * Get the target table name upon which the 
053:             * trigger event is declared.
054:             *
055:             * @return the target table
056:             */
057:            public String getTargetTableName();
058:
059:            /**
060:             * Get the target table UUID upon which the 
061:             * trigger event is declared.
062:             *
063:             * @return the uuid of the target table
064:             */
065:            public UUID getTargetTableId();
066:
067:            /**
068:             * Get the type for the event that caused the
069:             * trigger to fire.
070:             *
071:             * @return the event type (e.g. UPDATE_EVENT)
072:             */
073:            public int getEventType();
074:
075:            /**
076:             * Get the text of the statement that caused the
077:             * trigger to fire.
078:             *
079:             * @return the statement text.
080:             */
081:            public String getEventStatementText();
082:
083:            /**
084:             * Get the columns that have been modified by the statement
085:             * that caused this trigger to fire.  If all columns are
086:             * modified, will return null (e.g. for INSERT or DELETE
087:             * return null).
088:             *
089:             * @return an array of Strings
090:             */
091:            public String[] getModifiedColumns();
092:
093:            /**
094:             * Find out if a column was changed, by column name.
095:             *
096:             * @param columnName the column to check
097:             *
098:             * @return true if the column was modified by this statement.
099:             * Note that this will always return true for INSERT
100:             * and DELETE regardless of the column name passed in.
101:             */
102:            public boolean wasColumnModified(String columnName);
103:
104:            /**
105:             * Find out if a column was changed, by column number
106:             *
107:             * @param columnNumber the column to check
108:             *
109:             * @return true if the column was modified by this statement.
110:             * Note that this will always return true for INSERT
111:             * and DELETE regardless of the column name passed in.
112:             */
113:            public boolean wasColumnModified(int columnNumber);
114:
115:            /**
116:             * Returns a result set of the old (before) images of the changed rows.
117:             * For a row trigger, this result set will have a single row.  For
118:             * a statement trigger, this result set has every row that has
119:             * changed or will change.  If a statement trigger does not affect 
120:             * a row, then the result set will be empty (i.e. ResultSet.next()
121:             * will return false).
122:             * <p>
123:             * Will return null if the call is inapplicable for the trigger
124:             * that is currently executing.  For example, will return null if called
125:             * during a the firing of an INSERT trigger.
126:             *
127:             * @return the ResultSet containing before images of the rows 
128:             * changed by the triggering event.  May return null.
129:             *
130:             * @exception SQLException if called after the triggering event has
131:             * completed
132:             */
133:            public ResultSet getOldRowSet() throws SQLException;
134:
135:            /**
136:             * Returns a result set of the new (after) images of the changed rows.
137:             * For a row trigger, this result set will have a single row.  For
138:             * a statement trigger, this result set has every row that has
139:             * changed or will change.  If a statement trigger does not affect 
140:             * a row, then the result set will be empty (i.e. ResultSet.next()
141:             * will return false).
142:             * <p>
143:             * Will return null if the call is inapplicable for the trigger
144:             * that is currently executing.  For example, will return null if 
145:             * called during the firing of a DELETE trigger.
146:             *
147:             * @return the ResultSet containing after images of the rows 
148:             * changed by the triggering event.  May return null.
149:             *
150:             * @exception SQLException if called after the triggering event has
151:             * completed
152:             */
153:            public ResultSet getNewRowSet() throws SQLException;
154:
155:            /**
156:             * Like getOldRowSet(), but returns a result set positioned
157:             * on the first row of the before (old) result set.  Used as a convenience
158:             * to get a column for a row trigger.  Equivalent to getOldRowSet()
159:             * followed by next().
160:             * <p>
161:             * Will return null if the call is inapplicable for the trigger
162:             * that is currently executing.  For example, will return null if called
163:             * during a the firing of an INSERT trigger.
164:             *
165:             * @return the ResultSet positioned on the old row image.  May
166:             * return null.
167:             *
168:             * @exception SQLException if called after the triggering event has
169:             * completed
170:             */
171:            public ResultSet getOldRow() throws SQLException;
172:
173:            /**
174:             * Like getNewRowSet(), but returns a result set positioned
175:             * on the first row of the after (new) result set.  Used as a convenience
176:             * to get a column for a row trigger.  Equivalent to getNewRowSet()
177:             * followed by next().
178:             * <p>
179:             * Will return null if the call is inapplicable for the trigger
180:             * that is currently executing.  For example, will return null if 
181:             * called during the firing of a DELETE trigger.
182:             *
183:             * @return the ResultSet positioned on the new row image.  May
184:             * return null.
185:             *
186:             * @exception SQLException if called after the triggering event has
187:             * completed
188:             */
189:            public ResultSet getNewRow() throws SQLException;
190:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.