Package ch.tocco.nice2.model.entity.api
Interface EntityVisualisationModel
- All Superinterfaces:
ModelElement
- All Known Implementing Classes:
EntityVisualisationModelImpl
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 Summary
Modifier and TypeMethodDescriptionGet the default representation of the entity.getDefaultDisplay
(String type) Get the default representation of the entity for a certain type.Returns the default sorting of this entity-model.getLabel()
The default label for this entity-type.boolean
void
setDefaultDisplay
(DefaultDisplay defaultDisplay) Set the default display valuevoid
setDefaultDisplay
(DefaultDisplay defaultDisplay, String type) Set the default display value with typevoid
setDefaultSorting
(List<? extends Sorting> sorting) Set the sorting.void
setHasTreeView
(boolean hasTreeView) void
setLabel
(DisplayValue label) Set the label for this entity-model
-
Method Details
-
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
Set the sorting. The order in the list has to fulfill the requirement ofgetDefaultSorting()
- 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
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
Set the default display value- Parameters:
defaultDisplay
- the default display
-
getDefaultDisplay
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
Set the default display value with type- Parameters:
defaultDisplay
- the default displaytype
- the type of the default display
-
hasTreeView
boolean hasTreeView() -
setHasTreeView
void setHasTreeView(boolean hasTreeView)
-