Package com.logicaldoc.core.security

# Interface TenantDAO

All Superinterfaces:
  `PersistentObjectDAO<Tenant>`

All Known Implementing Classes:
  `HibernateTenantDAO`

public interface TenantDAO extends PersistentObjectDAO<Tenant>

## Field Summary

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

`ENTITY`

## Method Summary

Modifier and Type
Method
Description
`Set<String>`
`findAllNames()`
Retrieves all the tenant names
`Tenant`
`findByName(String name)`
Finds a tenant by name
`static TenantDAO`
`get()`
Gets the object available in the application context
`String`
`getTenantName(long tenantId)`
Retrieves the tenant's name

### 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 TenantDAO get()
Gets the object available in the application context

Returns:
  the instance of this object in the application context

### findByName

Tenant findByName(String name) throws PersistenceException
Finds a tenant by name

Parameters:
  `name` - name of wanted tenant
Returns:
  Wanted tenant or null
Throws:
  `PersistenceException` - Error in the database

### getTenantName

String getTenantName(long tenantId) throws PersistenceException
Retrieves the tenant's name

Parameters:
  `tenantId` - identifier of the tenant
Returns:
  name of the tenant
Throws:
  `PersistenceException` - Error in the database

### findAllNames

Set<String> findAllNames() throws PersistenceException
Retrieves all the tenant names

Returns:
  the collection of all the tenant names
Throws:
  `PersistenceException` - Error in the database