Interface EntityReferenceFactory<EntityType extends org.palladiosimulator.pcm.core.entity.Entity>

Type Parameters:
EntityType - the model element type referenced by the constructed references.
All Known Implementing Classes:
EntityReference.AbstractEntityReferenceFactory, SimuLizarEntityReferenceFactories.LinkingResource, SimuLizarEntityReferenceFactories.ResourceContainer, SimuLizarEntityReferenceFactories.UsageScenario

public interface EntityReferenceFactory<EntityType extends org.palladiosimulator.pcm.core.entity.Entity>
The factory creates a new entity reference given either a resolved model element or by a given id. If the reference is created based solely on the id, there is not necessarily a check in place, whether a model element of the appropriate type actually exists.
  • Method Details

    • create

      Creates a new EntityReference for an entity identified by the given id.
      Parameters:
      id - the id of the model element. See Identifier.getId()
      Returns:
      a new reference
    • createCached

      EntityReference<EntityType> createCached(EntityType entity)
      Creates a new EntityReference which matches the provided model element. The resolved entity is cached by will not prevent garbage collection from cleaning it up.
      Parameters:
      entity - a resolved model element.
      Returns:
      a new reference