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 HibernateProxyasHibernateProxy()Special internal contract to optimize type checking.static @Nullable LazyInitializerextractLazyInitializer(@Nullable Object object)Extract theLazyInitializerfrom the given object, if and only if the object is actually a proxy.LazyInitializergetHibernateLazyInitializer()Get the lazy initialization handler for this object.ObjectwriteReplace()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 @Nullable LazyInitializer extractLazyInitializer(@Nullable Object object)
Extract theLazyInitializerfrom 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
LazyInitializerif the given object is a proxy, ornullotherwise.
-
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:
asHibernateProxyin interfacePrimeAmongSecondarySupertypes- Returns:
- this instance
- See Also:
PrimeAmongSecondarySupertypes
-
-