1 2 12 package com.versant.core.jdbc.logging; 13 14 import java.sql.Connection ; 15 import java.sql.Statement ; 16 17 20 public class JdbcConnectionEvent extends JdbcLogEvent { 21 22 private int connectionID; 23 private int statementID; 24 private int resultSetType; 25 private int resultSetConcurrency; 26 27 public JdbcConnectionEvent(long txId, Connection con, String descr, int type) { 28 super(txId, type, descr); 29 this.connectionID = System.identityHashCode(con); 30 } 31 32 public int getConnectionID() { 33 return connectionID; 34 } 35 36 public void updateConnectionID(Connection con) { 37 connectionID = System.identityHashCode(con); 38 } 39 40 public int getStatementID() { 41 return statementID; 42 } 43 44 public void updateStatementID(Statement stat) { 45 statementID = System.identityHashCode(stat); 46 } 47 48 public int getResultSetType() { 49 return resultSetType; 50 } 51 52 public void setResultSetType(int resultSetType) { 53 this.resultSetType = resultSetType; 54 } 55 56 public int getResultSetConcurrency() { 57 return resultSetConcurrency; 58 } 59 60 public void setResultSetConcurrency(int resultSetConcurrency) { 61 this.resultSetConcurrency = resultSetConcurrency; 62 } 63 64 public boolean isScrollable() { 65 return resultSetType != 0; 66 } 67 68 } 69 | Popular Tags |