public class EntityFactoryImpl extends Object implements EntityFactory
| Constructor and Description |
|---|
EntityFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
consumePendingComment()
Returns the pending comment and consumes it.
|
AttributeImpl |
createAttribute(Entity entity,
SourceInfo sourceInfo,
boolean implicit)
Creates an attribute.
|
AttributeOptionsImpl |
createAttributeOptions(Attribute attribute,
SourceInfo sourceInfo)
Creates attribute options.
|
EntityImpl |
createEntity(SourceInfo sourceInfo)
Creates an empty entity.
|
Entity |
createEntity(String model,
ModelDefaults modelDefaults)
Creates an entity from a model source.
|
EntityOptionsImpl |
createEntityOptions(Entity entity,
SourceInfo sourceInfo)
Creates entity options.
|
IndexImpl |
createIndex(Entity entity,
SourceInfo sourceInfo)
Creates an index.
|
IndexAttributeImpl |
createIndexAttribute(Index index)
Creates an index attribute.
|
RelationImpl |
createRelation(Entity entity,
SourceInfo sourceInfo)
Creates a relation.
|
Collection<Backend> |
getBackends()
Gets the backends to validate the model against.
|
protected void |
processAttribute(EntityImpl entity,
AttributeLine line)
Processes an attribute line.
|
protected void |
processAttributeOption(EntityImpl entity,
OptionLine line)
Processes an attribute option line.
|
protected void |
processConfiguration(EntityImpl entity,
ConfigurationLine line)
Processes a configuration line.
|
protected void |
processGlobalOptions(EntityImpl entity,
GlobalOptionLine line)
Processes a global option line.
|
protected void |
processIndexConfiguration(EntityImpl entity,
ConfigurationLine line)
Processes an index configuration line.
Requires the attribute already processed. |
protected void |
processRelation(EntityImpl entity,
RelationLine line)
Processes a relation line.
|
protected void |
processRelationOption(EntityImpl entity,
OptionLine line)
Processes a relation option line.
|
void |
setBackends(Collection<Backend> backends)
Sets the backends to validate the model against.
|
protected void |
setPendingComment(String commentLine)
Adds a pending comment line.
|
public Collection<Backend> getBackends()
EntityFactorygetBackends in interface EntityFactorypublic void setBackends(Collection<Backend> backends)
EntityFactorysetBackends in interface EntityFactorybackends - the backends, null to disable checkpublic EntityImpl createEntity(SourceInfo sourceInfo)
EntityFactorycreateEntity in interface EntityFactorysourceInfo - source information, null if nonepublic AttributeImpl createAttribute(Entity entity, SourceInfo sourceInfo, boolean implicit)
EntityFactorycreateAttribute in interface EntityFactoryentity - the entity this attribute belongs tosourceInfo - source information, null if noneimplicit - true if implicit attributepublic AttributeOptionsImpl createAttributeOptions(Attribute attribute, SourceInfo sourceInfo)
EntityFactorycreateAttributeOptions in interface EntityFactoryattribute - the attributesourceInfo - source information, null if nonepublic EntityOptionsImpl createEntityOptions(Entity entity, SourceInfo sourceInfo)
EntityFactorycreateEntityOptions in interface EntityFactoryentity - the entitysourceInfo - source information, null if nonepublic IndexImpl createIndex(Entity entity, SourceInfo sourceInfo)
EntityFactorycreateIndex in interface EntityFactoryentity - the entity this index belongs tosourceInfo - source information, null if nonepublic IndexAttributeImpl createIndexAttribute(Index index)
EntityFactorycreateIndexAttribute in interface EntityFactoryindex - the indexpublic RelationImpl createRelation(Entity entity, SourceInfo sourceInfo)
EntityFactorycreateRelation in interface EntityFactoryentity - the entity this relation belongs tosourceInfo - source information, null if nonepublic Entity createEntity(String model, ModelDefaults modelDefaults) throws ModelException
EntityFactorycreateEntity in interface EntityFactorymodel - the model sourcemodelDefaults - the model defaults, null if noneModelException - if parsing the model failedprotected void processConfiguration(EntityImpl entity, ConfigurationLine line) throws ModelException
entity - the entityline - the configuration lineModelException - if processing failedprotected void processIndexConfiguration(EntityImpl entity, ConfigurationLine line) throws ModelException
entity - the entityline - the configuration lineModelException - if processing failedprotected void processGlobalOptions(EntityImpl entity, GlobalOptionLine line) throws ModelException
entity - the entityline - the global option lineModelException - if processing failedprotected void processAttributeOption(EntityImpl entity, OptionLine line) throws ModelException
entity - the entityline - the attribute option lineModelException - if processing failedprotected void processRelationOption(EntityImpl entity, OptionLine line) throws ModelException
entity - the entityline - the attribute option lineModelException - if processing failedprotected void processAttribute(EntityImpl entity, AttributeLine line) throws ModelException
entity - the entityline - the attribute lineModelException - if processing failedprotected void processRelation(EntityImpl entity, RelationLine line) throws ModelException
entity - the entityline - the relation lineModelException - if processing failedprotected void setPendingComment(String commentLine)
commentLine - the comment lineprotected String consumePendingComment()
Tentackle - a domain driven enterprise framework