Interface EntityVisualisationModel

All Superinterfaces:
ModelElement
All Known Implementing Classes:
EntityVisualisationModelImpl

public interface EntityVisualisationModel extends ModelElement
The visualisation-part of an EntityModel

This interface describes how a entity is visualised. For example it describes the default-sorting, the default-labels, default-icons, default-length of result-list ins search-forms etc.

Maybe later it could contain even more complex visualisation-infos.

  • Method Details

    • getDefaultSorting

      List<Sorting> getDefaultSorting()
      Returns the default sorting of this entity-model. It returns a list of multiple Sorting-items. The FIRST item has the HIGHEST priority and the LAST item has the LOWEST.

      To apply this to a Query use Entities.appendSorting() or appendDefaultSorting().

      Returns:
      The sorting list, may be empty. Unmodifiable.
    • setDefaultSorting

      void setDefaultSorting(List<? extends Sorting> sorting)
      Set the sorting. The order in the list has to fulfill the requirement of getDefaultSorting()
      Parameters:
      sorting - the sorting.
      Throws:
      IllegalStateException - when try to change the model after finished model-reading
    • getLabel

      DisplayValue getLabel()
      The default label for this entity-type. This label is used for visualising the entity in relations, trees, etc.
      Returns:
      the display value
    • setLabel

      void setLabel(DisplayValue label)
      Set the label for this entity-model
      Parameters:
      label - the label
      Throws:
      IllegalStateException - when try to change the model after finished model-reading
    • getDefaultDisplay

      DefaultDisplay getDefaultDisplay()
      Get the default representation of the entity. May contain constants, fields, textresources...
      Returns:
      the value to evaluate
    • setDefaultDisplay

      void setDefaultDisplay(DefaultDisplay defaultDisplay)
      Set the default display value
      Parameters:
      defaultDisplay - the default display
    • getDefaultDisplay

      DefaultDisplay getDefaultDisplay(String type)
      Get the default representation of the entity for a certain type. May contain constants, fields, textresources...
      Returns:
      the value for the given type to evaluate
    • setDefaultDisplay

      void setDefaultDisplay(DefaultDisplay defaultDisplay, String type)
      Set the default display value with type
      Parameters:
      defaultDisplay - the default display
      type - the type of the default display
    • hasTreeView

      boolean hasTreeView()
    • setHasTreeView

      void setHasTreeView(boolean hasTreeView)