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 `PersistentObject` this DAO handles

All Implemented Interfaces:
  `PersistentObjectDAO<T>`

Direct Known Subclasses:
  `HibernateApiKeyDAO`, `HibernateAttributeOptionDAO`, `HibernateAttributeSetDAO`, `HibernateBookmarkDAO`, `HibernateContactDAO`, `HibernateDashletDAO`, `HibernateDeviceDAO`, `HibernateDocumentDAO`, `HibernateDocumentLinkDAO`, `HibernateDocumentNoteDAO`, `HibernateFillerDAO`, `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 Summary

### Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO

`ENTITY`

## Method Summary

Modifier and Type
Method
Description
`int`
`bulkUpdate(String expression, Map<String,Object> parameters)`
Executes a bulk update as specified by the given HQL expression
`long`
`count(Long tenantId, boolean includeDeleted)`
Counts the total number of entities
`void`
`delete(long id, int code)`
This method deletes an entity and you can give a deletion code
`void`
`deleteAll(Collection<T> entities, int code)`
Deletes all entries form the database giving a specific deletion code
`void`
`evict(long id)`
Removes an entity from current session and cache
`void`
`evict(Class<? extends PersistentObject> obj, long id)`
Removes an entity from current session and cache
`T`
`findById(long id)`
This method finds an entity by ID
`List<T>`
`findByObjectQuery(String query, Map<String,Object> parameters, Integer max)`
Finds all entities by the given object query.
`<R> List<R>`
`findByQuery(String query, Map<String,Object> parameters, Class<R> requiredType, Integer max)`
Find everything you want from the DB using the ORM query language
`List<Object[]>`
`findByQuery(String query, Map<String,Object> parameters, Integer max)`
Find everything you want from the DB using the ORM query language
`List<T>`
`findByWhere(String where, Map<String,Object> parameters, String order, Integer max)`
Finds all entities by the given expression.
`List<Long>`
`findIdsByWhere(String where, Map<String,Object> parameters, String order, Integer max)`
Finds all entities ids by the given expression.
`Map<String,String>`
`getDatabaseMetadata()`
Retrieves the metadata from the database
`void`
`initialize(T entity)`
Doesn't do anything by default
`int`
`jdbcUpdate(String sql)`
Executes the given SQL update statement
`int`
`jdbcUpdate(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.
`double`
`queryForDouble(String sql)`
Execute a query that results in a double value, given static SQL.
`double`
`queryForDouble(String sql, Map<String,Object> parameters)`
Execute a query that results in a double value, given static SQL.
`int`
`queryForInt(String sql)`
Execute a query that results in an int value, given static SQL.
`int`
`queryForInt(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>`
`queryForList(String sql, Map<String,Object> parameters, Class<R> requiredType, Integer maxRows)`
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list.
`long`
`queryForLong(String sql)`
Execute a query that results in an long value, given static SQL.
`long`
`queryForLong(String sql, Map<String,Object> parameters)`
Execute a query that results in an long value, given static SQL.
`<R> R`
`queryForObject(String sql, Class<R> requiredType)`
Execute a query that results in a Object value, given static SQL.
`<R> R`
`queryForObject(String sql, Map<String,Object> parameters, Class<R> requiredType)`
Execute a query that results in a Object value, given static SQL.
`void`
`queryForResultSet(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 the `ResultSet`.
`String`
`queryForString(String sql)`
Execute a query that results in an string value, given static SQL.
`String`
`queryForString(String sql, Map<String,Object> parameters)`
Execute a query that results in an string value, given static SQL.
`void`
`setSessionFactory(org.hibernate.SessionFactory sessionFactory)`
`void`
`store(T entity)`
This method persists the entity object

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

`count, count, delete, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findByWhere, findIdsByWhere, getDbms, initialize, isMariaDB, isMySQL, isOracle, isPostgreSQL, isSQLServer, query`

## Method Details

### setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

### delete

public void delete(long id, int code) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
This method deletes an entity and you can give a deletion code

Specified by:
  `delete` in 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

### count

public long count(Long tenantId, boolean includeDeleted) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Counts the total number of entities

Specified by:
  `count` in interface `PersistentObjectDAO<T extends PersistentObject>`
Parameters:
  `tenantId` - Optional specification of the tenant
  `includeDeleted` - If deleted records must be computed as well
Returns:
  The total count
Throws:
  `PersistenceException` - Error in the database

### findById

public T findById(long id) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
This method finds an entity by ID

Specified by:
  `findById` in 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

### findByWhere

public List<T> findByWhere(String where, Map<String,Object> parameters, String order, Integer max) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Finds all entities by the given expression. Use "_entity"<T extends PersistentObject> alias to reference attributes in the where expression.

Specified by:
  `findByWhere` in 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

### findByObjectQuery

public List<T> findByObjectQuery(String query, Map<String,Object> parameters, Integer max) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Finds all entities by the given object query.

Specified by:
  `findByObjectQuery` in 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

### findByQuery

public List<Object[]> findByQuery(String query, Map<String,Object> parameters, Integer max) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Find everything you want from the DB using the ORM query language

Specified by:
  `findByQuery` in 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

### findByQuery

public <R> List<R> findByQuery(String query, Map<String,Object> parameters, Class<R> requiredType, Integer max) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Find everything you want from the DB using the ORM query language

Specified by:
  `findByQuery` in 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

### findIdsByWhere

public List<Long> findIdsByWhere(String where, Map<String,Object> parameters, String order, Integer max) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Finds all entities ids by the given expression. Use "_entity"<T extends PersistentObject> alias to reference attributes in the where expression.

Specified by:
  `findIdsByWhere` in 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

### store

public void store(T entity) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
This method persists the entity object

Specified by:
  `store` in interface `PersistentObjectDAO<T extends PersistentObject>`
Parameters:
  `entity` - entity to be stored
Throws:
  `PersistenceException` - raised in case of errors in the database

### initialize

public void initialize(T entity) throws PersistenceException
Doesn't do anything by default

Specified by:
  `initialize` in interface `PersistentObjectDAO<T extends PersistentObject>`
Parameters:
  `entity` - The entity to be initialised
Throws:
  `PersistenceException` - Error in the database

### query

public <P> List<P> query(String sql, Map<String,Object> parameters, org.springframework.jdbc.core.RowMapper<P> rowMapper, Integer maxRows) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
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.

Specified by:
  `query` in 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

### queryForList

public <R> List<R> queryForList(String sql, Class<R> requiredType) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Query 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:
  `queryForList` in 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

### queryForList

public <R> List<R> queryForList(String sql, Class<R> requiredType, Integer maxRows) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForList` in 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

### queryForList

public <R> List<R> queryForList(String sql, Map<String,Object> parameters, Class<R> requiredType, Integer maxRows) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Query 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:
  `queryForList` in 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

### queryForResultSet

public void queryForResultSet(String sql, Map<String,Object> parameters, Integer maxRows, ResultSetWalker walker) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
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 the `ResultSet`.

Specified by:
  `queryForResultSet` in 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 `ResultSet` to iterate
Throws:
  `PersistenceException` - raised in case of errors in the database

### queryForInt

public int queryForInt(String sql) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForInt` in 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

### queryForInt

public int queryForInt(String sql, Map<String,Object> parameters) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForInt` in 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

### queryForLong

public long queryForLong(String sql) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForLong` in 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

### queryForLong

public long queryForLong(String sql, Map<String,Object> parameters) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForLong` in 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

### queryForDouble

public double queryForDouble(String sql) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForDouble` in 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

### queryForDouble

public double queryForDouble(String sql, Map<String,Object> parameters) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForDouble` in 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

### queryForString

public String queryForString(String sql) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForString` in 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

### queryForString

public String queryForString(String sql, Map<String,Object> parameters) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForString` in 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

### queryForObject

public <R> R queryForObject(String sql, Class<R> requiredType) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForObject` in 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

### queryForObject

public <R> R queryForObject(String sql, Map<String,Object> parameters, Class<R> requiredType) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Execute 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:
  `queryForObject` in 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

### jdbcUpdate

public int jdbcUpdate(String sql, Map<String,Object> parameters) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Issue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments

Specified by:
  `jdbcUpdate` in 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

### jdbcUpdate

public int jdbcUpdate(String sql) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Executes the given SQL update statement

Specified by:
  `jdbcUpdate` in 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

### deleteAll

public void deleteAll(Collection<T> entities, int code) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Deletes all entries form the database giving a specific deletion code

Specified by:
  `deleteAll` in 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

### bulkUpdate

public int bulkUpdate(String expression, Map<String,Object> parameters) throws PersistenceException
Description copied from interface: `PersistentObjectDAO`
Executes a bulk update as specified by the given HQL expression

Specified by:
  `bulkUpdate` in 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

### evict

public void evict(Class<? extends PersistentObject> obj, long id)
Description copied from interface: `PersistentObjectDAO`
Removes an entity from current session and cache

Specified by:
  `evict` in interface `PersistentObjectDAO<T extends PersistentObject>`
Parameters:
  `obj` - Class of the entity to evict
  `id` - Identifier of the entity

### evict

public void evict(long id)
Description copied from interface: `PersistentObjectDAO`
Removes an entity from current session and cache

Specified by:
  `evict` in interface `PersistentObjectDAO<T extends PersistentObject>`
Parameters:
  `id` - Identifier of the entity

### getDatabaseMetadata

public Map<String,String> getDatabaseMetadata()
Description copied from interface: `PersistentObjectDAO`
Retrieves the metadata from the database

Specified by:
  `getDatabaseMetadata` in interface `PersistentObjectDAO<T extends PersistentObject>`
Returns:
  a map of metadata from the database driver