27 * Created on Apr 28, 2005
28 */
29 package javax.sql;
30
31 import java.sql.PreparedStatement;
32 import java.sql.SQLException;
33 import java.util.EventObject;
34
35 /**
36 * A <code>StatementEvent</code> is sent to all <code>StatementEventListener</code>s which were
37 * registered with a <code>PooledConnection</code>. This occurs when the driver determines that a
38 * <code>PreparedStatement</code> that is associated with the <code>PooledConnection</code> has been closed or the driver determines
39 * is invalid.
40 *
41 * @since 1.6
42 */
43 public class StatementEvent extends EventObject {
44
45 static final long serialVersionUID = -8089573731826608315L;
46 private SQLException exception;
47 private PreparedStatement statement;
48
49 /**
50 * Constructs a <code>StatementEvent</code> with the specified <code>PooledConnection</code> and
51 * <code>PreparedStatement</code>. The <code>SQLException</code> contained in the event defaults to
52 * null.
53 *
54 * @param con The <code>PooledConnection</code> that the closed or invalid
55 * <code>PreparedStatement</code>is associated with.
56 * @param statement The <code>PreparedStatement</code> that is being closed or is invalid
57 *
58 * @throws IllegalArgumentException if <code>con</code> is null.
59 *
60 * @since 1.6
61 */
62 public StatementEvent(PooledConnection con,
63 PreparedStatement statement) {
64
65 super(con);
66
|
27 * Created on Apr 28, 2005
28 */
29 package javax.sql;
30
31 import java.sql.PreparedStatement;
32 import java.sql.SQLException;
33 import java.util.EventObject;
34
35 /**
36 * A <code>StatementEvent</code> is sent to all <code>StatementEventListener</code>s which were
37 * registered with a <code>PooledConnection</code>. This occurs when the driver determines that a
38 * <code>PreparedStatement</code> that is associated with the <code>PooledConnection</code> has been closed or the driver determines
39 * is invalid.
40 *
41 * @since 1.6
42 */
43 public class StatementEvent extends EventObject {
44
45 static final long serialVersionUID = -8089573731826608315L;
46 private SQLException exception;
47 @SuppressWarnings("serial") // Not statically typed as Serializable
48 private PreparedStatement statement;
49
50 /**
51 * Constructs a <code>StatementEvent</code> with the specified <code>PooledConnection</code> and
52 * <code>PreparedStatement</code>. The <code>SQLException</code> contained in the event defaults to
53 * null.
54 *
55 * @param con The <code>PooledConnection</code> that the closed or invalid
56 * <code>PreparedStatement</code>is associated with.
57 * @param statement The <code>PreparedStatement</code> that is being closed or is invalid
58 *
59 * @throws IllegalArgumentException if <code>con</code> is null.
60 *
61 * @since 1.6
62 */
63 public StatementEvent(PooledConnection con,
64 PreparedStatement statement) {
65
66 super(con);
67
|