Java API ReferenceClass Hierarchy | All Classes | All Fields and Methods

com.ibm.xtools.patterns.framework

Class AbstractPatternStore.Instance

+-- 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.

Enclosing Class:


Constructor summary
AbstractPatternStore.Instance()

Method summary
voidaddParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object value)

Adds a parameter value to the given instance's persistent representation.

booleancontainsInstance(AbstractPatternInstance instance)

Determines if a pattern instance is already contained with the pattern instance store.

ObjectcreateInstance(AbstractPatternStore.Definition definitionStore, AbstractPatternInstance instance, Object targetObject)

Creates a new pattern instance in the pattern instance store.

ObjectgetDefinition(AbstractPatternInstance instance)

Retrieves the instance definition.

IPatternIdentitygetDefinitionIdentity(AbstractPatternStore.Definition definitionStore, Object instance)

Retrieves the definition identity associated with the instance representation object being passed in.

ObjectgetParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter)

Retrieves the persisted parameter values for the given instance and parameter descriptor.

voidremoveInstance(AbstractPatternInstance instance)

Removes the persisted pattern instance given the transient pattern instance.

voidremoveParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object value)

Removes the given parameter values from the pattern instance store.

Constructor detail

AbstractPatternStore.Instance

public AbstractPatternStore.Instance()


Method detail

addParameterValues

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.

containsInstance

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.

createInstance

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.


getDefinition

abstract public Object getDefinition(AbstractPatternInstance instance)

Retrieves the instance definition.

Parameters:

instance
- The instance of interest.

Returns:

The instance definition.

getDefinitionIdentity

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.

getParameterValues

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.

removeInstance

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.

removeParameterValues

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.


Feedback