org.eclipse.emf.emfstore.internal.server.conflictDetection
Class ModelElementIdToEObjectMappingImpl

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.conflictDetection.ModelElementIdToEObjectMappingImpl
All Implemented Interfaces:
ESIdToEObjectMapping<ModelElementId>, APIDelegate<ESModelElementIdToEObjectMappingImpl>, ModelElementIdToEObjectMapping

public class ModelElementIdToEObjectMappingImpl
extends Object
implements ModelElementIdToEObjectMapping

Author:
emueller, koegel

Constructor Summary
ModelElementIdToEObjectMappingImpl(ModelElementIdToEObjectMapping mapping)
          Constructor.
ModelElementIdToEObjectMappingImpl(ModelElementIdToEObjectMapping mapping, List<AbstractOperation> operationsList1, List<AbstractOperation> operationsList2)
          Constructor.
ModelElementIdToEObjectMappingImpl(ModelElementIdToEObjectMapping mapping, List<ChangePackage> changePackages)
          Constructor.
ModelElementIdToEObjectMappingImpl(Project project, ChangePackage changePackage)
          Constructor.
 
Method Summary
 ESModelElementIdToEObjectMappingImpl createAPI()
          Creates the API interface for this class.
 org.eclipse.emf.ecore.EObject get(ModelElementId modelElementId)
          Get the EObject for the given ESModelElementId, if any.
 void put(ChangePackage changePackage)
          Adds all model elements that are involved in operations contained in the ChangePackage and their respective IDs into the mapping.
 void put(Collection<AbstractOperation> operations)
          Put the given elements from the operations to the mapping.
 void put(List<ChangePackage> changePackages)
          Adds all model elements that are involved in operations contained in the ChangePackage and their respective IDs into the mapping.
 ESModelElementIdToEObjectMappingImpl toAPI()
          Returns the API interface of this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelElementIdToEObjectMappingImpl

public ModelElementIdToEObjectMappingImpl(ModelElementIdToEObjectMapping mapping)
Constructor.

Parameters:
mapping - an initial mapping from {EObject}s to their ModelElementIds

ModelElementIdToEObjectMappingImpl

public ModelElementIdToEObjectMappingImpl(ModelElementIdToEObjectMapping mapping,
                                          List<ChangePackage> changePackages)
Constructor.

Parameters:
mapping - an initial mapping from {EObject}s to their ModelElementIds
changePackages - a list of ChangePackages whose involved model elements should be added to the mapping

ModelElementIdToEObjectMappingImpl

public ModelElementIdToEObjectMappingImpl(ModelElementIdToEObjectMapping mapping,
                                          List<AbstractOperation> operationsList1,
                                          List<AbstractOperation> operationsList2)
Constructor.

Parameters:
mapping - an initial mapping from {EObject}s to their ESModelElementIds
operationsList1 - list of operations for which involved model elements should be added to the mapping
operationsList2 - list of operations for which involved model elements should be added to the mapping

ModelElementIdToEObjectMappingImpl

public ModelElementIdToEObjectMappingImpl(Project project,
                                          ChangePackage changePackage)
Constructor.

Parameters:
project - the project which contains the initial mapping from {EObject}s to their ESModelElementIds
changePackage - a ChangePackages whose involved model elements should be added to the mapping
Method Detail

put

public void put(List<ChangePackage> changePackages)
Adds all model elements that are involved in operations contained in the ChangePackage and their respective IDs into the mapping.

Parameters:
changePackages - the ChangePackages whose model elements should be added to the mapping

put

public void put(ChangePackage changePackage)
Adds all model elements that are involved in operations contained in the ChangePackage and their respective IDs into the mapping.

Parameters:
changePackage - the ChangePackage whose model elements should be added to the mapping

put

public void put(Collection<AbstractOperation> operations)
Put the given elements from the operations to the mapping.

Parameters:
operations - the operations

get

public org.eclipse.emf.ecore.EObject get(ModelElementId modelElementId)
Get the EObject for the given ESModelElementId, if any.

Specified by:
get in interface ESIdToEObjectMapping<ModelElementId>
Parameters:
modelElementId - the ID
Returns:
the object or null if no EObject for the ID is found
See Also:
ESIdToEObjectMapping.get(java.lang.Object)

toAPI

public ESModelElementIdToEObjectMappingImpl toAPI()
Returns the API interface of this class.

Specified by:
toAPI in interface APIDelegate<ESModelElementIdToEObjectMappingImpl>
Returns:
the API interface of this class

createAPI

public ESModelElementIdToEObjectMappingImpl createAPI()
Creates the API interface for this class.

Specified by:
createAPI in interface APIDelegate<ESModelElementIdToEObjectMappingImpl>
Returns:
the API interface of this class


Copyright © 2015. All Rights Reserved.