IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework
Class AbstractPatternStore.Instance

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.AbstractPatternStore.Instance
Direct Known Subclasses:
PatternInstanceStore
Enclosing class:
AbstractPatternStore

public abstract static class AbstractPatternStore.Instance
extends Object

The abstract pattern store instance class defines the methods necessary to persist and reconsitute persisted pattern instances.


Constructor Summary
AbstractPatternStore.Instance()
           
 
Method Summary
abstract  void addParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object[] value)
          Adds a parameter value to the given instance's persistent representation.
abstract  boolean containsInstance(AbstractPatternInstance instance)
          Determines if a pattern instance is already contained with the pattern instance store.
abstract  Object createInstance(AbstractPatternStore.Definition definitionStore, AbstractPatternInstance instance, Object targetObject)
          Creates a new pattern instance in the pattern instance store.
abstract  Object getDefinition(AbstractPatternInstance instance)
           
abstract  IPatternIdentity getDefinitionIdentity(AbstractPatternStore.Definition definitionStore, Object instance)
          Get the definition identity associated with the instance representation object being passed in.
abstract  Object[] getParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter)
          Get the persisted parameter values for the given instance and parameter descriptor.
abstract  void removeInstance(AbstractPatternInstance instance)
          Remove the persisted pattern instance given the transient pattern instance.
abstract  void removeParameterValues(AbstractPatternInstance instance, IParameterDescriptor parameter, Object[] value)
          Remove the given parameter values from the pattern instance store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternStore.Instance

public AbstractPatternStore.Instance()
Method Detail

addParameterValues

public abstract 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

public abstract 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

public abstract 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 objet

getDefinitionIdentity

public abstract IPatternIdentity getDefinitionIdentity(AbstractPatternStore.Definition definitionStore,
                                                       Object instance)
Get 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

public abstract Object[] getParameterValues(AbstractPatternInstance instance,
                                            IParameterDescriptor parameter)
Get 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

public abstract void removeInstance(AbstractPatternInstance instance)
Remove the persisted pattern instance given the transient pattern instance.

Parameters:
instance - the instance corresponding to the pattern store instance to remove

removeParameterValues

public abstract void removeParameterValues(AbstractPatternInstance instance,
                                           IParameterDescriptor parameter,
                                           Object[] value)
Remove 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

getDefinition

public abstract Object getDefinition(AbstractPatternInstance instance)

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.