public class AutoTimestampEventListener extends AbstractPersistenceEventListener
An event listener that adds support for GORM-style auto-timestamping
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
DATE_CREATED_PROPERTY |
|
static java.lang.String |
LAST_UPDATED_PROPERTY |
|
protected java.util.Map<java.lang.String, java.lang.Boolean> |
entitiesWithDateCreated |
|
protected java.util.Map<java.lang.String, java.lang.Boolean> |
entitiesWithLastUpdated |
|
protected java.util.Collection<java.lang.String> |
uninitializedEntities |
| Fields inherited from class | Fields |
|---|---|
class AbstractPersistenceEventListener |
datastore |
| Constructor and description |
|---|
AutoTimestampEventListener
(Datastore datastore) |
protected AutoTimestampEventListener
(MappingContext mappingContext) |
| Type | Name and description |
|---|---|
boolean |
beforeInsert(PersistentEntity entity, EntityAccess ea) |
boolean |
beforeUpdate(PersistentEntity entity, EntityAccess ea) |
TimestampProvider |
getTimestampProvider() |
protected boolean |
hasDateCreated(PersistentEntity entity)Here for binary compatibility. |
protected boolean |
hasDateCreated(java.lang.String n) |
protected boolean |
hasLastUpdated(PersistentEntity entity)Here for binary compatibility. |
protected boolean |
hasLastUpdated(java.lang.String n) |
protected void |
initForMappingContext(MappingContext mappingContext) |
protected void |
onPersistenceEvent(AbstractPersistenceEvent event) |
void |
persistentEntityAdded(PersistentEntity entity) |
void |
setTimestampProvider(TimestampProvider timestampProvider) |
protected void |
storeDateCreatedAndLastUpdatedInfo(PersistentEntity persistentEntity) |
protected void |
storeTimestampAvailability(java.util.Map<java.lang.String, java.lang.Boolean> timestampAvailabilityMap, PersistentEntity persistentEntity, PersistentProperty<?> property) |
boolean |
supportsEventType(java.lang.Class<? extends org.springframework.context.ApplicationEvent> eventType) |
void |
withoutDateCreated(java.lang.Runnable runnable)Temporarily disables the date created processing during the execution of the runnable |
void |
withoutDateCreated(java.util.List<java.lang.Class> classes, java.lang.Runnable runnable)Temporarily disables the date created processing only on the provided classes during the execution of the runnable |
void |
withoutDateCreated(java.lang.Class clazz, java.lang.Runnable runnable)Temporarily disables the date created processing only on the provided class during the execution of the runnable |
void |
withoutLastUpdated(java.lang.Runnable runnable)Temporarily disables the last updated processing during the execution of the runnable |
void |
withoutLastUpdated(java.util.List<java.lang.Class> classes, java.lang.Runnable runnable)Temporarily disables the last updated processing only on the provided classes during the execution of the runnable |
void |
withoutLastUpdated(java.lang.Class clazz, java.lang.Runnable runnable)Temporarily disables the last updated processing only on the provided class during the execution of the runnable |
void |
withoutTimestamps(java.lang.Runnable runnable)Temporarily disables the timestamp processing during the execution of the runnable |
void |
withoutTimestamps(java.util.List<java.lang.Class> classes, java.lang.Runnable runnable)Temporarily disables the timestamp processing only on the provided classes during the execution of the runnable |
void |
withoutTimestamps(java.lang.Class clazz, java.lang.Runnable runnable)Temporarily disables the timestamp processing during the execution of the runnable |
| Methods inherited from class | Name |
|---|---|
class AbstractPersistenceEventListener |
getOrder, isValidSource, onApplicationEvent, onPersistenceEvent, supportsSourceType |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Here for binary compatibility. Deprecated.
Here for binary compatibility. Deprecated.
Temporarily disables the date created processing during the execution of the runnable
runnable - The code to execute while the date created listener is disabledTemporarily disables the date created processing only on the provided classes during the execution of the runnable
classes - Which classes to disable the date created processing forrunnable - The code to execute while the date created listener is disabledTemporarily disables the date created processing only on the provided class during the execution of the runnable
clazz - Which class to disable the date created processing forrunnable - The code to execute while the date created listener is disabledTemporarily disables the last updated processing during the execution of the runnable
runnable - The code to execute while the last updated listener is disabledTemporarily disables the last updated processing only on the provided classes during the execution of the runnable
classes - Which classes to disable the last updated processing forrunnable - The code to execute while the last updated listener is disabledTemporarily disables the last updated processing only on the provided class during the execution of the runnable
clazz - Which class to disable the last updated processing forrunnable - The code to execute while the last updated listener is disabledTemporarily disables the timestamp processing during the execution of the runnable
runnable - The code to execute while the timestamp listeners are disabledTemporarily disables the timestamp processing only on the provided classes during the execution of the runnable
classes - Which classes to disable the timestamp processing forrunnable - The code to execute while the timestamp listeners are disabledTemporarily disables the timestamp processing during the execution of the runnable
clazz - Which class to disable the timestamp processing forrunnable - The code to execute while the timestamp listeners are disabled