Interface ApiKeyDAO
- All Superinterfaces:
PersistentObjectDAO<ApiKey>
- All Known Implementing Classes:
HibernateApiKeyDAO
DAO for
ApiKey
handling.- Since:
- 8.9.4
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionFinds the ApiKey by the unique keyfindByName
(String name, long userId) Finds the user's ApiKey with a given namefindByUser
(long userId) Finds the user's ApiKeys for a given userMethods 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, store
-
Method Details
-
findByName
Finds the user's ApiKey with a given name- Parameters:
name
- the name of the ApiKeyuserId
- the identifier of the user- Returns:
- The unique matching ApiKey
- Throws:
PersistenceException
- Error in the database
-
findByKey
Finds the ApiKey by the unique key- Parameters:
key
- the key to find- Returns:
- The unique matching ApiKey
- Throws:
PersistenceException
- Error in the databaseNoSuchAlgorithmException
- Error when encripting the key
-
findByUser
Finds the user's ApiKeys for a given user- Parameters:
userId
- the identifier of the user- Returns:
- The list of api keys ordered by name
- Throws:
PersistenceException
- Error in the database
-