public class EntityEntryContext extends Object
ManagedEntity contract,
either directly or through bytecode enhancement.
| Modifier and Type | Class and Description |
|---|---|
static interface |
EntityEntryContext.EntityEntryCrossRef
Used in building the
reentrantSafeEntityEntries() entries |
| Constructor and Description |
|---|
EntityEntryContext(PersistenceContext persistenceContext)
Constructs a EntityEntryContext
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntityEntry(Object entity,
EntityEntry entityEntry)
Adds the entity and entry to this context, associating them together
|
void |
clear()
Clear this context of all managed entities
|
static EntityEntryContext |
deserialize(ObjectInputStream ois,
StatefulPersistenceContext rtn)
JDK serialization hook for deserializing
|
void |
downgradeLocks()
Down-grade locks to NONE for all entities in this context
|
EntityEntry |
getEntityEntry(Object entity)
Retrieve the associated EntityEntry for the entity
|
int |
getNumberOfManagedEntities() |
boolean |
hasEntityEntry(Object entity)
Does this entity exist in this context, associated with an EntityEntry?
|
Map.Entry<Object,EntityEntry>[] |
reentrantSafeEntityEntries()
The main bugaboo with IdentityMap that warranted this class in the first place.
|
EntityEntry |
removeEntityEntry(Object entity)
Remove an entity from the context, returning the EntityEntry which was associated with it
|
void |
serialize(ObjectOutputStream oos)
JDK serialization hook for serializing
|
public EntityEntryContext(PersistenceContext persistenceContext)
public void addEntityEntry(Object entity, EntityEntry entityEntry)
entity - The entityentityEntry - The entrypublic boolean hasEntityEntry(Object entity)
entity - The entity to checktrue if it is associated with this contextpublic EntityEntry getEntityEntry(Object entity)
entity - The entity to retrieve the EntityEntry forpublic EntityEntry removeEntityEntry(Object entity)
entity - The entity to removepublic Map.Entry<Object,EntityEntry>[] reentrantSafeEntityEntries()
public void clear()
public void downgradeLocks()
public void serialize(ObjectOutputStream oos) throws IOException
oos - The stream to write ourselves toIOException - Indicates an IO exception accessing the given streampublic static EntityEntryContext deserialize(ObjectInputStream ois, StatefulPersistenceContext rtn) throws IOException, ClassNotFoundException
ois - The stream to read ourselves fromrtn - The persistence context we belong toIOException - Indicates an IO exception accessing the given streamClassNotFoundException - Problem reading stream datapublic int getNumberOfManagedEntities()
Copyright © 2017 JBoss by Red Hat. All rights reserved.