| Java API Reference | Class Hierarchy | All Classes | All Fields and Methods |
com.ibm.xtools.patterns.framework
+-- Object +-- AbstractPatternStore.Instance
abstract static public Class AbstractPatternStore.Instance
extends Object
Represents the abstract pattern store instance class that defines the methods necessary to persist and reconsitute persisted pattern instances.
| Constructor summary |
|---|
| AbstractPatternStore.Instance() |
| Method summary | |
|---|---|
| void | addParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object value) Adds a parameter value to the given instance's persistent representation. |
| boolean | containsInstance(AbstractPatternInstance instance) Determines if a pattern instance is already contained with the pattern instance store. |
| Object | createInstance(AbstractPatternStore.Definition definitionStore, AbstractPatternInstance instance, Object targetObject) Creates a new pattern instance in the pattern instance store. |
| Object | getDefinition(AbstractPatternInstance instance) Retrieves the instance definition. |
| IPatternIdentity | getDefinitionIdentity(AbstractPatternStore.Definition definitionStore, Object instance) Retrieves the definition identity associated with the instance representation object being passed in. |
| Object | getParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter) Retrieves the persisted parameter values for the given instance and parameter descriptor. |
| void | removeInstance(AbstractPatternInstance instance) Removes the persisted pattern instance given the transient pattern instance. |
| void | removeParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object value) Removes the given parameter values from the pattern instance store. |
Constructor detail
Method detail
abstract public void addParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object value)
Adds a parameter value to the given instance's persistent representation.
The parameter value is cumulative and therefore adding a value does not replace any current values.
Parameters:
| instance | - The instance of interest. |
| parameter | - The parameter to add a value to. |
| value | - The value to be added to the given parameter within the instance store. |
abstract public boolean containsInstance(AbstractPatternInstance instance)
Determines if a pattern instance is already contained with the pattern instance store.
Parameters:
| instance | - The pattern instance of interest. |
Returns:
Indicates if the instance is contained in the persistent instance store. |
abstract public Object createInstance(AbstractPatternStore.Definition definitionStore, AbstractPatternInstance instance, Object targetObject)
Creates a new pattern instance in the pattern instance store.
Parameters:
| definitionStore | - The associated definition store. This is needed so any appropriate connections between the definition and instance can be made. |
| instance | - The instance to be persisted in the pattern instance store. |
| targetObject | - The target object defines the context. |
Returns:
The newly created pattern instance as persisted in the pattern instance store. The returned instance object is used when subsequent method calls on the pattern store require an instance object. |
abstract public Object getDefinition(AbstractPatternInstance instance)
Retrieves the instance definition.
Parameters:
| instance | - The instance of interest. |
Returns:
The instance definition. |
abstract public IPatternIdentity getDefinitionIdentity(AbstractPatternStore.Definition definitionStore, Object instance)
Retrieves the definition identity associated with the instance representation object being passed in.
Parameters:
| definitionStore | - The definition store that is used internally by the instance store when needed to implement this method's underlying behavior. |
| instance | - The object that represents the instance in the persistent store (or has some known relationship to the object that represents the instance in the persistent store). |
Returns:
The pattern identity associated with the instance passed in. |
abstract public Object getParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter)
Retrieves the persisted parameter values for the given instance and parameter descriptor.
Parameters:
| instance | - The instance of interest. |
| parameter | - The parameter descriptor that qualifies the values to reconstitute. |
Returns:
The parameter values as represented by the pattern instance store. |
abstract public void removeInstance(AbstractPatternInstance instance)
Removes the persisted pattern instance given the transient pattern instance.
Parameters:
| instance | - The instance corresponding to the pattern store instance to remove. |
abstract public void removeParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object value)
Removes the given parameter values from the pattern instance store.
Parameters:
| instance | - The instance that qualifies the values to remove. |
| parameter | - The parameter of interest. |
| value | - The value to remove from the persisted values in the pattern instance store. |