public class JDBCConnection extends Object
| Constructor and 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
void |
commit()
Deprecated.
|
boolean |
execute(String sql)
Deprecated.
|
ResultSet |
executePreparedQuery(PreparedStatement ps)
Deprecated.
|
int |
executePreparedUpdate(PreparedStatement ps)
Deprecated.
|
ResultSet |
executeQuery(String sql)
Deprecated.
|
void |
getConnection()
Deprecated.
|
static void |
main(String[] args)
Deprecated.
|
PreparedStatement |
prepareStatement(String sql)
Deprecated.
|
void |
rollback()
Deprecated.
|
void |
setAutoCommit(boolean autoCommit)
Deprecated.
|
public JDBCConnection(String dbType, String dbName, String userName, String userPass) throws SQLException
dbType - dbName - userName - userPass - SQLExceptionpublic JDBCConnection(String dbType, String dbName, String userName, String userPass, String port) throws SQLException
SQLExceptionpublic void getConnection()
throws SQLException
SQLExceptionpublic ResultSet executeQuery(String sql) throws Exception
Exceptionpublic PreparedStatement prepareStatement(String sql) throws Exception
Exceptionpublic ResultSet executePreparedQuery(PreparedStatement ps) throws Exception
Exceptionpublic int executePreparedUpdate(PreparedStatement ps) throws Exception
Exceptionpublic void close()
throws SQLException
SQLExceptionpublic void commit()
throws SQLException
SQLExceptionpublic void rollback()
throws SQLException
SQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
SQLExceptionpublic static void main(String[] args) throws SQLException
SQLExceptionCopyright © 2020. All rights reserved.