RecreatableDomainObject (interface)
Indicates that the domain object can be recreated from a string.
Objects that are view models (logically belonging to the UI/application layer) should instead implement ViewModel .
API
RecreatableDomainObject.java
interface RecreatableDomainObject {
String __isis_memento() (1)
void __isis_recreate(String memento) (2)
}
1 | __isis_memento()
Obtain a memento of the recreatable object. |
2 | __isis_recreate(String)
Used to recreate a recreatable object with a memento obtained from #__isis_recreate(String) . |
Members
__isis_memento()
Obtain a memento of the recreatable object.
Typically this will be the identifier of a backing domain entity, but it could also be an arbitrary string, for example a bunch of JSON.
This method is called by the framework in order that the view model may be recreated subsequently through #__isis_recreate(String) .