Class ModelImpl
java.lang.Object
tools.refinery.store.model.internal.ModelImpl
- All Implemented Interfaces:
AutoCloseable,Versioned,Model
-
Field Summary
Fields inherited from interface tools.refinery.store.model.Model
NO_STATE_ID -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ModelListener listener) voidvoidclose()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()booleanpendingActionError(String currentActionName) voidremoveListener(ModelListener listener) voidRestores 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, waitMethods inherited from interface tools.refinery.store.model.Model
getInterpretation
-
Method Details
-
getStore
-
getState
-
getInterpretation
- Specified by:
getInterpretationin interfaceModel
-
getDiffCursor
- Specified by:
getDiffCursorin interfaceModel
-
hasUncommittedChanges
public boolean hasUncommittedChanges()- Specified by:
hasUncommittedChangesin interfaceModel
-
commit
Description copied from interface:VersionedSaves the state of the object. -
restore
Description copied from interface:VersionedRestores the state of the object.- Specified by:
restorein interfaceVersioned- Parameters:
version- aVersionobject that marks the version. The state must be aVersionobject returned by a previousVersioned.commit()!
-
pendingActionError
-
tryGetAdapter
- Specified by:
tryGetAdapterin interfaceModel
-
getAdapter
- Specified by:
getAdapterin interfaceModel
-
addListener
- Specified by:
addListenerin interfaceModel
-
removeListener
- Specified by:
removeListenerin interfaceModel
-
checkCancelled
public void checkCancelled()- Specified by:
checkCancelledin interfaceModel
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceModel
-