Class FirstLevelCache
- java.lang.Object
-
- org.hibernate.envers.internal.reader.FirstLevelCache
-
public class FirstLevelCache extends Object
First level cache for versioned entities, versions reader-scoped. Each entity is uniquely identified by a revision number and entity id.
-
-
Constructor Summary
Constructors Constructor Description FirstLevelCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(String entityName, Number revision, Object id)
boolean
containsEntityName(Object id, Number revision, Object entity)
Object
get(String entityName, Number revision, Object id)
String
getFromEntityNameCache(Object id, Number revision, Object entity)
Gets the entityName from the cache.void
put(String entityName, Number revision, Object id, Object entity)
void
putOnEntityNameCache(Object id, Number revision, Object entity, String entityName)
Adds the entityName into the cache.
-
-
-
Method Detail
-
putOnEntityNameCache
public void putOnEntityNameCache(Object id, Number revision, Object entity, String entityName)
Adds the entityName into the cache. The key is a triple make with primaryKey, revision and entity- Parameters:
id
- primaryKeyrevision
- revision numberentity
- object retrieved by enversentityName
- value of the cache
-
getFromEntityNameCache
public String getFromEntityNameCache(Object id, Number revision, Object entity)
Gets the entityName from the cache. The key is a triple make with primaryKey, revision and entity- Parameters:
id
- primaryKeyrevision
- revision numberentity
- object retrieved by envers- Returns:
- The appropriate entity name
-
-