Package org.bridgedb.sql
Class SQLBase
- java.lang.Object
-
- org.bridgedb.sql.SQLBase
-
- Direct Known Subclasses:
SQLListener
public class SQLBase extends Object
This is the root class of the SQL stack.- Author:
- Christian
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectionpossibleOpenConnectionprotected SQLAccesssqlAccess
-
Constructor Summary
Constructors Constructor Description SQLBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose(Statement statement, ResultSet rs)voidcloseConnection()voidcommitTransaction()PreparedStatementcreatePreparedStatement(String sql)StatementcreateStatement()StringinsertEscpaeCharacters(String original)voidrollbackTransaction()voidstartTransaction()
-
-
-
Field Detail
-
sqlAccess
protected SQLAccess sqlAccess
-
possibleOpenConnection
protected Connection possibleOpenConnection
-
-
Constructor Detail
-
SQLBase
public SQLBase() throws BridgeDBException- Throws:
BridgeDBException
-
-
Method Detail
-
closeConnection
public void closeConnection()
-
createStatement
public final Statement createStatement() throws BridgeDBException
- Returns:
- the SQL statement
- Throws:
BridgeDBException- - if something goes wrong creating the SQL statement
-
createPreparedStatement
public final PreparedStatement createPreparedStatement(String sql) throws BridgeDBException
- Throws:
BridgeDBException
-
startTransaction
public final void startTransaction() throws BridgeDBException- Throws:
BridgeDBException
-
commitTransaction
public final void commitTransaction() throws BridgeDBException- Throws:
BridgeDBException
-
rollbackTransaction
public final void rollbackTransaction() throws BridgeDBException- Throws:
BridgeDBException
-
-