Package com.logicaldoc.core.contact

# Interface ContactDAO

All Superinterfaces:
  `PersistentObjectDAO<Contact>`

All Known Implementing Classes:
  `HibernateContactDAO`

public interface ContactDAO extends PersistentObjectDAO<Contact>
Instances of this class is a DAO-service for Contact business entities.

Since:
  6.8
Author:
  Marco Meschieri - LogicalDOC

## Field Summary

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

`ENTITY`

## Method Summary

Modifier and Type
Method
Description
`List<Contact>`
`findByUser(Long userId, String email)`
Finds the contacts of the specified user.
`static ContactDAO`
`get()`
Gets the object available in the application context

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

## Method Details

### get

static ContactDAO get()
Gets the object available in the application context

Returns:
  the instance of this object in the application context

### findByUser

List<Contact> findByUser(Long userId, String email) throws PersistenceException
Finds the contacts of the specified user.

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