Package com.logicaldoc.core.contact

# Class HibernateContactDAO

java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Contact>
com.logicaldoc.core.contact.HibernateContactDAO

All Implemented Interfaces:
  `ContactDAO`, `PersistentObjectDAO<Contact>`

@Repository("contactDAO") public class HibernateContactDAO extends HibernatePersistentObjectDAO<Contact> implements ContactDAO
Hibernate implementation of `ContactDAO`

Since:
  4.0
Author:
  Marco Meschieri - LogicalDOC

## Field Summary

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

`ENTITY`

## Constructor Summary

Constructors
Constructor
Description
`HibernateContactDAO()`

## Method Summary

Modifier and Type
Method
Description
`List<Contact>`
`findByUser(Long userId, String email)`
Finds the contacts of the specified user.
`void`
`store(Contact contact)`
This method persists the entity object

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

`bulkUpdate, count, delete, 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`

### 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, 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`

## Constructor Details

### HibernateContactDAO

public HibernateContactDAO()

## Method Details

### findByUser

public List<Contact> findByUser(Long userId, String email) throws PersistenceException
Description copied from interface: `ContactDAO`
Finds the contacts of the specified user.

Specified by:
  `findByUser` in interface `ContactDAO`
Parameters:
  `userId` - The ID of the user or null
  `email` - Optional email specification,
Returns:
  The collection of found Contacts
Throws:
  `PersistenceException` - Error in the database

### store

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

Specified by:
  `store` in interface `PersistentObjectDAO<Contact>`
Overrides:
  `store` in class `HibernatePersistentObjectDAO<Contact>`
Parameters:
  `contact` - entity to be stored
Throws:
  `PersistenceException` - raised in case of errors in the database