org.eclipse.emf.ecp.emfstore.internal.ui.decorator
Class EMFStoreDirtyDecoratorCachedTree

java.lang.Object
  extended by org.eclipse.emf.ecp.common.cachetree.AbstractCachedTree<Integer>
      extended by org.eclipse.emf.ecp.emfstore.internal.ui.decorator.EMFStoreDirtyDecoratorCachedTree

public final class EMFStoreDirtyDecoratorCachedTree
extends AbstractCachedTree<Integer>

Cached tree implementation for dirty decorators of model elements managed by EMFStore.

Author:
emueller

Nested Class Summary
 class EMFStoreDirtyDecoratorCachedTree.CachedDirtyStateTreeNode
          Cached tree node that stores the dirty state of a model element managed by EMFStore.
 
Method Summary
 Set<org.eclipse.emf.ecore.EObject> addOperation(org.eclipse.emf.ecore.EObject eObject)
          Call to indicate that an EObject was added.
 CachedTreeNode<Integer> createdCachedTreeNode(Integer t)
          Creates a cached tree node.
 Integer getDefaultValue()
          Returns the default value for a cached node.
The root value will be initialized with this value, too
static EMFStoreDirtyDecoratorCachedTree getInstance(ECPProject project)
          Static EMFStoreDirtyDecoratorCachedTree singleton.
 int getOwnValue(org.eclipse.emf.ecore.EObject eObject)
          Gets the own cached value of the given object.
 Set<org.eclipse.emf.ecore.EObject> removeOperation(org.eclipse.emf.ecore.EObject eObject)
          Call to indicate that an EObject was removed.
static void removeProject(ECPProject project)
          Removes an ECPProject from the Cache.
 Set<org.eclipse.emf.ecore.EObject> setOperationCount(org.eclipse.emf.ecore.EObject eObject, int count)
          Sets the operation count for the given object.
 
Methods inherited from class org.eclipse.emf.ecp.common.cachetree.AbstractCachedTree
clear, getCachedValue, getRootValue, remove, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

removeProject

public static void removeProject(ECPProject project)
Removes an ECPProject from the Cache.

Parameters:
project - the project

getInstance

public static EMFStoreDirtyDecoratorCachedTree getInstance(ECPProject project)
Static EMFStoreDirtyDecoratorCachedTree singleton.

Parameters:
project - the ECPProject to initialize this CashedTree on
Returns:
Static instance of the EMFStoreDirtyDecoratorCachedTree

getDefaultValue

public Integer getDefaultValue()
Returns the default value for a cached node.
The root value will be initialized with this value, too

Specified by:
getDefaultValue in class AbstractCachedTree<Integer>
Returns:
the default value for a cached tree node

createdCachedTreeNode

public CachedTreeNode<Integer> createdCachedTreeNode(Integer t)
Creates a cached tree node.

Parameters:
t - the value stored by the cached tree node
Returns:
the created node

addOperation

public Set<org.eclipse.emf.ecore.EObject> addOperation(org.eclipse.emf.ecore.EObject eObject)
Call to indicate that an EObject was added.

Parameters:
eObject - the new EObject
Returns:
the Set of EObject affected by this change

removeOperation

public Set<org.eclipse.emf.ecore.EObject> removeOperation(org.eclipse.emf.ecore.EObject eObject)
Call to indicate that an EObject was removed.

Parameters:
eObject - the removed EObject
Returns:
the Set of EObject affected by this change

setOperationCount

public Set<org.eclipse.emf.ecore.EObject> setOperationCount(org.eclipse.emf.ecore.EObject eObject,
                                                            int count)
Sets the operation count for the given object.

Parameters:
eObject - the eobject
count - the new count
Returns:
the set of affected elements

getOwnValue

public int getOwnValue(org.eclipse.emf.ecore.EObject eObject)
Gets the own cached value of the given object.

Parameters:
eObject - the e object
Returns:
the own cached value


Copyright © 2014. All Rights Reserved.