Class ModelImpl
java.lang.Object
tools.refinery.store.model.internal.ModelImpl
-
Field Summary
Fields inherited from interface tools.refinery.store.model.Model
NO_STATE_ID
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(ModelListener listener) void
commit()
Saves the state of the object.<T extends ModelAdapter>
TgetAdapter
(Class<T> adapterType) getDiffCursor
(Version to) <T> Interpretation
<T> getInterpretation
(Symbol<T> symbol) getState()
getStore()
boolean
pendingActionError
(String currentActionName) void
removeListener
(ModelListener listener) void
Restores the state of the object.<T extends ModelAdapter>
Optional<T> tryGetAdapter
(Class<? extends T> adapterType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tools.refinery.store.model.Model
getInterpretation
-
Method Details
-
getStore
-
getState
-
getInterpretation
- Specified by:
getInterpretation
in interfaceModel
-
getDiffCursor
- Specified by:
getDiffCursor
in interfaceModel
-
hasUncommittedChanges
public boolean hasUncommittedChanges()- Specified by:
hasUncommittedChanges
in interfaceModel
-
commit
Description copied from interface:Versioned
Saves the state of the object. -
restore
Description copied from interface:Versioned
Restores the state of the object.- Specified by:
restore
in interfaceVersioned
- Parameters:
version
- aVersion
object that marks the version. The state must be aVersion
object returned by a previousVersioned.commit()
!
-
pendingActionError
-
tryGetAdapter
- Specified by:
tryGetAdapter
in interfaceModel
-
getAdapter
- Specified by:
getAdapter
in interfaceModel
-
addListener
- Specified by:
addListener
in interfaceModel
-
removeListener
- Specified by:
removeListener
in interfaceModel
-
checkCancelled
public void checkCancelled()- Specified by:
checkCancelled
in interfaceModel
-