|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.schwarzrot.data.access.EntityHolder
public class EntityHolder
another wrapper around HashMap
, used to cache entity instances
already read from persistence.
Constructor Summary | |
---|---|
EntityHolder()
|
Method Summary | |
---|---|
void |
clear()
clear the cache and force all entities to get read again from storage |
boolean |
contains(Class<? extends Entity> entityType,
long id)
returns true, if the instance identified by entityType and
id is cached, otherwise false |
void |
dumpStats()
tell some statistics about entity cache |
Entity |
get(Class<? extends Entity> entityType,
long id)
returns instance identified by entityType and id . |
void |
put(Entity e)
puts an instance to cache |
void |
remove(Class<? extends Entity> entityType,
long id)
remove instance from cache |
void |
remove(Class<? extends Entity> entityType,
long[] idList)
remove a number of instances from cache, identified by entity type and list of ids |
void |
removeRelated(Class<?> relatedType,
Entity parent,
EntityDescriptor ed)
remove instances from cache, that are related to given parent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityHolder()
Method Detail |
---|
public void clear()
public boolean contains(Class<? extends Entity> entityType, long id)
entityType
and
id
is cached, otherwise false
entityType
- - the class to searchid
- - the id to search
public void dumpStats()
public Entity get(Class<? extends Entity> entityType, long id)
entityType
and id
.
entityType
- - class to searchid
- - id to search
public void put(Entity e)
e
- - instance to cachepublic void remove(Class<? extends Entity> entityType, long id)
entityType
- - the class of instance to removeid
- - the id of instance to removepublic void remove(Class<? extends Entity> entityType, long[] idList)
entityType
- - the class of instances to removeidList
- - the list of ids to removepublic void removeRelated(Class<?> relatedType, Entity parent, EntityDescriptor ed)
relatedType
- - class of instances to removeparent
- - parent the instances to remove are related toed
- - the entity descriptor
|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |