|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.crowd.model.token.TokenDAOMemory
public class TokenDAOMemory
An in-memory implementation of the TokenDAO. This will use the caching manager. Note: this is not thead-safe!
Field Summary | |
---|---|
protected static String |
IDENTIFIER_HASH_CAHE
|
protected static String |
RANDOM_HASH_CACHE
|
Constructor Summary | |
---|---|
TokenDAOMemory()
|
Method Summary | |
---|---|
Token |
add(Token token)
|
Token |
findByID(long ID)
|
Token |
findByIdentifierHash(String identifierHash)
|
Token |
findByRandomHash(String randomHash)
|
Class |
getPersistentClass()
The class that is being persisted |
Object |
load(long ID)
Loads a persistnce DAO object from the persistence store. |
Collection<Token> |
loadAll()
TokenDAOPersistence.loadAll() |
void |
remove(long directoryId,
String name)
|
void |
remove(Object persistentObject)
Removes the DAO object from the persistence store. |
void |
remove(Token token)
|
void |
removeAccessedBefore(Date expiryTime)
|
void |
removeAll()
TokenDAOPersistence.removeAll() |
void |
removeAll(long directoryId)
|
void |
save(Object persistentObject)
Saves a new DAO object to the persistence store. |
void |
saveAll(Collection<Token> tokens)
TokenDAOPersistence.saveAll() |
List<Token> |
search(EntityQuery query)
|
void |
setCacheManager(CacheManager cacheManager)
|
void |
update(Object persistentObject)
Updates an existing DAO object, if the object does not exist it will be added to the persistence store. |
Token |
update(Token token)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String RANDOM_HASH_CACHE
protected static final String IDENTIFIER_HASH_CAHE
Constructor Detail |
---|
public TokenDAOMemory()
Method Detail |
---|
public Token findByRandomHash(String randomHash) throws ObjectNotFoundException
findByRandomHash
in interface TokenDAO
ObjectNotFoundException
public Token findByIdentifierHash(String identifierHash) throws ObjectNotFoundException
findByIdentifierHash
in interface TokenDAO
ObjectNotFoundException
public Token add(Token token)
add
in interface TokenDAO
public Token update(Token token)
update
in interface TokenDAO
token
- token to update.
public void remove(Token token)
remove
in interface TokenDAO
public List<Token> search(EntityQuery query)
search
in interface TokenDAO
public Token findByID(long ID) throws ObjectNotFoundException
findByID
in interface TokenDAO
ObjectNotFoundException
public void remove(long directoryId, String name)
remove
in interface TokenDAO
public void removeAll(long directoryId)
removeAll
in interface TokenDAO
public void removeAccessedBefore(Date expiryTime)
removeAccessedBefore
in interface TokenDAO
public Class getPersistentClass()
ObjectDao
getPersistentClass
in interface ObjectDao
public void save(Object persistentObject)
ObjectDao
save
in interface ObjectDao
persistentObject
- The object to save.public void update(Object persistentObject)
ObjectDao
update
in interface ObjectDao
persistentObject
- The object to update.public void remove(Object persistentObject)
ObjectDao
remove
in interface ObjectDao
persistentObject
- The object to remove.public Object load(long ID)
ObjectDao
load
in interface ObjectDao
ID
- The unique identifier of the object to load from the persistence store.
public void setCacheManager(CacheManager cacheManager)
public Collection<Token> loadAll()
TokenDAOPersistence.loadAll()
loadAll
in interface TokenDAOPersistence
public void saveAll(Collection<Token> tokens)
TokenDAOPersistence.saveAll()
saveAll
in interface TokenDAOPersistence
tokens
- all tokens to add.public void removeAll()
TokenDAOPersistence.removeAll()
removeAll
in interface TokenDAO
removeAll
in interface TokenDAOPersistence
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |