Class PrivilegedEntityHashModel
java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.templatemodel.PrivilegedEntityHashModel
- All Implemented Interfaces:
EntityHashModel
This is a wrapper for
EntityHashModel which simply delegates all calls in privileged mode.-
Constructor Summary
ConstructorsConstructorDescriptionPrivilegedEntityHashModel(EntityHashModel delegate, SecurityManager securityManager) -
Method Summary
Modifier 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
-
PrivilegedEntityHashModel
-
-
Method Details
-
getNiceEntity
- Specified by:
getNiceEntityin interfaceEntityHashModel
-
get
Description copied from interface:EntityHashModelGetter to handle field and relation access to the underlyingEntity- Specified by:
getin interfaceEntityHashModel- Parameters:
key- a field or relation name- Returns:
- the requested field or relation value
-
resolve
Description copied from interface:EntityHashModelResolve a relation while providing an ordering- Specified by:
resolvein interfaceEntityHashModel- Parameters:
relation- the relation to be resolvedorderBy- an ordering clause- Returns:
- the resulting entity list
-
resolve
Description copied from interface:EntityHashModelResolve a relation with ordering and a condition.- Specified by:
resolvein interfaceEntityHashModel- Parameters:
relation- the relation to be resolvedorderBy- an ordering clausewhere- the where clause- Returns:
- the resulting entity list
-
display
Description copied from interface:EntityHashModelGet the default display of the entity.- Specified by:
displayin interfaceEntityHashModel- Returns:
- the default display fo the entity.
-
display
Description copied from interface:EntityHashModelGet the default display of the entity.- Specified by:
displayin interfaceEntityHashModel- Parameters:
type- display type name- Returns:
- the default display fo the entity.
- See Also:
-
model
Description copied from interface:EntityHashModelGet the model name of the entity.- Specified by:
modelin interfaceEntityHashModel- Returns:
- the name of the model.
-
exists
public boolean exists()Description copied from interface:EntityHashModelCheck if entity exists.- Specified by:
existsin interfaceEntityHashModel- Returns:
- true if it exists, false if not.
-
fieldExists
Description copied from interface:EntityHashModelCheck if a field exists on the model.- Specified by:
fieldExistsin interfaceEntityHashModel- Returns:
- true if it exists, false if not.
-
relationExists
Description copied from interface:EntityHashModelCheck if a relation exists on the model.- Specified by:
relationExistsin interfaceEntityHashModel- Returns:
- true if it exists, false if not.
-