Package jetbrains.mps.extapi.model
Class CustomPersistenceSModel
- java.lang.Object
 - 
- jetbrains.mps.extapi.model.SModelDescriptorStub
 - 
- jetbrains.mps.extapi.model.SModelBase
 - 
- jetbrains.mps.extapi.model.EditableSModelBase
 - 
- jetbrains.mps.extapi.model.CustomPersistenceSModel
 
 
 
 
 
- 
- All Implemented Interfaces:
 ModelWithDisposeInfo,SingleRootSModel,FastNodeFinder.Factory,SModelInternal,EditableSModel,SModel
@Deprecated public final class CustomPersistenceSModel extends EditableSModelBase implements SingleRootSModel
Deprecated.better useCustomPersistenceModelWithHeaderA basic implementation of the EditableSmodelBase suitable for most of the custom persistence scenarios Supposed to be constructed in the implementing class of ModelFactory (corr. to the new persistence)- See Also:
 for example
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomPersistenceSModel.StubModelDeprecated.- 
Nested classes/interfaces inherited from interface org.jetbrains.mps.openapi.model.SModel
SModel.Problem 
 - 
 
- 
Field Summary
- 
Fields inherited from class jetbrains.mps.extapi.model.EditableSModelBase
myTimestampTracker 
 - 
 
- 
Constructor Summary
Constructors Constructor Description CustomPersistenceSModel(SModelReference modelReference, StreamDataSource source, SModelPersistence persistence)Deprecated. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddoUnload()Deprecated.Perform actual dispose of model data andSModelBase.setLoadingState(ModelLoadingState)changes loading state}.protected SModelgetCurrentModelInternal()Deprecated.Likely, shall return SModelData eventuallyIterable<SModel.Problem>getProblems()Deprecated.The list of persistence-specific model problems (like syntax or I/O errors).SNodegetRoot()Deprecated.SModelgetSModelInternal()Deprecated.Migration to 3.0.StreamDataSourcegetSource()Deprecated.The data source which this model was loaded from.protected voidreloadContents()Deprecated.protected booleansaveModel()Deprecated.returns true if the content should be reloaded from storage after save- 
Methods inherited from class jetbrains.mps.extapi.model.EditableSModelBase
addChangeListener, addRootNode, attach, detach, isChanged, isReadOnly, needsReloading, reloadFromSource, removeChangeListener, removeRootNode, rename, resolveDiskConflict, save, setChanged, toString, unload, updateTimestamp 
- 
Methods inherited from class jetbrains.mps.extapi.model.SModelBase
addAccessListener, addModelListener, assertCanChange, assertCanRead, changeModelReference, createNode, createNode, fireBeforeModelRenamed, fireConflictDetected, fireModelRenamed, fireModelReplaced, fireModelSaved, fireModelStateChanged, fireProblemsDetected, getLoadingState, getModelData, getModelId, getModelName, getModelRoot, getModule, getName, getNode, getNodeEventDispatch, getReference, getRepository, getRootNodes, isLoaded, load, removeAccessListener, removeModelListener, replaceModelAndFireEvent, setLoadingState, setModelRoot, setModule 
- 
Methods inherited from class jetbrains.mps.extapi.model.SModelDescriptorStub
addDevKit, addEngagedOnGenerationLanguage, addLanguage, addModelImport, addModelListener, clearListeners, createNodeFinder, deleteDevKit, deleteLanguageId, deleteModelImport, fireBeforeModelDisposed, fireBeforeModelFileChanged, fireBeforeModelRenamed, fireModelFileChanged, fireModelRenamed, fireModelStateChanged, getDisposedStacktrace, getLanguageImportVersion, getLanguagesEngagedOnGeneration, getModelDepsManager, getModelImports, getModelListeners, getSModel, importedDevkits, importedLanguageIds, isDisposed, removeEngagedOnGenerationLanguage, removeModelListener, setLanguageImportVersion, updateExternalReferences 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.jetbrains.mps.openapi.model.SModel
addAccessListener, addChangeListener, addModelListener, addRootNode, createNode, createNode, getModelId, getModelName, getModelRoot, getModule, getName, getNode, getReference, getRepository, getRootNodes, isLoaded, isReadOnly, load, removeAccessListener, removeChangeListener, removeModelListener, removeRootNode, unload 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
CustomPersistenceSModel
public CustomPersistenceSModel(@NotNull SModelReference modelReference, @NotNull StreamDataSource source, @NotNull SModelPersistence persistence)
Deprecated. 
 - 
 
- 
Method Detail
- 
getSource
@NotNull public StreamDataSource getSource()
Deprecated.Description copied from interface:SModelThe data source which this model was loaded from.- Specified by:
 getSourcein interfaceSModel- Overrides:
 getSourcein classSModelBase
 
- 
getCurrentModelInternal
protected SModel getCurrentModelInternal()
Deprecated.Description copied from class:SModelBaseLikely, shall return SModelData eventually- Specified by:
 getCurrentModelInternalin classSModelBase- Returns:
 - actual model data or 
nullif not initialized yet 
 
- 
getSModelInternal
public SModel getSModelInternal()
Deprecated.Description copied from class:SModelDescriptorStubMigration to 3.0. Loads and returns model data. FIXME Replace uses of this method with getSModel(), make it abstract and implement in SModelBase subclasses. The name getSModelInternal is misleading as it clashes with SModelInternal interface this class implements. Though getSModel is not much better, at least in the context of SModelDescriptor it makes more sense.- Specified by:
 getSModelInternalin classSModelDescriptorStub
 
- 
doUnload
protected void doUnload()
Deprecated.Description copied from class:SModelBasePerform actual dispose of model data andSModelBase.setLoadingState(ModelLoadingState)changes loading state}. No loading state event is sent (responsibility ofSModelBase.unload(). Subclasses shall override to clean instance fields and generally shall delegate to this implementation first to dispose model data.- Overrides:
 doUnloadin classSModelBase
 
- 
reloadContents
protected void reloadContents()
Deprecated.- Specified by:
 reloadContentsin classEditableSModelBase
 
- 
saveModel
protected boolean saveModel() throws ModelSaveException, IOExceptionDeprecated.Description copied from class:EditableSModelBasereturns true if the content should be reloaded from storage after save- Specified by:
 saveModelin classEditableSModelBase- Throws:
 ModelSaveExceptionIOException
 
- 
getRoot
public SNode getRoot()
Deprecated.- Specified by:
 getRootin interfaceSingleRootSModel
 
- 
getProblems
@NotNull public Iterable<SModel.Problem> getProblems()
Deprecated.Description copied from interface:SModelThe list of persistence-specific model problems (like syntax or I/O errors). Returns empty list if this model is not loaded yet.- Specified by:
 getProblemsin interfaceSModel- Overrides:
 getProblemsin classSModelBase
 
 - 
 
 -