- All Known Implementing Classes:
EntityFactoryImpl
public interface EntityFactory
A factory for entity models.
- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptioncreateAttribute(Entity entity, SourceInfo sourceInfo, boolean implicit) Creates an attribute.createAttributeOptions(Attribute attribute, SourceInfo sourceInfo) Creates attribute options.createEntity(Document document, ModelDefaults modelDefaults) Creates an entity from a model source.createEntity(SourceInfo sourceInfo) Creates an empty entity.createEntityOptions(Entity entity, SourceInfo sourceInfo) Creates entity options.createIndex(Entity entity, SourceInfo sourceInfo) Creates an index.createIndexAttribute(Index index) Creates an index attribute.createRelation(Entity entity, SourceInfo sourceInfo) Creates a relation.Gets the backends to validate the model against.voidsetBackends(Collection<Backend> backends) Sets the backends to validate the model against.
-
Method Details
-
setBackends
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
Creates an empty entity.- Parameters:
sourceInfo- source information, null if none- Returns:
- the created entity
-
createEntity
Creates an entity from a model source.- Parameters:
document- the model source documentmodelDefaults- the model defaults, null if none- Returns:
- the created entity
- Throws:
ModelException- if parsing the model failed
-
createAttribute
Creates an attribute.- Parameters:
entity- the entity this attribute belongs tosourceInfo- source information, null if noneimplicit- true if implicit attribute- Returns:
- the created attribute
-
createAttributeOptions
Creates attribute options.- Parameters:
attribute- the attributesourceInfo- source information, null if none- Returns:
- the created options
-
createEntityOptions
Creates entity options.- Parameters:
entity- the entitysourceInfo- source information, null if none- Returns:
- the created options
-
createIndex
Creates an index.- Parameters:
entity- the entity this index belongs tosourceInfo- source information, null if none- Returns:
- the created index
-
createIndexAttribute
Creates an index attribute.- Parameters:
index- the index- Returns:
- the created index attribute
-
createRelation
Creates a relation.- Parameters:
entity- the entity this relation belongs tosourceInfo- source information, null if none- Returns:
- the created relation
-