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
ConstructorDescriptionPrivilegedEntityHashModel
(EntityHashModel delegate, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptiondisplay()
Get the default display of the entity.Get the default display of the entity.boolean
exists()
Check if entity exists.boolean
fieldExists
(String name) Check if a field exists on the model.Getter to handle field and relation access to the underlyingEntity
@Nullable Entity
model()
Get the model name of the entity.boolean
relationExists
(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:
getNiceEntity
in interfaceEntityHashModel
-
get
Description copied from interface:EntityHashModel
Getter to handle field and relation access to the underlyingEntity
- Specified by:
get
in interfaceEntityHashModel
- Parameters:
key
- a field or relation name- Returns:
- the requested field or relation value
-
resolve
Description copied from interface:EntityHashModel
Resolve a relation while providing an ordering- Specified by:
resolve
in interfaceEntityHashModel
- Parameters:
relation
- the relation to be resolvedorderBy
- an ordering clause- Returns:
- the resulting entity list
-
resolve
Description copied from interface:EntityHashModel
Resolve a relation with ordering and a condition.- Specified by:
resolve
in interfaceEntityHashModel
- Parameters:
relation
- the relation to be resolvedorderBy
- an ordering clausewhere
- the where clause- Returns:
- the resulting entity list
-
display
Description copied from interface:EntityHashModel
Get the default display of the entity.- Specified by:
display
in interfaceEntityHashModel
- Returns:
- the default display fo the entity.
-
display
Description copied from interface:EntityHashModel
Get the default display of the entity.- Specified by:
display
in interfaceEntityHashModel
- Parameters:
type
- display type name- Returns:
- the default display fo the entity.
- See Also:
-
model
Description copied from interface:EntityHashModel
Get the model name of the entity.- Specified by:
model
in interfaceEntityHashModel
- Returns:
- the name of the model.
-
exists
public boolean exists()Description copied from interface:EntityHashModel
Check if entity exists.- Specified by:
exists
in interfaceEntityHashModel
- Returns:
- true if it exists, false if not.
-
fieldExists
Description copied from interface:EntityHashModel
Check if a field exists on the model.- Specified by:
fieldExists
in interfaceEntityHashModel
- Returns:
- true if it exists, false if not.
-
relationExists
Description copied from interface:EntityHashModel
Check if a relation exists on the model.- Specified by:
relationExists
in interfaceEntityHashModel
- Returns:
- true if it exists, false if not.
-