Class AbstractDirtyCheckingEntity
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.pojo.AbstractHibernateEntity
ch.tocco.nice2.persist.core.impl.hibernate.pojo.AbstractDirtyCheckingEntity
- All Implemented Interfaces:
- EntityReference,- Entity,- EntityImplementor
- Direct Known Subclasses:
- AbstractPojoEntity
Abstract base class for 
AbstractHibernateEntity implementations which handles dirty
 tracking.
 When any setter of the entity is called, the field is marked as dirty (if the new value is different from
 the persistent value).
 This allows an efficient implementation of Entity.getState().
 resetDirty() must be called by the framework after an entity
 has been flushed.- 
Nested Class SummaryNested classes/interfaces inherited from interface ch.tocco.nice2.persist.core.api.entity.EntityEntity.State
- 
Field SummaryFields inherited from class ch.tocco.nice2.persist.core.impl.hibernate.pojo.AbstractHibernateEntityentityContext, entityInterceptor, logger, wasDeleted
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected @Nullable ObjectdoGetOldValue(String field) getTouchedProperties(Function<String, Boolean> filter) booleanisDirty()protected abstract booleanisUnsaved(org.hibernate.engine.spi.EntityEntry entry) protected voidmarkAsDirtyIfNecessary(String field, @Nullable Object newValue) voidvoidsetEntityContext(EntityContext entityContext) Wraps the givenEntityContextwith a custom implementation that returns aAbstractDirtyCheckingEntity.DirtyCheckingPropertyAccessorService.Methods inherited from class ch.tocco.nice2.persist.core.impl.hibernate.pojo.AbstractHibernateEntitydelete, getAutoFieldsDisabled, getChangedFields, getContext, getInnerInterceptor, getLogger, getManager, getModel, getRelatedEntity, getRelatedEntityOrNull, getTouchedRelations, getValue, getValue, getValue, getValue, getValue, getValue, getValueMap, internalGetValue, internalSetValue, isFieldChanged, isUpdatable, joinTx, markDeleted, resolveField, setAutoFieldsDisabled, setValue, syncInverseCollection, thisInstanceOrProxyIfAvailable, toString, validateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.tocco.nice2.persist.core.api.entity.EntitygetBool, getDate, getDateTime, getDecimal, getDouble, getFloat, getInt, getKey, getLong, getOldValue, getShort, getState, getString, getTime, hasKey, requireBool, requireDate, requireDateTime, requireDecimal, requireDouble, requireFloat, requireInt, requireKey, requireLong, requireOldValue, requireShort, requireString, requireTime, requireValue, requireValue, requireValue, requireValue, requireValue, requireValue, resolve, validate
- 
Constructor Details- 
AbstractDirtyCheckingEntitypublic AbstractDirtyCheckingEntity()
 
- 
- 
Method Details- 
markAsDirtyIfNecessary
- 
doGetOldValue
- 
isUnsavedprotected abstract boolean isUnsaved(org.hibernate.engine.spi.EntityEntry entry) 
- 
getTouchedProperties- Specified by:
- getTouchedPropertiesin class- AbstractHibernateEntity
 
- 
isDirtypublic boolean isDirty()
- 
resetDirtypublic void resetDirty()
- 
setEntityContextWraps the givenEntityContextwith a custom implementation that returns aAbstractDirtyCheckingEntity.DirtyCheckingPropertyAccessorService.- Overrides:
- setEntityContextin class- AbstractHibernateEntity
 
 
-