Interface EntityFactory

All Known Implementing Classes:
EntityFactoryImpl

public interface EntityFactory
A factory for entity models.
Author:
harald
  • Method Details

    • setBackends

      void setBackends(Collection<Backend> backends)
      Sets the backends to validate the model against.
      Parameters:
      backends - the backends, null to disable check
    • getBackends

      Collection<Backend> getBackends()
      Gets the backends to validate the model against.
      Returns:
      the backends, empty if check is disabled, never null
    • createEntity

      Entity createEntity(SourceInfo sourceInfo)
      Creates an empty entity.
      Parameters:
      sourceInfo - source information, null if none
      Returns:
      the created entity
    • createEntity

      Entity createEntity(String model, ModelDefaults modelDefaults) throws ModelException
      Creates an entity from a model source.
      Parameters:
      model - the model source
      modelDefaults - the model defaults, null if none
      Returns:
      the created entity
      Throws:
      ModelException - if parsing the model failed
    • createAttribute

      Attribute createAttribute(Entity entity, SourceInfo sourceInfo, boolean implicit)
      Creates an attribute.
      Parameters:
      entity - the entity this attribute belongs to
      sourceInfo - source information, null if none
      implicit - true if implicit attribute
      Returns:
      the created attribute
    • createAttributeOptions

      AttributeOptions createAttributeOptions(Attribute attribute, SourceInfo sourceInfo)
      Creates attribute options.
      Parameters:
      attribute - the attribute
      sourceInfo - source information, null if none
      Returns:
      the created options
    • createEntityOptions

      EntityOptions createEntityOptions(Entity entity, SourceInfo sourceInfo)
      Creates entity options.
      Parameters:
      entity - the entity
      sourceInfo - source information, null if none
      Returns:
      the created options
    • createIndex

      Index createIndex(Entity entity, SourceInfo sourceInfo)
      Creates an index.
      Parameters:
      entity - the entity this index belongs to
      sourceInfo - source information, null if none
      Returns:
      the created index
    • createIndexAttribute

      IndexAttribute createIndexAttribute(Index index)
      Creates an index attribute.
      Parameters:
      index - the index
      Returns:
      the created index attribute
    • createRelation

      Relation createRelation(Entity entity, SourceInfo sourceInfo)
      Creates a relation.
      Parameters:
      entity - the entity this relation belongs to
      sourceInfo - source information, null if none
      Returns:
      the created relation