Interface EntityHashModel

All Known Implementing Classes:
EntityHashModelImpl, PrivilegedEntityHashModel

public interface EntityHashModel
A hash-representation for an Entity, used in freemarker.
  • Method Details

    • getNiceEntity

      @Nullable @Nullable Entity getNiceEntity()
    • get

      Object get(String key) throws freemarker.template.TemplateModelException
      Getter to handle field and relation access to the underlying Entity
      Parameters:
      key - a field or relation name
      Returns:
      the requested field or relation value
      Throws:
      freemarker.template.TemplateModelException
    • resolve

      EntityList resolve(String relation, String orderBy)
      Resolve a relation while providing an ordering
      Parameters:
      relation - the relation to be resolved
      orderBy - an ordering clause
      Returns:
      the resulting entity list
    • resolve

      EntityList resolve(String relation, String orderBy, @Nullable @Nullable String where)
      Resolve a relation with ordering and a condition.
      Parameters:
      relation - the relation to be resolved
      orderBy - an ordering clause
      where - the where clause
      Returns:
      the resulting entity list
    • display

      String display()
      Get the default display of the entity.
      Returns:
      the default display fo the entity.
    • display

      String display(String type)
      Get the default display of the entity.
      Parameters:
      type - display type name
      Returns:
      the default display fo the entity.
      See Also:
    • model

      String model()
      Get the model name of the entity.
      Returns:
      the name of the model.
    • exists

      boolean exists()
      Check if entity exists.
      Returns:
      true if it exists, false if not.
    • fieldExists

      boolean fieldExists(String name)
      Check if a field exists on the model.
      Returns:
      true if it exists, false if not.
    • relationExists

      boolean relationExists(String name)
      Check if a relation exists on the model.
      Returns:
      true if it exists, false if not.