Package com.logicaldoc.core
Class HibernatePersistentObjectDAO<T extends PersistentObject>
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<T>
- Type Parameters:
- T- Class of the implementation of a- PersistentObjectthis DAO handles
- All Implemented Interfaces:
- PersistentObjectDAO<T>
- Direct Known Subclasses:
- HibernateApiKeyDAO,- HibernateAttributeOptionDAO,- HibernateAttributeSetDAO,- HibernateBookmarkDAO,- HibernateContactDAO,- HibernateDashletDAO,- HibernateDeviceDAO,- HibernateDocumentDAO,- HibernateDocumentLinkDAO,- HibernateDocumentNoteDAO,- HibernateFolderDAO,- HibernateGenericDAO,- HibernateGroupDAO,- HibernateHistoryDAO,- HibernateMenuDAO,- HibernateMessageTemplateDAO,- HibernatePasswordHistoryDAO,- HibernateRatingDAO,- HibernateSearchDAO,- HibernateSequenceDAO,- HibernateSessionDAO,- HibernateSystemMessageDAO,- HibernateTemplateDAO,- HibernateTenantDAO,- HibernateTicketDAO,- HibernateUserDAO,- HibernateVersionDAO
public abstract class HibernatePersistentObjectDAO<T extends PersistentObject>
extends Object
implements PersistentObjectDAO<T>
Hibernate implementation of 
PersistentObjectDAO- Since:
- 4.0
- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionintbulkUpdate(String expression, Map<String, Object> parameters) Executes a bulk update as specified by the given HQL expressionvoiddelete(long id) This method deletes an entity.voiddelete(long id, int code) This method deletes an entity and you can give a deletion codevoiddeleteAll(Collection<T> entities) Deletes all entries form the databasevoiddeleteAll(Collection<T> entities, int code) Deletes all entries form the database giving a specific deletion codevoidevict(long id) Removes an entity from current session and cachevoidevict(Class<? extends PersistentObject> obj, long id) Removes an entity from current session and cachefindAll()Finds all entities in the databasefindAll(long tenantId) Finds all entities in a specific tenant.Finds all entities idsfindAllIds(long tenantId) Finds all entities ids in a specific tenant.findById(long id) This method finds an entity by IDfindById(long id, boolean initialize) This method finds an entity by IDFinds all entities by the given object query.<R> List<R> Find everything you want from the DB using the ORM query languageFind everything you want from the DB using the ORM query languagefindByWhere(String where, String order, Integer max) Finds all entities by the given expression.Finds all entities by the given expression.findIdsByWhere(String where, String order, Integer max) Finds all entities ids by the given expression.Finds all entities ids by the given expression.Retrieves the metadata from the databasegetDbms()Get the DBMS name currently connected(possible values are: mysql, mariadb, postgresql, hsqldb, oracle, mssql)voidinitialize(T entity) Doesn't do anything by defaultbooleanisMySQL()booleanisOracle()intjdbcUpdate(String sql) Executes the given SQL update statementintjdbcUpdate(String sql, Map<String, Object> parameters) Issue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments<P> List<P> query(String sql, Map<String, Object> parameters, org.springframework.jdbc.core.RowMapper<P> rowMapper, Integer maxRows) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, mapping each row to a Java object via a RowMapper.<P> List<P> Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, mapping each row to a Java object via a RowMapper.doublequeryForDouble(String sql) Execute a query that results in a double value, given static SQL.doublequeryForDouble(String sql, Map<String, Object> parameters) Execute a query that results in a double value, given static SQL.intqueryForInt(String sql) Execute a query that results in an int value, given static SQL.intqueryForInt(String sql, Map<String, Object> parameters) Execute a query that results in an int value, given static SQL.<R> List<R> queryForList(String sql, Class<R> requiredType) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list.<R> List<R> queryForList(String sql, Class<R> requiredType, Integer maxRows) Execute a query for a result list, given static SQL.<R> List<R> Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list.longqueryForLong(String sql) Execute a query that results in an long value, given static SQL.longqueryForLong(String sql, Map<String, Object> parameters) Execute a query that results in an long value, given static SQL.<R> RqueryForObject(String sql, Class<R> requiredType) Execute a query that results in a Object value, given static SQL.<R> RExecute a query that results in a Object value, given static SQL.voidqueryForResultSet(String sql, Map<String, Object> parameters, Integer maxRows, ResultSetWalker walker) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, you can give your own worker to iterate theResultSet.queryForString(String sql) Execute a query that results in an string value, given static SQL.queryForString(String sql, Map<String, Object> parameters) Execute a query that results in an string value, given static SQL.voidsetSessionFactory(org.hibernate.SessionFactory sessionFactory) voidThis method persists the entity object
- 
Method Details- 
setSessionFactorypublic void setSessionFactory(org.hibernate.SessionFactory sessionFactory) 
- 
deleteDescription copied from interface:PersistentObjectDAOThis method deletes an entity and you can give a deletion code- Specified by:
- deletein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- id- ID of the entity which should be deleted
- code- Deletion code
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
deleteDescription copied from interface:PersistentObjectDAOThis method deletes an entity. Same as delete(id, 1)- Specified by:
- deletein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- id- ID of the entity which should be deleted.
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findAllDescription copied from interface:PersistentObjectDAOFinds all entities in the database- Specified by:
- findAllin interface- PersistentObjectDAO<T extends PersistentObject>
- Returns:
- The list of all entities
- Throws:
- PersistenceException- Error in the database
 
- 
findAllDescription copied from interface:PersistentObjectDAOFinds all entities in a specific tenant.- Specified by:
- findAllin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- tenantId- Identifier of the tenant to search in
- Returns:
- The list of all entities
- Throws:
- PersistenceException- Error in the database
 
- 
findAllIdsDescription copied from interface:PersistentObjectDAOFinds all entities ids- Specified by:
- findAllIdsin interface- PersistentObjectDAO<T extends PersistentObject>
- Returns:
- The list of all entities ids
- Throws:
- PersistenceException- Error in the database
 
- 
findAllIdsDescription copied from interface:PersistentObjectDAOFinds all entities ids in a specific tenant.- Specified by:
- findAllIdsin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- tenantId- Identifier of the tenant to search in
- Returns:
- The list of all entities ids
- Throws:
- PersistenceException- Error in the database
 
- 
findByIdDescription copied from interface:PersistentObjectDAOThis method finds an entity by ID- Specified by:
- findByIdin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- id- ID of the entity
- initialize- True if the instance's lazy collections have to be initialized
- Returns:
- Entity with given ID
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findByIdDescription copied from interface:PersistentObjectDAOThis method finds an entity by ID- Specified by:
- findByIdin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- id- ID of the entity
- Returns:
- Entity with given ID
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findByWhereDescription copied from interface:PersistentObjectDAOFinds all entities by the given expression. Use "_entity"<T extends PersistentObject> alias to reference attributes in the where expression.- Specified by:
- findByWherein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- where- The where clause expression
- order- The order clause expression
- max- Maximum results number (optional)
- Returns:
- The list of marching entities
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findByWherepublic List<T> findByWhere(String where, Map<String, Object> parameters, String order, Integer max) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOFinds all entities by the given expression. Use "_entity"<T extends PersistentObject> alias to reference attributes in the where expression.- Specified by:
- findByWherein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- where- The where clause expression
- parameters- Parameters used in the where expression
- order- The order clause expression
- max- Maximum results number (optional)
- Returns:
- The list of marching entities
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findByObjectQuerypublic List<T> findByObjectQuery(String query, Map<String, Object> parameters, Integer max) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOFinds all entities by the given object query.- Specified by:
- findByObjectQueryin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- query- The query expression
- parameters- Parameters used in the where expression
- max- Maximum results number (optional)
- Returns:
- The list of matching entities
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findByQuerypublic List<Object[]> findByQuery(String query, Map<String, Object> parameters, Integer max) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOFind everything you want from the DB using the ORM query language- Specified by:
- findByQueryin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- query- The query to execute
- parameters- The map of the parameters
- max- Maximum results number (optional)
- Returns:
- Query result
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findByQuerypublic <R> List<R> findByQuery(String query, Map<String, Object> parameters, Class<R> requiredType, Integer max) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOFind everything you want from the DB using the ORM query language- Specified by:
- findByQueryin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- query- The query to execute
- parameters- The map of the parameters
- requiredType- The type of the elements in the result
- max- Maximum results number (optional)
- Returns:
- Query result
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findIdsByWherepublic List<Long> findIdsByWhere(String where, String order, Integer max) throws PersistenceException Description copied from interface:PersistentObjectDAOFinds all entities ids by the given expression. Use "_entity"<T extends PersistentObject> alias to reference attributes in the where expression.- Specified by:
- findIdsByWherein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- where- The where clause expression
- order- The order clause expression
- max- Maximum results number (optional)
- Returns:
- The list of marching entities ids
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
findIdsByWherepublic List<Long> findIdsByWhere(String where, Map<String, Object> parameters, String order, Integer max) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOFinds all entities ids by the given expression. Use "_entity"<T extends PersistentObject> alias to reference attributes in the where expression.- Specified by:
- findIdsByWherein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- where- The where clause expression (for parameters, please use JPA-style: :paramA, :paramB ...)
- parameters- The map of the parameters
- order- The order clause expression
- max- Maximum results number (optional)
- Returns:
- The list of marching entities ids
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
storeDescription copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
- storein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- entity- entity to be stored
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
initializeDoesn't do anything by default- Specified by:
- initializein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- entity- The entity to be initialised
- Throws:
- PersistenceException- Error in the database
 
- 
querypublic <P> List<P> query(String sql, org.springframework.jdbc.core.RowMapper<P> rowMapper, Integer maxRows) throws PersistenceException Description copied from interface:PersistentObjectDAOQuery given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, mapping each row to a Java object via a RowMapper.- Specified by:
- queryin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- rowMapper- object that will map one object per row
- maxRows- the new max rows limit; null means there is no limit
- Returns:
- the result List, containing mapped objects
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
querypublic <P> List<P> query(String sql, Map<String, Object> parameters, org.springframework.jdbc.core.RowMapper<P> rowMapper, Integer maxRows) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOQuery given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, mapping each row to a Java object via a RowMapper.- Specified by:
- queryin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- rowMapper- object that will map one object per row
- maxRows- the new max rows limit; null means there is no limit
- Returns:
- the result List, containing mapped objects
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForListDescription copied from interface:PersistentObjectDAOQuery given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list. The results will be mapped to a List (one entry for each row) of result objects, each of them matching the specified element type.- Specified by:
- queryForListin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- requiredType- the required type of element in the result list (for example, Integer.class)
- Returns:
- a List of objects that match the specified element type
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForListpublic <R> List<R> queryForList(String sql, Class<R> requiredType, Integer maxRows) throws PersistenceException Description copied from interface:PersistentObjectDAOExecute a query for a result list, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForList method with null as argument array. The results will be mapped to a List (one entry for each row) of result objects, each of them matching the specified element type.- Specified by:
- queryForListin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- requiredType- the required type of element in the result list (for example, Integer.class)
- maxRows- maximum number of returned records
- Returns:
- a List of objects that match the specified element type
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForListpublic <R> List<R> queryForList(String sql, Map<String, Object> parameters, Class<R> requiredType, Integer maxRows) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOQuery given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list. The results will be mapped to a List (one entry for each row) of result objects, each of them matching the specified element type.- Specified by:
- queryForListin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- requiredType- the required type of element in the result list (for example, Integer.class)
- maxRows- maximum number of returned records
- Returns:
- a List of objects that match the specified element type
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForResultSetpublic void queryForResultSet(String sql, Map<String, Object> parameters, Integer maxRows, ResultSetWalker walker) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOQuery given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, you can give your own worker to iterate theResultSet.- Specified by:
- queryForResultSetin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- maxRows- the new max rows limit; null means there is no limit
- walker- an implementation that receive the- ResultSetto iterate
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForIntDescription copied from interface:PersistentObjectDAOExecute a query that results in an int value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in an int value.- Specified by:
- queryForIntin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- Returns:
- the int value, or 0 in case of SQL NULL
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForIntDescription copied from interface:PersistentObjectDAOExecute a query that results in an int value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in an int value.- Specified by:
- queryForIntin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- parameters- Parameters used in the where expression (map name-value)
- Returns:
- the int value, or 0 in case of SQL NULL
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForLongDescription copied from interface:PersistentObjectDAOExecute a query that results in an long value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a long value.- Specified by:
- queryForLongin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- Returns:
- the long value, or 0 in case of SQL NULL
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForLongDescription copied from interface:PersistentObjectDAOExecute a query that results in an long value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a long value.- Specified by:
- queryForLongin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- Returns:
- the long value, or 0 in case of SQL NULL
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForDoubleDescription copied from interface:PersistentObjectDAOExecute a query that results in a double value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a long value.- Specified by:
- queryForDoublein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- Returns:
- the double value, or 0 in case of SQL NULL
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForDoubleDescription copied from interface:PersistentObjectDAOExecute a query that results in a double value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a long value.- Specified by:
- queryForDoublein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- Returns:
- the double value, or 0 in case of SQL NULL
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForStringDescription copied from interface:PersistentObjectDAOExecute a query that results in an string value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a string value.- Specified by:
- queryForStringin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- Returns:
- the string value
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForStringDescription copied from interface:PersistentObjectDAOExecute a query that results in an string value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement, use the overloaded queryForInt method with null as argument array. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a string value.- Specified by:
- queryForStringin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- Returns:
- the string value
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForObjectDescription copied from interface:PersistentObjectDAOExecute a query that results in a Object value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a object value.- Specified by:
- queryForObjectin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- requiredType- The type of the returned value
- Returns:
- the object value
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
queryForObjectpublic <R> R queryForObject(String sql, Map<String, Object> parameters, Class<R> requiredType) throws PersistenceExceptionDescription copied from interface:PersistentObjectDAOExecute a query that results in a Object value, given static SQL. Uses a JDBC Statement, not a PreparedStatement. If you want to execute a static query with a PreparedStatement. This method is useful for running static SQL with a known outcome. The query is expected to be a single row/single column query that results in a object value.- Specified by:
- queryForObjectin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL query to execute
- parameters- Optional map of parameters
- requiredType- The type of the returned value
- Returns:
- the object value
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
jdbcUpdateDescription copied from interface:PersistentObjectDAOIssue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments- Specified by:
- jdbcUpdatein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- SQL statement to execute (for parameters please use JPA-style: :paramA, :paramB ...)
- parameters- Parameters used in the where expression (map name-value)
- Returns:
- the number of rows affected
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
jdbcUpdateDescription copied from interface:PersistentObjectDAOExecutes the given SQL update statement- Specified by:
- jdbcUpdatein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- sql- the SQL statement to execute against the database
- Returns:
- the value returned by the database after execution
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
deleteAllDescription copied from interface:PersistentObjectDAODeletes all entries form the database giving a specific deletion code- Specified by:
- deleteAllin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- entities- The entities to be deleted
- code- The deletion code
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
deleteAllDescription copied from interface:PersistentObjectDAODeletes all entries form the database- Specified by:
- deleteAllin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- entities- The entities to be deleted
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
bulkUpdateDescription copied from interface:PersistentObjectDAOExecutes a bulk update as specified by the given HQL expression- Specified by:
- bulkUpdatein interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- expression- The update expression.
- parameters- Optional map of parameters
- Returns:
- the number of modified records
- Throws:
- PersistenceException- raised in case of errors in the database
 
- 
evictDescription copied from interface:PersistentObjectDAORemoves an entity from current session and cache- Specified by:
- evictin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- obj- Class of the entity to evict
- id- Identifier of the entity
 
- 
evictpublic void evict(long id) Description copied from interface:PersistentObjectDAORemoves an entity from current session and cache- Specified by:
- evictin interface- PersistentObjectDAO<T extends PersistentObject>
- Parameters:
- id- Identifier of the entity
 
- 
getDbmsDescription copied from interface:PersistentObjectDAOGet the DBMS name currently connected(possible values are: mysql, mariadb, postgresql, hsqldb, oracle, mssql)- Specified by:
- getDbmsin interface- PersistentObjectDAO<T extends PersistentObject>
- Returns:
- the database identifier
 
- 
isOraclepublic boolean isOracle()- Specified by:
- isOraclein interface- PersistentObjectDAO<T extends PersistentObject>
 
- 
isMySQLpublic boolean isMySQL()- Specified by:
- isMySQLin interface- PersistentObjectDAO<T extends PersistentObject>
 
- 
getDatabaseMetadataDescription copied from interface:PersistentObjectDAORetrieves the metadata from the database- Specified by:
- getDatabaseMetadatain interface- PersistentObjectDAO<T extends PersistentObject>
- Returns:
- a map of metadata from the database driver
 
 
-