org.hibernate.EmptyInterceptor but overrides
the default methods for sake of efficiency: this wasn't possible on the original deprecated
copy as that wouldn't have been backwards compatible. For this reason this copy is internal.
Implementors of Interceptor don't need a base class anymore since we now have default
implementations of the contract defined in the interface.
| Modifier and Type | Field and Description |
|---|---|
| public static final Interceptor |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int[] | findDirty(Object
The entity for which to find dirty properties. entity, Object The identifier of the entity id, Object[] The current entity state as taken from the entity instance currentState, Object[] The state of the entity when it was last synchronized (generally when it was loaded) previousState, String[] The names of the entity properties. propertyNames, Type[] The types of the entity properties types)Overrides default org. flush().
|
| public Object | getEntity(String
the name of the entity entityName, Object the instance identifier id)Overrides default org. |
| public void | onDelete(Object
The entity instance being deleted entity, Object The identifier of the entity id, Object[] The state of the entity state, String[] The names of the entity properties. propertyNames, Type[] The types of the entity properties types)Overrides default org. |
| public boolean | onFlushDirty(Object
The entity instance detected as being dirty and being flushed entity, Object The identifier of the entity id, Object[] The entity's current state currentState, Object[] The entity's previous (load time) state. previousState, String[] The names of the entity properties propertyNames, Type[] The types of the entity properties types)Overrides default org. |
| public boolean | onLoad(Object
The entity instance being loaded entity, Object The identifier value being loaded id, Object[] The entity state (which will be pushed into the entity instance) state, String[] The names of the entity properties, corresponding to the propertyNames, Type[] state.The types of the entity properties, corresponding to the types)state.Overrides default org. |
| public boolean | onSave(Object
The entity instance whose state is being inserted entity, Object The identifier of the entity id, Object[] The state of the entity which will be inserted state, String[] The names of the entity properties. propertyNames, Type[] The types of the entity properties types)Overrides default org. |
| INSTANCE | back to summary |
|---|---|
| public static final Interceptor INSTANCE | |
| EmptyInterceptor | back to summary |
|---|---|
| private EmptyInterceptor() | |
| findDirty | back to summary |
|---|---|
| public int[] findDirty(Object entity, Object id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) Overrides default org. Doc from org. Called from
| |
| getEntity | back to summary |
|---|---|
| public Object getEntity(String entityName, Object id) Overrides default org. Doc from org. Get a fully loaded entity instance that is cached externally. | |
| onDelete | back to summary |
|---|---|
| public void onDelete(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types) Overrides default org. Doc from org. Called before an object is deleted. It is not recommended that the interceptor modify the | |
| onFlushDirty | back to summary |
|---|---|
| public boolean onFlushDirty(Object entity, Object id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) Overrides default org. Doc from org. Called when an object is detected to be dirty, during a flush. The interceptor may modify the detected
| |
| onLoad | back to summary |
|---|---|
| public boolean onLoad(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types) Overrides default org. Doc from org. Called just before an object is initialized. The interceptor may change the
| |
| onSave | back to summary |
|---|---|
| public boolean onSave(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types) Overrides default org. Doc from org. Called before an object is saved. The interceptor may modify the
| |