Class RevisionedEto
- java.lang.Object
-
- com.devonfw.module.basic.common.api.to.AbstractTo
-
- com.devonfw.module.basic.common.api.to.AbstractGenericEto<Long>
-
- com.devonfw.module.basic.common.api.to.AbstractEto
-
- com.devonfw.module.basic.common.api.to.RevisionedEto
-
- All Implemented Interfaces:
GenericEntity<Long>
,RevisionedEntity<Long>
,Serializable
public class RevisionedEto extends AbstractEto implements RevisionedEntity<Long>
ETO
for arevisioned entity
.- Since:
- 3.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.devonfw.module.basic.common.api.to.AbstractEto
AbstractEto.PersistentEntityAccess
-
-
Field Summary
-
Fields inherited from interface com.devonfw.module.basic.common.api.entity.RevisionedEntity
LATEST_REVISION
-
-
Constructor Summary
Constructors Constructor Description RevisionedEto()
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getRevision()
This method gets the revision of this entity.void
setRevision(Number revision)
This method sets therevision
of this entity.protected void
toString(StringBuilder buffer)
Method to extendAbstractTo.toString()
logic.-
Methods inherited from class com.devonfw.module.basic.common.api.to.AbstractEto
getId, setId
-
Methods inherited from class com.devonfw.module.basic.common.api.to.AbstractGenericEto
getModificationCounter, setModificationCounter
-
Methods inherited from class com.devonfw.module.basic.common.api.to.AbstractTo
toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.devonfw.module.basic.common.api.entity.GenericEntity
getId, getModificationCounter, setId, setModificationCounter
-
-
-
-
Method Detail
-
getRevision
public Number getRevision()
Description copied from interface:RevisionedEntity
This method gets the revision of this entity. Thelatest revision
of an entity will always returnnull
. Otherwise this object is a historic entity and it will be read-only so modifications are NOT permitted.- Specified by:
getRevision
in interfaceRevisionedEntity<Long>
- Returns:
- the revision or
RevisionedEntity.LATEST_REVISION
(null
) if this is the latest revision.
-
setRevision
public void setRevision(Number revision)
Description copied from interface:RevisionedEntity
This method sets therevision
of this entity.
ATTENTION:
This operation should only be used in specific cases and if you are aware of what you are doing as this attribute is managed by the persistence. However, for final freedom we decided to add this method to the API (e.g. to copy from transfer-object to persistent-entity and vice-versa).- Specified by:
setRevision
in interfaceRevisionedEntity<Long>
- Parameters:
revision
- is the new value ofRevisionedEntity.getRevision()
.
-
toString
protected void toString(StringBuilder buffer)
Description copied from class:AbstractEto
Method to extendAbstractTo.toString()
logic.- Overrides:
toString
in classAbstractEto
- Parameters:
buffer
- is theStringBuilder
where toappend
the string representation.
-
-