Interface IdGenerator

All Known Implementing Classes:
SequentialIntegerIdGeneratorStrategy

public interface IdGenerator
The interface that ID generators, used when creating IDs for model elements/relationships, must implement.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).
    Generates an ID for the specified model element.
    generateId(Relationship relationship)
    Generates an ID for the specified model relationship.
  • Method Details

    • generateId

      String generateId(Element element)
      Generates an ID for the specified model element.
      Parameters:
      element - an Element instance
      Returns:
      the ID, as a String
    • generateId

      String generateId(Relationship relationship)
      Generates an ID for the specified model relationship.
      Parameters:
      relationship - a Relationship instance
      Returns:
      the ID, as a String
    • found

      void found(String id)
      Called when loading/deserializing a model, to indicate that the specified ID has been found (and shouldn't be reused when generating new IDs).
      Parameters:
      id - the ID that has been found