Package com.logicaldoc.core.dashlet

# Class HibernateDashletDAO

java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Dashlet>
com.logicaldoc.core.dashlet.HibernateDashletDAO

All Implemented Interfaces:
  `DashletDAO`, `PersistentObjectDAO<Dashlet>`

@Repository("dashletDAO") public class HibernateDashletDAO extends HibernatePersistentObjectDAO<Dashlet> implements DashletDAO
Hibernate implementation of `DashletDAO`

Since:
  8.2.3
Author:
  Marco Meschieri - LogicalDOC

## Field Summary

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

`ENTITY`

## Method Summary

Modifier and Type
Method
Description
`void`
`delete(long id, int code)`
This method deletes an entity and you can give a deletion code
`Dashlet`
`findByName(String name, long tenantId)`
Finds the dashlet by it's name

### Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO

`bulkUpdate, count, deleteAll, evict, evict, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findIdsByWhere, getDatabaseMetadata, initialize, jdbcUpdate, jdbcUpdate, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, setSessionFactory, store`

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

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

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

`bulkUpdate, count, count, count, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, initialize, isMariaDB, isMySQL, isOracle, isPostgreSQL, isSQLServer, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store`

## Method Details

### findByName

public Dashlet findByName(String name, long tenantId) throws PersistenceException
Description copied from interface: `DashletDAO`
Finds the dashlet by it's name

Specified by:
  `findByName` in interface `DashletDAO`
Parameters:
  `name` - name of the dashlet
  `tenantId` - identifier of the tenant
Returns:
  the found dashlet
Throws:
  `PersistenceException` - Error in the database

### 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<Dashlet>`
Overrides:
  `delete` in class `HibernatePersistentObjectDAO<Dashlet>`
Parameters:
  `id` - ID of the entity which should be deleted
  `code` - Deletion code
Throws:
  `PersistenceException` - raised in case of errors in the database