Package com.logicaldoc.core.security
Class HibernateTenantDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Tenant>
com.logicaldoc.core.security.HibernateTenantDAO
- All Implemented Interfaces:
PersistentObjectDAO<Tenant>
,TenantDAO
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionint
count()
Counts the total number of tenantsRetrieves all the tenant namesfindByName
(String name) Finds a tenant by namegetTenantName
(long tenantId) Retrieves the tenant's namevoid
This method persists the entity objectMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, 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, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString
-
Method Details
-
findByName
Description copied from interface:TenantDAO
Finds a tenant by name- Specified by:
findByName
in interfaceTenantDAO
- Parameters:
name
- name of wanted tenant- Returns:
- Wanted tenant or null
-
count
public int count()Description copied from interface:TenantDAO
Counts the total number of tenants -
findAllNames
Description copied from interface:TenantDAO
Retrieves all the tenant names- Specified by:
findAllNames
in interfaceTenantDAO
- Returns:
- the collection of all the tenant names
- Throws:
PersistenceException
- Error in the database
-
store
Description copied from interface:PersistentObjectDAO
This method persists the entity object- Specified by:
store
in interfacePersistentObjectDAO<Tenant>
- Overrides:
store
in classHibernatePersistentObjectDAO<Tenant>
- Parameters:
entity
- entity to be stored
-
getTenantName
Description copied from interface:TenantDAO
Retrieves the tenant's name- Specified by:
getTenantName
in interfaceTenantDAO
- Parameters:
tenantId
- identifier of the tenant- Returns:
- name of the tenant
-