Class RevisionedEto
- java.lang.Object
-
- com.devonfw.module.basic.common.api.to.AbstractTo
-
- 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>
ETOfor 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 Modifier and Type Field Description private Numberrevisionprivate static longserialVersionUID-
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 NumbergetRevision()This method gets the revision of this entity.voidsetRevision(Number revision)This method sets therevisionof this entity.protected voidtoString(StringBuilder buffer)Method to extendAbstractTo.toString()logic.-
Methods inherited from class com.devonfw.module.basic.common.api.to.AbstractEto
getId, getModificationCounter, setId, 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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
revision
private Number revision
-
-
Method Detail
-
getRevision
public Number getRevision()
Description copied from interface:RevisionedEntityThis method gets the revision of this entity. Thelatest revisionof 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:
getRevisionin 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:RevisionedEntityThis method sets therevisionof 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:
setRevisionin interfaceRevisionedEntity<Long>- Parameters:
revision- is the new value ofRevisionedEntity.getRevision().
-
toString
protected void toString(StringBuilder buffer)
Description copied from class:AbstractEtoMethod to extendAbstractTo.toString()logic.- Overrides:
toStringin classAbstractEto- Parameters:
buffer- is theStringBuilderwhere toappendthe string representation.
-
-