I - The generic ID type.@MappedSuperclass public abstract class VersionedEntity<I extends Comparable<I> & Serializable> extends TimestampedEntity<I> implements Versioned
Mapped superclass for versioned entity. It specifies a Version column, named "version".
On pre persist, JPA will automatically set version to 0.
On pre update, JPA will automatically increment version with 1.
ID| Constructor and Description |
|---|
VersionedEntity() |
| Modifier and Type | Method and Description |
|---|---|
Long |
getVersion() |
getCreated, getLastModified, onPrePersist, onPreUpdate, setCreated, setLastModified, skipAdjustLastModifiedgetId, setIdcompareTo, equals, hashCode, toStringpublic Long getVersion()
getVersion in interface VersionedCopyright © 2015–2018 OmniFaces. All rights reserved.