|
||||||||||
| 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 java.lang.String |
IDENTIFIER_HASH_CAHE
|
protected static java.lang.String |
RANDOM_HASH_CACHE
|
| Constructor Summary | |
|---|---|
TokenDAOMemory()
|
|
| Method Summary | |
|---|---|
Token |
add(Token token)
|
Token |
findByID(long ID)
|
Token |
findByIdentifierHash(java.lang.String identifierHash)
|
Token |
findByRandomHash(java.lang.String randomHash)
|
java.lang.Class |
getPersistentClass()
The class that is being persisted |
java.lang.Object |
load(long ID)
Loads a persistnce DAO object from the persistence store. |
java.util.Collection<Token> |
loadAll()
TokenDAOPersistence.loadAll() |
void |
remove(long directoryId,
java.lang.String name)
|
void |
remove(java.lang.Object persistentObject)
Removes the DAO object from the persistence store. |
void |
remove(Token token)
|
void |
removeAccessedBefore(java.util.Date expiryTime)
|
void |
removeAll()
TokenDAOPersistence.removeAll() |
void |
removeAll(long directoryId)
|
void |
save(java.lang.Object persistentObject)
Saves a new DAO object to the persistence store. |
void |
saveAll(java.util.Collection<Token> tokens)
TokenDAOPersistence.saveAll() |
java.util.List<Token> |
search(EntityQuery query)
|
void |
setCacheManager(CacheManager cacheManager)
|
void |
update(java.lang.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 java.lang.String RANDOM_HASH_CACHE
protected static final java.lang.String IDENTIFIER_HASH_CAHE
| Constructor Detail |
|---|
public TokenDAOMemory()
| Method Detail |
|---|
public Token findByRandomHash(java.lang.String randomHash)
throws ObjectNotFoundException
findByRandomHash in interface TokenDAOObjectNotFoundException
public Token findByIdentifierHash(java.lang.String identifierHash)
throws ObjectNotFoundException
findByIdentifierHash in interface TokenDAOObjectNotFoundExceptionpublic Token add(Token token)
add in interface TokenDAOpublic Token update(Token token)
update in interface TokenDAOtoken - token to update.
public void remove(Token token)
remove in interface TokenDAOpublic java.util.List<Token> search(EntityQuery query)
search in interface TokenDAO
public Token findByID(long ID)
throws ObjectNotFoundException
findByID in interface TokenDAOObjectNotFoundException
public void remove(long directoryId,
java.lang.String name)
remove in interface TokenDAOpublic void removeAll(long directoryId)
removeAll in interface TokenDAOpublic void removeAccessedBefore(java.util.Date expiryTime)
removeAccessedBefore in interface TokenDAOpublic java.lang.Class getPersistentClass()
ObjectDao
getPersistentClass in interface ObjectDaopublic void save(java.lang.Object persistentObject)
ObjectDao
save in interface ObjectDaopersistentObject - The object to save.public void update(java.lang.Object persistentObject)
ObjectDao
update in interface ObjectDaopersistentObject - The object to update.public void remove(java.lang.Object persistentObject)
ObjectDao
remove in interface ObjectDaopersistentObject - The object to remove.public java.lang.Object load(long ID)
ObjectDao
load in interface ObjectDaoID - The unique identifier of the object to load from the persistence store.
public void setCacheManager(CacheManager cacheManager)
public java.util.Collection<Token> loadAll()
TokenDAOPersistence.loadAll()
loadAll in interface TokenDAOPersistencepublic void saveAll(java.util.Collection<Token> tokens)
TokenDAOPersistence.saveAll()
saveAll in interface TokenDAOPersistencetokens - all tokens to add.public void removeAll()
TokenDAOPersistence.removeAll()
removeAll in interface TokenDAOremoveAll in interface TokenDAOPersistence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||