Package de.narimo.commons.jdbc
Class JDBCConnection
- java.lang.Object
-
- de.narimo.commons.jdbc.JDBCConnection
-
public class JDBCConnection extends Object
Deprecated.use JDBCConnectionJNDI with connection pool defined on container level.- Author:
- admin
-
-
Constructor Summary
Constructors Constructor Description JDBCConnection(String dbType, String dbName, String userName, String userPass)Deprecated.This jdbc connection will try to establish a connection to the default postgres port 5432.JDBCConnection(String dbType, String dbName, String userName, String userPass, String port)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.voidcommit()Deprecated.booleanexecute(String sql)Deprecated.ResultSetexecutePreparedQuery(PreparedStatement ps)Deprecated.intexecutePreparedUpdate(PreparedStatement ps)Deprecated.ResultSetexecuteQuery(String sql)Deprecated.voidgetConnection()Deprecated.static voidmain(String[] args)Deprecated.PreparedStatementprepareStatement(String sql)Deprecated.voidrollback()Deprecated.voidsetAutoCommit(boolean autoCommit)Deprecated.
-
-
-
Constructor Detail
-
JDBCConnection
public JDBCConnection(String dbType, String dbName, String userName, String userPass) throws SQLException
Deprecated.This jdbc connection will try to establish a connection to the default postgres port 5432. Specify a port to change the settings.- Parameters:
dbType-dbName-userName-userPass-- Throws:
SQLException
-
JDBCConnection
public JDBCConnection(String dbType, String dbName, String userName, String userPass, String port) throws SQLException
Deprecated.- Throws:
SQLException
-
-
Method Detail
-
getConnection
public void getConnection() throws SQLExceptionDeprecated.- Throws:
SQLException
-
executeQuery
public ResultSet executeQuery(String sql) throws Exception
Deprecated.- Throws:
Exception
-
prepareStatement
public PreparedStatement prepareStatement(String sql) throws Exception
Deprecated.- Throws:
Exception
-
executePreparedQuery
public ResultSet executePreparedQuery(PreparedStatement ps) throws Exception
Deprecated.- Throws:
Exception
-
executePreparedUpdate
public int executePreparedUpdate(PreparedStatement ps) throws Exception
Deprecated.- Throws:
Exception
-
close
public void close() throws SQLExceptionDeprecated.- Throws:
SQLException
-
commit
public void commit() throws SQLExceptionDeprecated.- Throws:
SQLException
-
rollback
public void rollback() throws SQLExceptionDeprecated.- Throws:
SQLException
-
setAutoCommit
public void setAutoCommit(boolean autoCommit) throws SQLExceptionDeprecated.- Throws:
SQLException
-
main
public static void main(String[] args) throws SQLException
Deprecated.- Throws:
SQLException
-
-