Class LazyAttributeLoadingInterceptor

    • Constructor Detail

      • LazyAttributeLoadingInterceptor

        public LazyAttributeLoadingInterceptor​(java.lang.String entityName,
                                               java.lang.Object identifier,
                                               java.util.Set<java.lang.String> lazyFields,
                                               SharedSessionContractImplementor session)
    • Method Detail

      • getIdentifier

        public java.lang.Object getIdentifier()
        Description copied from interface: BytecodeLazyAttributeInterceptor
        The id of the entity instance this interceptor is associated with
      • handleRead

        protected java.lang.Object handleRead​(java.lang.Object target,
                                              java.lang.String attributeName,
                                              java.lang.Object value)
        Description copied from class: AbstractInterceptor
        Handle the case of reading an attribute. The result is what is returned to the caller
        Specified by:
        handleRead in class AbstractInterceptor
      • handleWrite

        protected java.lang.Object handleWrite​(java.lang.Object target,
                                               java.lang.String attributeName,
                                               java.lang.Object oldValue,
                                               java.lang.Object newValue)
        Description copied from class: AbstractInterceptor
        Handle the case of writing an attribute. The result is what is set as the entity state
        Specified by:
        handleWrite in class AbstractInterceptor
      • fetchAttribute

        public java.lang.Object fetchAttribute​(java.lang.Object target,
                                               java.lang.String attributeName)
        Fetches the lazy attribute. The attribute does not get associated with the entity. (To be used by hibernate methods)
      • loadAttribute

        protected java.lang.Object loadAttribute​(java.lang.Object target,
                                                 java.lang.String attributeName)
      • isAttributeLoaded

        public boolean isAttributeLoaded​(java.lang.String fieldName)
      • hasAnyUninitializedAttributes

        public boolean hasAnyUninitializedAttributes()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • attributeInitialized

        public void attributeInitialized​(java.lang.String name)
        Description copied from interface: BytecodeLazyAttributeInterceptor
        Callback from the enhanced class that an attribute has been read or written
      • getInitializedLazyAttributeNames

        public java.util.Set<java.lang.String> getInitializedLazyAttributeNames()
        Description copied from interface: BytecodeLazyAttributeInterceptor
        The names of all lazy attributes which have been initialized