Package org.hibernate.proxy
Interface HibernateProxy
-
- All Superinterfaces:
PrimeAmongSecondarySupertypes
,Serializable
- All Known Implementing Classes:
MapProxy
public interface HibernateProxy extends Serializable, PrimeAmongSecondarySupertypes
Interface implemented directly by entity proxies, exposing access to the associatedLazyInitializer
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HibernateProxy
asHibernateProxy()
Special internal contract to optimize type checking.static LazyInitializer
extractLazyInitializer(Object object)
Extract theLazyInitializer
from the given object, if and only if the object is actually a proxy.LazyInitializer
getHibernateLazyInitializer()
Get the lazy initialization handler for this object.Object
writeReplace()
Perform serialization-time write-replacement of this proxy.-
Methods inherited from interface org.hibernate.engine.spi.PrimeAmongSecondarySupertypes
asCompositeOwner, asCompositeTracker, asManaged, asManagedComposite, asManagedEntity, asManagedMappedSuperclass, asPersistentAttributeInterceptable, asProxyConfiguration, asSelfDirtinessTracker
-
-
-
-
Method Detail
-
extractLazyInitializer
static LazyInitializer extractLazyInitializer(Object object)
Extract theLazyInitializer
from the given object, if and only if the object is actually a proxy. Otherwise, return a null value.- Parameters:
object
- any reference to an entity- Returns:
- the associated
LazyInitializer
if the given object is a proxy, ornull
otherwise.
-
writeReplace
Object writeReplace()
Perform serialization-time write-replacement of this proxy.- Returns:
- The serializable proxy replacement.
-
getHibernateLazyInitializer
LazyInitializer getHibernateLazyInitializer()
Get the lazy initialization handler for this object.- Returns:
- The associated
LazyInitializer
.
-
asHibernateProxy
@Internal default HibernateProxy asHibernateProxy()
Special internal contract to optimize type checking.- Specified by:
asHibernateProxy
in interfacePrimeAmongSecondarySupertypes
- Returns:
- this instance
- See Also:
PrimeAmongSecondarySupertypes
-
-