EMMA Coverage Report (generated Wed Jun 28 22:15:27 PDT 2006) |
---|
[all classes][org.apache.derby.catalog] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
TriggerOldTransitionRows.java | 100% (1/1) | 14% (6/44) | 15% (36/237) | 23% (12/53) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class TriggerOldTransitionRows | 100% (1/1) | 14% (6/44) | 15% (36/237) | 23% (12/53) |
TriggerOldTransitionRows (): void | 100% (1/1) | 54% (14/26) | 75% (6/8) | |
clearWarnings (): void | 0% (0/1) | 0% (0/4) | 0% (0/2) | |
close (): void | 100% (1/1) | 100% (4/4) | 100% (2/2) | |
findColumn (String): int | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getAsciiStream (String): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getAsciiStream (int): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getBigDecimal (String, int): BigDecimal | 0% (0/1) | 0% (0/6) | 0% (0/1) | |
getBigDecimal (int, int): BigDecimal | 0% (0/1) | 0% (0/6) | 0% (0/1) | |
getBinaryStream (String): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getBinaryStream (int): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getBoolean (String): boolean | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getBoolean (int): boolean | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getByte (String): byte | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getByte (int): byte | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getBytes (String): byte [] | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getBytes (int): byte [] | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getCursorName (): String | 0% (0/1) | 0% (0/4) | 0% (0/1) | |
getDate (String): Date | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getDate (int): Date | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getDouble (String): double | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getDouble (int): double | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getFloat (String): float | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getFloat (int): float | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getInt (String): int | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getInt (int): int | 100% (1/1) | 100% (5/5) | 100% (1/1) | |
getLong (String): long | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getLong (int): long | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getMetaData (): ResultSetMetaData | 100% (1/1) | 100% (4/4) | 100% (1/1) | |
getObject (String): Object | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getObject (int): Object | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getResultSetMetaData (): ResultSetMetaData | 0% (0/1) | 0% (0/6) | 0% (0/1) | |
getShort (String): short | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getShort (int): short | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getString (String): String | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getString (int): String | 100% (1/1) | 100% (5/5) | 100% (1/1) | |
getTime (String): Time | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getTime (int): Time | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getTimestamp (String): Timestamp | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getTimestamp (int): Timestamp | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getUnicodeStream (String): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getUnicodeStream (int): InputStream | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getWarnings (): SQLWarning | 0% (0/1) | 0% (0/4) | 0% (0/1) | |
next (): boolean | 100% (1/1) | 100% (4/4) | 100% (1/1) | |
wasNull (): boolean | 0% (0/1) | 0% (0/4) | 0% (0/1) |
1 | /* |
2 | |
3 | Derby - Class org.apache.derby.catalog.TriggerOldTransitionRows |
4 | |
5 | Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable. |
6 | |
7 | Licensed under the Apache License, Version 2.0 (the "License"); |
8 | you may not use this file except in compliance with the License. |
9 | You may obtain a copy of the License at |
10 | |
11 | http://www.apache.org/licenses/LICENSE-2.0 |
12 | |
13 | Unless required by applicable law or agreed to in writing, software |
14 | distributed under the License is distributed on an "AS IS" BASIS, |
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | See the License for the specific language governing permissions and |
17 | limitations under the License. |
18 | |
19 | */ |
20 | |
21 | package org.apache.derby.catalog; |
22 | |
23 | import org.apache.derby.iapi.db.Factory; |
24 | import org.apache.derby.iapi.db.TriggerExecutionContext; |
25 | import org.apache.derby.iapi.reference.JDBC20Translation; |
26 | |
27 | import java.sql.Connection; |
28 | import java.sql.Statement; |
29 | import java.sql.ResultSet; |
30 | import java.sql.ResultSetMetaData; |
31 | import java.sql.SQLException; |
32 | import java.sql.SQLWarning; |
33 | import java.math.BigDecimal; |
34 | |
35 | /** |
36 | * Provides information about a set of rows before a trigger action |
37 | * changed them. |
38 | * |
39 | * |
40 | * <p> |
41 | * This class implements only JDBC 1.2, not JDBC 2.0. You cannot |
42 | * compile this class with JDK1.2, since it implements only the |
43 | * JDBC 1.2 ResultSet interface and not the JDBC 2.0 ResultSet |
44 | * interface. You can only use this class in a JDK 1.2 runtime |
45 | * environment if no JDBC 2.0 calls are made against it. |
46 | * |
47 | * @author jamie |
48 | */ |
49 | public class TriggerOldTransitionRows extends org.apache.derby.vti.UpdatableVTITemplate |
50 | { |
51 | |
52 | private ResultSet resultSet; |
53 | |
54 | /** |
55 | * Construct a VTI on the trigger's old row set. |
56 | * The old row set is the before image of the rows |
57 | * that are changed by the trigger. For a trigger |
58 | * on a delete, this is all the rows that are deleted. |
59 | * For a trigger on an update, this is the rows before |
60 | * they are updated. For an insert, this throws an |
61 | * exception. |
62 | * |
63 | * @exception SQLException thrown if no trigger active |
64 | */ |
65 | public TriggerOldTransitionRows() throws SQLException |
66 | { |
67 | TriggerExecutionContext tec = Factory.getTriggerExecutionContext(); |
68 | if (tec == null) |
69 | { |
70 | throw new SQLException("There are no active triggers", "38000"); |
71 | } |
72 | resultSet = tec.getOldRowSet(); |
73 | |
74 | if (resultSet == null) |
75 | { |
76 | throw new SQLException("There is no old transition rows result set for this trigger", "38000"); |
77 | } |
78 | } |
79 | |
80 | public ResultSet executeQuery() { |
81 | return resultSet; |
82 | } |
83 | |
84 | public int getResultSetConcurrency() { |
85 | return JDBC20Translation.CONCUR_READ_ONLY; |
86 | } |
87 | public void close() throws SQLException { |
88 | resultSet.close(); |
89 | } |
90 | } |
[all classes][org.apache.derby.catalog] |
EMMA 2.0.5312 (C) Vladimir Roubtsov |