Class EntityHashModelImpl
java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.templatemodel.EntityHashModelImpl
- All Implemented Interfaces:
- EntityHashModel
- 
Constructor SummaryConstructorsConstructorDescriptionEntityHashModelImpl(Context context, EntityModel model, freemarker.template.ObjectWrapper objectWrapper, DefaultDisplayService defaultDisplayService, QueryBuilderFactory queryBuilderFactory) Create a EntityHashModel for a null entity.EntityHashModelImpl(Context contextService, Entity niceEntity, freemarker.template.ObjectWrapper objectWrapper, DefaultDisplayService defaultDisplayService, QueryBuilderFactory queryBuilderFactory) 
- 
Method SummaryModifier and TypeMethodDescriptiondisplay()Get the default display of the entity.Get the default display of the entity.booleanexists()Check if entity exists.booleanfieldExists(String name) Check if a field exists on the model.Getter to handle field and relation access to the underlyingEntity@Nullable Entitymodel()Get the model name of the entity.booleanrelationExists(String name) Check if a relation exists on the model.Resolve a relation while providing an orderingResolve a relation with ordering and a condition.
- 
Constructor Details- 
EntityHashModelImplpublic EntityHashModelImpl(Context contextService, Entity niceEntity, freemarker.template.ObjectWrapper objectWrapper, DefaultDisplayService defaultDisplayService, QueryBuilderFactory queryBuilderFactory) 
- 
EntityHashModelImplpublic EntityHashModelImpl(Context context, EntityModel model, freemarker.template.ObjectWrapper objectWrapper, DefaultDisplayService defaultDisplayService, QueryBuilderFactory queryBuilderFactory) Create a EntityHashModel for a null entity.
 
- 
- 
Method Details- 
getDescription copied from interface:EntityHashModelGetter to handle field and relation access to the underlyingEntity- Specified by:
- getin interface- EntityHashModel
- Parameters:
- key- a field or relation name
- Returns:
- the requested field or relation value
- Throws:
- freemarker.template.TemplateModelException
 
- 
resolveDescription copied from interface:EntityHashModelResolve a relation while providing an ordering- Specified by:
- resolvein interface- EntityHashModel
- Parameters:
- relation- the relation to be resolved
- orderBy- an ordering clause
- Returns:
- the resulting entity list
 
- 
resolveDescription copied from interface:EntityHashModelResolve a relation with ordering and a condition.- Specified by:
- resolvein interface- EntityHashModel
- Parameters:
- relation- the relation to be resolved
- orderBy- an ordering clause
- where- the where clause
- Returns:
- the resulting entity list
 
- 
getNiceEntity- Specified by:
- getNiceEntityin interface- EntityHashModel
 
- 
displayDescription copied from interface:EntityHashModelGet the default display of the entity.- Specified by:
- displayin interface- EntityHashModel
- Returns:
- the default display fo the entity.
 
- 
displayDescription copied from interface:EntityHashModelGet the default display of the entity.- Specified by:
- displayin interface- EntityHashModel
- Parameters:
- type- display type name
- Returns:
- the default display fo the entity.
- See Also:
 
- 
modelDescription copied from interface:EntityHashModelGet the model name of the entity.- Specified by:
- modelin interface- EntityHashModel
- Returns:
- the name of the model.
 
- 
existspublic boolean exists()Description copied from interface:EntityHashModelCheck if entity exists.- Specified by:
- existsin interface- EntityHashModel
- Returns:
- true if it exists, false if not.
 
- 
fieldExistsDescription copied from interface:EntityHashModelCheck if a field exists on the model.- Specified by:
- fieldExistsin interface- EntityHashModel
- Returns:
- true if it exists, false if not.
 
- 
relationExistsDescription copied from interface:EntityHashModelCheck if a relation exists on the model.- Specified by:
- relationExistsin interface- EntityHashModel
- Returns:
- true if it exists, false if not.
 
 
-