Class AbstractManyToOneSuggestion<T>

java.lang.Object
de.knightsoftnet.mtwidgets.client.ui.widget.oracle.AbstractManyToOneSuggestion<T>
Type Parameters:
T - type of entity
All Implemented Interfaces:
SuggestOracle.Suggestion

public abstract class AbstractManyToOneSuggestion<T> extends Object implements SuggestOracle.Suggestion
abstract suggestion implementation for entities which implement HasKeyValueSuggestion interface.
  • Field Details

  • Constructor Details

    • AbstractManyToOneSuggestion

      public AbstractManyToOneSuggestion(T entity, SuggestOracle.Request request)
      default constructor.
      Parameters:
      entity - the entity which was found
      request - the request which was fired
  • Method Details

    • of

      public abstract AbstractManyToOneSuggestion<T> of(T entity, SuggestOracle.Request request)
      generate new instance.
      Parameters:
      entity - the entity which was found
      request - the request which was fired
      Returns:
      new entity instance
    • getDisplayString

      public String getDisplayString()
      Specified by:
      getDisplayString in interface SuggestOracle.Suggestion
    • getNameString

      public abstract String getNameString()
      get name element of the entity.
      Returns:
      name string
    • getEntity

      public T getEntity()
      get entity base element.
      Returns:
      entity