Package org.hibernate

Class EmptyInterceptor

    • Field Detail

      • INSTANCE

        public static final Interceptor INSTANCE
        The singleton reference.
    • Constructor Detail

      • EmptyInterceptor

        protected EmptyInterceptor()
    • Method Detail

      • onSave

        public boolean onSave​(Object entity,
                              Object id,
                              Object[] state,
                              String[] propertyNames,
                              Type[] types)
                       throws CallbackException
        Description copied from interface: Interceptor
        Called before an object is saved. The interceptor may modify the state, which will be used for the SQL INSERT and propagated to the persistent object.
        Specified by:
        onSave in interface Interceptor
        entity - The entity instance whose state is being inserted
        id - The identifier of the entity
        state - The state of the entity which will be inserted
        propertyNames - The names of the entity properties.
        types - The types of the entity properties
        true if the user modified the state in any way.
        CallbackException - Thrown if the interceptor encounters any problems handling the callback.