I - The generic ID type.@MappedSuperclass public abstract class VersionedBaseEntity<I extends Comparable<I> & Serializable> extends TimestampedBaseEntity<I> implements Versioned
Mapped superclass for versioned entity.
It extends from TimestampedBaseEntity.
In addition to the "created" and "lastModified" columns, it specifies a Version column, named "version".
The Id column needs to be manually taken care of.
On pre persist, JPA will automatically set version to 0.
On pre update, JPA will automatically increment version with 1.
ID| Constructor and Description |
|---|
VersionedBaseEntity() |
| Modifier and Type | Method and Description |
|---|---|
Long |
getVersion() |
getCreated, getLastModified, onPrePersist, onPreUpdate, setCreated, setLastModified, skipAdjustLastModifiedcompareTo, equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, setIdpublic Long getVersion()
getVersion in interface VersionedCopyright © 2015–2020 OmniFaces. All rights reserved.