Interface ApiKeyDAO
- All Superinterfaces:
- PersistentObjectDAO<ApiKey>
- All Known Implementing Classes:
- HibernateApiKeyDAO
DAO for 
ApiKey handling.- Since:
- 8.9.4
- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier 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.PersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
- 
Method Details- 
findByNameFinds the user's ApiKey with a given name- Parameters:
- name- the name of the ApiKey
- userId- the identifier of the user
- Returns:
- The unique matching ApiKey
- Throws:
- PersistenceException- Error in the database
 
- 
findByKeyFinds the ApiKey by the unique key- Parameters:
- key- the key to find
- Returns:
- The unique matching ApiKey
- Throws:
- PersistenceException- Error in the database
- NoSuchAlgorithmException- Error when encripting the key
 
- 
findByUserFinds 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
 
 
-