Package org.hibernate.engine.spi
Interface ManagedEntity
-
- All Superinterfaces:
Managed
,PrimeAmongSecondarySupertypes
public interface ManagedEntity extends Managed
SpecializedManaged
contract for entity classes. Essentially provides access to information about an instance's association to a Session/EntityManager. Specific information includes:-
the association's
EntityEntry
(by way of$$_hibernate_getEntityEntry()
and$$_hibernate_setEntityEntry(org.hibernate.engine.spi.EntityEntry)
). EntityEntry describes states, snapshots, etc. -
link information. ManagedEntity instances are part of a "linked list", thus link information
describes the next and previous entries/nodes in that ordering. See
$$_hibernate_getNextManagedEntity()
,$$_hibernate_setNextManagedEntity(org.hibernate.engine.spi.ManagedEntity)
,$$_hibernate_getPreviousManagedEntity()
,$$_hibernate_setPreviousManagedEntity(org.hibernate.engine.spi.ManagedEntity)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description EntityEntry
$$_hibernate_getEntityEntry()
Provides access to the associated EntityEntry.Object
$$_hibernate_getEntityInstance()
Obtain a reference to the entity instance.ManagedEntity
$$_hibernate_getNextManagedEntity()
Part of entry linking; obtain reference to the next entry.ManagedEntity
$$_hibernate_getPreviousManagedEntity()
Part of entry linking; obtain reference to the previous entry.void
$$_hibernate_setEntityEntry(EntityEntry entityEntry)
Injects the EntityEntry associated with this entity instance.void
$$_hibernate_setNextManagedEntity(ManagedEntity next)
Part of entry linking; sets the next entry.void
$$_hibernate_setPreviousManagedEntity(ManagedEntity previous)
Part of entry linking; sets the previous entry.default ManagedEntity
asManagedEntity()
Special internal contract to optimize type checking-
Methods inherited from interface org.hibernate.engine.spi.PrimeAmongSecondarySupertypes
asCompositeOwner, asCompositeTracker, asHibernateProxy, asManagedComposite, asManagedMappedSuperclass, asPersistentAttributeInterceptable, asProxyConfiguration, asSelfDirtinessTracker
-
-
-
-
Method Detail
-
$$_hibernate_getEntityInstance
Object $$_hibernate_getEntityInstance()
Obtain a reference to the entity instance.- Returns:
- The entity instance.
-
$$_hibernate_getEntityEntry
EntityEntry $$_hibernate_getEntityEntry()
Provides access to the associated EntityEntry.- Returns:
- The EntityEntry associated with this entity instance.
- See Also:
$$_hibernate_setEntityEntry(org.hibernate.engine.spi.EntityEntry)
-
$$_hibernate_setEntityEntry
void $$_hibernate_setEntityEntry(EntityEntry entityEntry)
Injects the EntityEntry associated with this entity instance. The EntityEntry represents state associated with the entity in regards to its association with a Hibernate Session.- Parameters:
entityEntry
- The EntityEntry associated with this entity instance.
-
$$_hibernate_getPreviousManagedEntity
ManagedEntity $$_hibernate_getPreviousManagedEntity()
Part of entry linking; obtain reference to the previous entry. Can benull
, which should indicate this is the head node.- Returns:
- The previous entry
-
$$_hibernate_setPreviousManagedEntity
void $$_hibernate_setPreviousManagedEntity(ManagedEntity previous)
Part of entry linking; sets the previous entry. Again, can benull
, which should indicate this is (now) the head node.- Parameters:
previous
- The previous entry
-
$$_hibernate_getNextManagedEntity
ManagedEntity $$_hibernate_getNextManagedEntity()
Part of entry linking; obtain reference to the next entry. Can benull
, which should indicate this is the tail node.- Returns:
- The next entry
-
$$_hibernate_setNextManagedEntity
void $$_hibernate_setNextManagedEntity(ManagedEntity next)
Part of entry linking; sets the next entry. Again, can benull
, which should indicate this is (now) the tail node.- Parameters:
next
- The next entry
-
asManagedEntity
default ManagedEntity asManagedEntity()
Special internal contract to optimize type checking- Specified by:
asManagedEntity
in interfacePrimeAmongSecondarySupertypes
- Returns:
- this same instance
- See Also:
PrimeAmongSecondarySupertypes
-
-