Class VersionedObject<T>
- java.lang.Object
-
- software.xdev.micromigration.version.VersionedObject<T>
-
- Type Parameters:
T
- type of the object that's contained
- All Implemented Interfaces:
Versioned
- Direct Known Subclasses:
VersionedObjectWithHistory
public class VersionedObject<T> extends java.lang.Object implements Versioned
Simple container to hold a specific object and a correlating version for it.- Author:
- Johannes Rabauer
-
-
Constructor Summary
Constructors Constructor Description VersionedObject(T actualObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getObject()
MigrationVersion
getVersion()
void
setObject(T actualObject)
void
setVersion(MigrationVersion version)
java.lang.String
toString()
-
-
-
Constructor Detail
-
VersionedObject
public VersionedObject(T actualObject)
- Parameters:
actualObject
- set the actual object which is versioned
-
-
Method Detail
-
setVersion
public void setVersion(MigrationVersion version)
- Specified by:
setVersion
in interfaceVersioned
- Parameters:
version
- to set the current version of the object
-
getVersion
public MigrationVersion getVersion()
- Specified by:
getVersion
in interfaceVersioned
- Returns:
- the current version of the object
-
setObject
public void setObject(T actualObject)
- Parameters:
actualObject
- which is versioned
-
getObject
public T getObject()
- Returns:
- the actual object which is versioned
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-