public class AutoTimestampEventListener extends org.grails.datastore.mapping.engine.event.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 org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener |
DEFAULT_ORDER, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Constructor and description |
|---|
AutoTimestampEventListener
(org.grails.datastore.mapping.core.Datastore datastore) |
protected AutoTimestampEventListener
(org.grails.datastore.mapping.model.MappingContext mappingContext) |
| Type | Name and description |
|---|---|
boolean |
beforeInsert(org.grails.datastore.mapping.model.PersistentEntity entity, org.grails.datastore.mapping.engine.EntityAccess ea) |
boolean |
beforeUpdate(org.grails.datastore.mapping.model.PersistentEntity entity, org.grails.datastore.mapping.engine.EntityAccess ea) |
TimestampProvider |
getTimestampProvider() |
protected boolean |
hasDateCreated(org.grails.datastore.mapping.model.PersistentEntity entity)Here for binary compatibility. |
protected boolean |
hasDateCreated(java.lang.String n) |
protected boolean |
hasLastUpdated(org.grails.datastore.mapping.model.PersistentEntity entity)Here for binary compatibility. |
protected boolean |
hasLastUpdated(java.lang.String n) |
protected void |
initForMappingContext(org.grails.datastore.mapping.model.MappingContext mappingContext) |
protected void |
onPersistenceEvent(org.grails.datastore.mapping.engine.event.AbstractPersistenceEvent event) |
void |
persistentEntityAdded(org.grails.datastore.mapping.model.PersistentEntity entity) |
void |
setTimestampProvider(TimestampProvider timestampProvider) |
protected void |
storeDateCreatedAndLastUpdatedInfo(org.grails.datastore.mapping.model.PersistentEntity persistentEntity) |
protected void |
storeTimestampAvailability(java.util.Map<java.lang.String, java.lang.Boolean> timestampAvailabilityMap, org.grails.datastore.mapping.model.PersistentEntity persistentEntity, org.grails.datastore.mapping.model.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 org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener |
org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#onApplicationEvent(org.springframework.context.ApplicationEvent), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#supportsSourceType(java.lang.Class), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#getOrder(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#wait(long, int), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#wait(long), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#wait(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#equals(java.lang.Object), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#toString(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#hashCode(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#getClass(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#notify(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#notifyAll(), org.grails.datastore.mapping.engine.event.AbstractPersistenceEventListener#supportsEventType(java.lang.Class) |
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