com.togethersoft.openapi.model.elements
Class ModelAccess


public abstract class ModelAccess

Author:
TogetherSoft

Field Summary
 protected static ModelAccessimplementation
           
 final static StringMETAMODEL
           
 private static MapourModels
           

Method Summary
 static ModelcreateModel(String id)
          Fetches IModel object with certain ID,
if IModel object with such ID was not instantiated yet, then it will be created.
 protected abstract ModelcreateModelObject(String id)
           
 protected static ModelAccessgetImplementation()
           
 static ModelgetModel(String id)
           
 static booleanhasModel(String id)
           
 protected abstract EnumerationmodelObjects()
           
 static Enumerationmodels()
          Returns enumeration of all IModel instances that was instantiated and was not deleted yet.
 protected static voidrefreshModels()
           
 static voidrunCommand(Runnable command)
           
 static voidrunCommand(Runnable command, boolean undoable)
           
 protected abstract voidrunCommandObject(Runnable command, boolean undoable)
           
 protected static voidsetImplementation(ModelAccess impl)
          This method is called by the static initializer, that knows about concrete implementation.

Field Detail

implementation

protected static ModelAccess implementation

METAMODEL

public final static String METAMODEL

ourModels

private static Map ourModels
Method Detail

createModel

public static Model createModel(String id)
Fetches IModel object with certain ID,
if IModel object with such ID was not instantiated yet, then it will be created.
IModel.getUniqueName() method will return this ID later.
Parameters:
id String that uniquenly identifies that model.

createModelObject

protected abstract Model createModelObject(String id)

getImplementation

protected static ModelAccess getImplementation()

getModel

public static Model getModel(String id)

hasModel

public static boolean hasModel(String id)

modelObjects

protected abstract Enumeration modelObjects()

models

public static Enumeration models()
Returns enumeration of all IModel instances that was instantiated and was not deleted yet.
Parameters:
impl concrete IModelAccess implementation.

refreshModels

protected static void refreshModels()

runCommand

public static void runCommand(Runnable command)

runCommand

public static void runCommand(Runnable command, boolean undoable)

runCommandObject

protected abstract void runCommandObject(Runnable command, boolean undoable)

setImplementation

protected static void setImplementation(ModelAccess impl)
This method is called by the static initializer, that knows about concrete implementation.
Parameters:
impl concrete IModelAccess implementation.

Association Links

to Class java.lang.String

to Class com.togethersoft.openapi.model.elements.ModelAccess

to Class java.util.Map