Package org.opencms.setup
Class CmsSetupDBWrapper
- java.lang.Object
-
- org.opencms.setup.CmsSetupDBWrapper
-
public class CmsSetupDBWrapper extends java.lang.Object
Wrapper to encapsulate, connection, statement and result set for the setup and update wizard.
-
-
Constructor Summary
Constructors Constructor Description CmsSetupDBWrapper(java.sql.Connection con)
Constructor, creates a new CmsSetupDBWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes result set, and statement.void
createPreparedStatement(java.lang.String query, java.util.List<java.lang.Object> params)
Creates a new SQL Statement on the connection of this DB wrapper.void
createStatement()
Creates a new SQL Statement on the connection of this DB wrapper.void
excecutePreparedQuery()
Executes a query on the connection and prepared statement of this db wrapper.void
excecuteQuery(java.lang.String query)
Executes a query on the connection and statement of this db wrapper.java.sql.ResultSet
getResultSet()
Returns the res.
-
-
-
Constructor Detail
-
CmsSetupDBWrapper
public CmsSetupDBWrapper(java.sql.Connection con)
Constructor, creates a new CmsSetupDBWrapper.- Parameters:
con
- the connection to use in this db wrapper.
-
-
Method Detail
-
close
public void close()
Closes result set, and statement.
-
createStatement
public void createStatement() throws java.sql.SQLException
Creates a new SQL Statement on the connection of this DB wrapper.- Throws:
java.sql.SQLException
- if statement cannot be created
-
createPreparedStatement
public void createPreparedStatement(java.lang.String query, java.util.List<java.lang.Object> params) throws java.sql.SQLException
Creates a new SQL Statement on the connection of this DB wrapper.- Parameters:
query
- the DB query to useparams
- List of additional parameters- Throws:
java.sql.SQLException
- if statement cannot be created
-
excecuteQuery
public void excecuteQuery(java.lang.String query) throws java.sql.SQLException
Executes a query on the connection and statement of this db wrapper.- Parameters:
query
- the query to execute- Throws:
java.sql.SQLException
- if statement cannot be created
-
excecutePreparedQuery
public void excecutePreparedQuery() throws java.sql.SQLException
Executes a query on the connection and prepared statement of this db wrapper.- Throws:
java.sql.SQLException
- if statement cannot be created
-
getResultSet
public java.sql.ResultSet getResultSet()
Returns the res.- Returns:
- the res
-
-