public class AliasDAOHibernate extends HibernateDao implements AliasDAO
batchFinder, batchProcessor, logger
Constructor and Description |
---|
AliasDAOHibernate() |
Modifier and Type | Method and Description |
---|---|
String |
findAliasByUsername(Application application,
String username)
Retrieves the application-specific alias for a username.
|
List<Alias> |
findAll() |
String |
findUsernameByAlias(Application application,
String alias)
Retrieves the real username for a user in a directory given their application-specific alias.
|
Class |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(long) to
work correctly |
void |
removeAlias(Application application,
String username)
Remove an application-specific alias for a username.
|
void |
removeAliases(Application application)
Removes all the username-aliases for a specific application.
|
List<String> |
search(EntityQuery<String> entityQuery)
Will search for a List of Alias' based on a given
EntityQuery |
void |
setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater) |
void |
storeAlias(Application application,
String username,
String alias)
Add or update the application-specific alias for a username.
|
load, load, loadReference, loadReference, remove, save, saveOrUpdate, setBatchFinder, setBatchProcessor, update
public Class getPersistentClass()
HibernateDao
HibernateDao.load(long)
to
work correctlygetPersistentClass
in class HibernateDao
public List<String> search(EntityQuery<String> entityQuery)
AliasDAO
EntityQuery
search
in interface AliasDAO
entityQuery
- an entity query of type EntityDescriptor.alias()
public String findAliasByUsername(Application application, String username)
AliasDAO
findAliasByUsername
in interface AliasDAO
application
- application context.username
- real username of user in directory.null
if there is no alias for the user/application.public String findUsernameByAlias(Application application, String alias)
AliasDAO
findUsernameByAlias
in interface AliasDAO
application
- application context.alias
- application-specific alias.null
if there is no user with the supplied alias for the given application.public void storeAlias(Application application, String username, String alias)
AliasDAO
storeAlias
in interface AliasDAO
application
- application context.username
- real username of user in directory.alias
- application-specific alias (cannot be null
or blank).public void removeAlias(Application application, String username)
AliasDAO
removeAlias
in interface AliasDAO
application
- application context.username
- real username of user in directory.public void removeAliases(Application application)
AliasDAO
removeAliases
in interface AliasDAO
application
- application context.public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
Copyright © 2013 Atlassian. All Rights Reserved.