Class EntityDescriber
java.lang.Object
org.tentackle.maven.plugin.mcp.render.EntityDescriber
Describes one entity.
The primary representation is the canonical model definition: the densest, least ambiguous description of an entity that exists, and the language the caller has to write back. Everything the DSL cannot express because it is computed from the whole model graph is added as an explicit section.
- Author:
- harald
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe sections rendered when the caller names none.static final String[]The sections that can be rendered; in the order they are rendered. -
Constructor Summary
ConstructorsConstructorDescriptionEntityDescriber(Entity entity, Scope scope, Collection<String> sections, ModelDefaults modelDefaults, Collection<org.tentackle.sql.Backend> backends) Creates a describer. -
Method Summary
-
Field Details
-
SECTIONS
The sections that can be rendered; in the order they are rendered. -
DEFAULT_SECTIONS
-
-
Constructor Details
-
EntityDescriber
public EntityDescriber(Entity entity, Scope scope, Collection<String> sections, ModelDefaults modelDefaults, Collection<org.tentackle.sql.Backend> backends) Creates a describer.- Parameters:
entity- the entity to describescope- the scope of the member sectionssections- the sections to render, seeSECTIONSmodelDefaults- the model defaults, null if nonebackends- the backends for the ddl section, empty if none configured
-
-
Method Details
-
describe
Renders the description.- Returns:
- the description
- Throws:
ModelException- if the model is inconsistent
-