Class ColumnModel<D,V>

java.lang.Object
org.ujorm.tools.web.table.ColumnModel<D,V>

public class ColumnModel<D,V> extends Object
Table column model
Author:
Pavel Ponec
  • Constructor Details

    • ColumnModel

      public ColumnModel(@NotNull @NotNull Direction direction, int index)
    • ColumnModel

      public ColumnModel(int index, @NotNull @NotNull Function<D,V> column, @NotNull @NotNull CharSequence title, @Nullable @Nullable HttpParameter param)
  • Method Details

    • getIndex

      public int getIndex()
    • getColumn

      @NotNull public @NotNull Function<D,V> getColumn()
    • getTitle

      @NotNull public @NotNull CharSequence getTitle()
    • getParam

      @Nullable public @Nullable HttpParameter getParam()
    • getParam

      @NotNull public @NotNull HttpParameter getParam(@NotNull @NotNull HttpParameter defaultValue)
    • isSortable

      public boolean isSortable()
    • getDirection

      @NotNull public @NotNull Direction getDirection()
    • isFiltered

      public boolean isFiltered()
    • setSortable

      public final void setSortable(@NotNull @NotNull Direction direction)
    • setDirection

      public final void setDirection(@NotNull @NotNull Direction direction)
    • toCode

      public String toCode(boolean opposite)
      Write the content to an appendable text stream
    • toCode

      public Appendable toCode(boolean opposite, @NotNull @NotNull Appendable writer) throws IOException
      Write the content to an appendable text stream where the default direction is an ASCENDING.
      Throws:
      IOException
    • getComparator

      @NotNull public @NotNull Comparator<D> getComparator(@Nullable @Nullable Function<D,?> defaultFce)
      Get comparator of a sortable column
    • getComparator

      @NotNull public @NotNull Comparator<D> getComparator(@NotNull @NotNull Comparator<D> defaultCompar)
      Get comparator of a sortable column
    • isIncludeColumnType

      protected boolean isIncludeColumnType()
      Including is more common choice
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ofCode

      @NotNull public static @NotNull ColumnModel ofCode(@NotNull @NotNull String paramValue)
    • ofStub

      public static <D, V> ColumnModel<D,V> ofStub()
      Create a stub column