public class ApiKeyDAO extends HibernateRepository<ApiKey>
ApiKey
objectsConstructor and Description |
---|
ApiKeyDAO() |
Modifier and Type | Method and Description |
---|---|
ApiKey |
get(long id) |
List<ApiKey> |
getAllApiKeys(String sort,
int limit,
int start,
boolean asc)
Retrieves all available api keys restricted by the paging parameters
|
long |
getApiKeysCount(String userId)
Retrieves the maximum number of api keys that can be retrieved for a specified user
|
List<ApiKey> |
getApiKeysForUser(String userId,
String sort,
int limit,
int start,
boolean asc)
Retrieves list of available api keys for specified user, using the paging parameters
|
Optional<ApiKey> |
getByClientId(String clientId)
Retrieves an api key by client id.
|
create, currentSession, delete, get, getBuilder, update
public ApiKey get(long id)
public List<ApiKey> getApiKeysForUser(String userId, String sort, int limit, int start, boolean asc)
userId
- unique identifier for user whose keys are being retrievedsort
- sort fieldlimit
- paging limitstart
- paging startasc
- sort field ascendingpublic List<ApiKey> getAllApiKeys(String sort, int limit, int start, boolean asc)
sort
- sort fieldlimit
- paging limitstart
- paging startasc
- sort field ascendingpublic long getApiKeysCount(String userId)
userId
- unique user identifierpublic Optional<ApiKey> getByClientId(String clientId)
clientId
- client identifier for api keyDAOException
- if more that one api key is found or there is a problem accessing the databaseCopyright © 2017. All rights reserved.