Class PreUpdateEvent

    • Constructor Detail

      • PreUpdateEvent

        public PreUpdateEvent​(Object entity,
                              Object id,
                              Object[] state,
                              Object[] oldState,
                              EntityPersister persister,
                              EventSource source)
        Constructs an event containing the pertinent information.
        entity - The entity to be updated.
        id - The id of the entity to use for updating.
        state - The state to be updated.
        oldState - The state of the entity at the time it was loaded from the database.
        persister - The entity's persister.
        source - The session from which the event originated.
    • Method Detail

      • getState

        public Object[] getState()
        Retrieves the state to be used in the update.
        The current state.
      • getOldState

        public Object[] getOldState()
        The old state of the entity at the time it was last loaded from the database; can be null in the case of detached entities.
        The loaded state, or null.