Package de.xima.fc.manager
Class DBQueryManager
java.lang.Object
de.xima.fc.manager.DBQueryManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic de.xima.cmn.db.model.SerializableResultSetexecuteDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, boolean publicOnly, IReplacerParams placeholderParams, Serializable... parameters) static de.xima.cmn.db.model.SerializableResultSetexecuteDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, boolean publicOnly, Serializable... parameters) static de.xima.cmn.db.model.SerializableResultSetexecuteDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, IReplacerParams placeholderParams, Serializable... parameters) static de.xima.cmn.db.model.SerializableResultSetexecuteDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, Serializable... parameters) static de.xima.cmn.db.model.SerializableResultSetexecuteDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, Serializable... parameters) Deprecated.static de.xima.cmn.db.model.SerializableResultSetexecutePublicDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, IReplacerParams replacerParams, Serializable... parameters) static de.xima.cmn.db.model.SerializableResultSetexecutePublicDBquery(IEntityContext ec, Mandant mandant, String datenquellenName, boolean suppressStatementLimits, Serializable... parameters) static IntegerexecuteSql(IEntityContext ec, Long dbZugriffId, String sql) static PreparedStatementprepareStatement(Connection con, String sql, IReplacerParams replacerParameters, Serializable... args) static de.xima.cmn.db.model.SerializableResultSetquery(IEntityContext ec, Integer dbZugriffId, String sql, boolean suppressStatementLimits, IReplacerParams params, Serializable... args) static de.xima.cmn.db.model.SerializableResultSetquery(IEntityContext ec, Integer dbZugriffId, String sql, boolean suppressStatementLimits, Serializable... args) static de.xima.cmn.db.model.SerializableResultSetquery(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args) Deprecated.static de.xima.cmn.db.model.SerializableResultSetquery(Connection con, String sql, boolean suppressStatementLimits, Serializable... args) static de.xima.cmn.db.model.SerializableResultSetquery(Connection con, String sql, IReplacerParams params, boolean suppressStatementLimits, Serializable... args) static intupdate(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args)
-
Constructor Details
-
DBQueryManager
public DBQueryManager()
-
-
Method Details
-
update
public static int update(IEntityContext ec, Integer dbZugriffId, String sql, Serializable... args) throws PropertyVetoException - Parameters:
ec- theIEntityContextdbZugriffId-Integerthe id of the database-connectionsql-Stringthe sqlargs-Serializableparameters- Returns:
Integerthe 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-IEntityContextdbZugriffId-Integerthe id of the database-connectionsql-Stringthe sqlsuppressStatementLimits-Booleanif the statement limit should be suppressedargs-Serializableparameters- 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-Booleanif the statement limit should be suppressedargs- Additional arguments for the prepared statement.- Returns:
- The result of the SQL query, or
nullwhen 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- theIEntityContextdbZugriffId-Longthe id of the database-connectionsql-Stringthe 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- theIEntityContextmandant- theManagedBeanCreationExceptiondatenquellenName-Stringthe name of the datasourcesuppressStatementLimits-Booleanif the statement limi should be supressedparameters-Serializableparameters- 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
-
executeDBquery(IEntityContext, Mandant, String, boolean, Serializable...).