Package de.xima.fc.manager
Class DBQueryManager
- java.lang.Object
-
- de.xima.fc.manager.DBQueryManager
-
public class DBQueryManager extends Object
-
-
Constructor Summary
Constructors Constructor Description DBQueryManager()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static de.xima.cmn.db.model.SerializableResultSet
executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, boolean publicOnly, IReplacerParams placeholderParams, Serializable... parameters)
static de.xima.cmn.db.model.SerializableResultSet
executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, boolean publicOnly, Serializable... parameters)
static de.xima.cmn.db.model.SerializableResultSet
executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, IReplacerParams placeholderParams, Serializable... parameters)
static de.xima.cmn.db.model.SerializableResultSet
executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, Serializable... parameters)
static de.xima.cmn.db.model.SerializableResultSet
executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, Serializable... parameters)
static de.xima.cmn.db.model.SerializableResultSet
executePublicDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, IReplacerParams replacerParams, Serializable... parameters)
static de.xima.cmn.db.model.SerializableResultSet
executePublicDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, Serializable... parameters)
static Integer
executeSql(IEntityContext ec, Long dbZugriffId, String sql)
static PreparedStatement
prepareStatement(Connection con, String sql, IReplacerParams replacerParameters, Serializable... args)
static de.xima.cmn.db.model.SerializableResultSet
query(IEntityContext ec, Integer dbZugriffId, String sql, boolean suppressStatementLimits, IReplacerParams params, Serializable... args)
static de.xima.cmn.db.model.SerializableResultSet
query(IEntityContext ec, Integer dbZugriffId, String sql, boolean suppressStatementLimits, Serializable... args)
static de.xima.cmn.db.model.SerializableResultSet
query(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args)
Deprecated.static de.xima.cmn.db.model.SerializableResultSet
query(Connection con, String sql, boolean suppressStatementLimits, Serializable... args)
static de.xima.cmn.db.model.SerializableResultSet
query(Connection con, String sql, IReplacerParams params, boolean suppressStatementLimits, Serializable... args)
static int
update(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args)
-
-
-
Method Detail
-
update
public static int update(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args) throws PropertyVetoException
- Parameters:
ec
- theIEntityContext
dbZugriffId
-Integer
the id of the database-connectionsql
-String
the sqlargs
-Serializable
parameters- Returns:
Integer
the number of updated rows- Throws:
PropertyVetoException
- on errors in the database-connection properties
-
query
@Deprecated public static de.xima.cmn.db.model.SerializableResultSet query(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args) throws PropertyVetoException
Deprecated.usequery(IEntityContext, Integer, String, boolean, Serializable...)
. Suppression of statement-limits disabled!- Throws:
PropertyVetoException
-
query
public static de.xima.cmn.db.model.SerializableResultSet query(IEntityContext ec, Integer dbZugriffId, String sql, boolean suppressStatementLimits, Serializable... args) throws PropertyVetoException
- Throws:
PropertyVetoException
-
query
public static de.xima.cmn.db.model.SerializableResultSet query(IEntityContext ec, Integer dbZugriffId, String sql, boolean suppressStatementLimits, IReplacerParams params, Serializable... args) throws PropertyVetoException
- Parameters:
ec
-IEntityContext
dbZugriffId
-Integer
the id of the database-connectionsql
-String
the sqlsuppressStatementLimits
-Boolean
if the statement limit should be suppressedargs
-Serializable
parameters- Returns:
- an
SerializableResultSet
- Throws:
PropertyVetoException
- on errors in the database-connection properties
-
query
public static de.xima.cmn.db.model.SerializableResultSet query(Connection con, String sql, boolean suppressStatementLimits, Serializable... args) throws SQLException
- Throws:
SQLException
-
query
public static de.xima.cmn.db.model.SerializableResultSet query(Connection con, String sql, IReplacerParams params, boolean suppressStatementLimits, Serializable... args) throws SQLException
- Parameters:
con
- Connection to use for the query.sql
- SQL statement to execute. May contain parameters.params
- placeholderParameterssuppressStatementLimits
-Boolean
if the statement limit should be suppressedargs
- Additional arguments for the prepared statement.- Returns:
- The result of the SQL query, or
null
when the database returned no result. - Throws:
SQLException
- When the query could not be executed.
-
executeSql
public static Integer executeSql(IEntityContext ec, Long dbZugriffId, String sql) throws PropertyVetoException
- Parameters:
ec
- theIEntityContext
dbZugriffId
-Long
the id of the database-connectionsql
-String
the sql- Returns:
- an count of executed statements
- Throws:
PropertyVetoException
- on errors in the database-connection properties
-
executeDBquery
@Deprecated public static de.xima.cmn.db.model.SerializableResultSet executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
Deprecated.useexecuteDBquery(IEntityContext, Mandant, String, boolean, Serializable...)
. Suppression of statement-limits disabled!
-
executeDBquery
public static de.xima.cmn.db.model.SerializableResultSet executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
- Parameters:
ec
- theIEntityContext
mandant
- theManagedBeanCreationException
datenquellenName
-String
the name of the datasourcesuppressStatementLimits
-Boolean
if the statement limi should be supressedparameters
-Serializable
parameters- Returns:
- an
SerializableResultSet
- Throws:
PropertyVetoException
- if the properties of the connection are not corretIllegalArgumentException
- if the parameter count doesn´t match
-
executeDBquery
public static de.xima.cmn.db.model.SerializableResultSet executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, IReplacerParams placeholderParams, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
-
executePublicDBquery
public static de.xima.cmn.db.model.SerializableResultSet executePublicDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
-
executePublicDBquery
public static de.xima.cmn.db.model.SerializableResultSet executePublicDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, IReplacerParams replacerParams, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
-
executeDBquery
public static de.xima.cmn.db.model.SerializableResultSet executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, boolean publicOnly, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
-
executeDBquery
public static de.xima.cmn.db.model.SerializableResultSet executeDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, boolean publicOnly, IReplacerParams placeholderParams, Serializable... parameters) throws PropertyVetoException, IllegalArgumentException
-
prepareStatement
public static PreparedStatement prepareStatement(Connection con, String sql, IReplacerParams replacerParameters, Serializable... args) throws SQLException
- Throws:
SQLException
-
-