Package com.logicaldoc.core.filler

# Class HibernateFillerDAO

java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Filler>
com.logicaldoc.core.filler.HibernateFillerDAO

All Implemented Interfaces:
  `FillerDAO`, `PersistentObjectDAO<Filler>`

@Repository("fillerDAO") public class HibernateFillerDAO extends HibernatePersistentObjectDAO<Filler> implements FillerDAO
Hibernate implementation of `FillerDAO`

Since:
  9.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
`Filler`
`findByName(String name, long tenantId)`
Finds the filler by it's name
`<S extends Filler>
List<S>`
`findByType(Class<S> type, long tenantId)`
Finds the fillers by type
`void`
`initialize(Filler entity)`
Doesn't do anything by default

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

`bulkUpdate, count, deleteAll, evict, evict, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findIdsByWhere, getDatabaseMetadata, 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, 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 Filler findByName(String name, long tenantId) throws PersistenceException
Description copied from interface: `FillerDAO`
Finds the filler by it's name

Specified by:
  `findByName` in interface `FillerDAO`
Parameters:
  `name` - The name
  `tenantId` - Identifier of the tenant
Returns:
  The found filler
Throws:
  `PersistenceException` - Error in the database

### initialize

public void initialize(Filler entity) throws PersistenceException
Description copied from class: `HibernatePersistentObjectDAO`
Doesn't do anything by default

Specified by:
  `initialize` in interface `PersistentObjectDAO<Filler>`
Overrides:
  `initialize` in class `HibernatePersistentObjectDAO<Filler>`
Parameters:
  `entity` - The entity to be initialised
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<Filler>`
Overrides:
  `delete` in class `HibernatePersistentObjectDAO<Filler>`
Parameters:
  `id` - ID of the entity which should be deleted
  `code` - Deletion code
Throws:
  `PersistenceException` - raised in case of errors in the database

### findByType

public <S extends Filler> List<S> findByType(Class<S> type, long tenantId) throws PersistenceException
Description copied from interface: `FillerDAO`
Finds the fillers by type

Specified by:
  `findByType` in interface `FillerDAO`
Type Parameters:
  `S` - what filler type to retrieve
Parameters:
  `type` - Type of filler
  `tenantId` - Identifier of the tenant
Returns:
  The list of fillers of same type ordered by name
Throws:
  `PersistenceException` - Error in the database