Interface Content2Params

All Superinterfaces:
Comparable<StoreElement>, MultiPageParamsProvider, StoreElement, Workflowable

public interface Content2Params extends StoreElement, MultiPageParamsProvider
Parameters container for use with database referencing elements.
Since:
3.0.114
  • Method Details

    • getEmptyPage

      Page getEmptyPage()
      Provides the empty page.
      Returns:
      The empty page.
      Since:
      3.0.114
    • setEmptyPage

      void setEmptyPage(Page value)
      Defines the empty page.
      Parameters:
      value - The empty page.
      Since:
      3.0.114
    • getRecordCountPerPage

      int getRecordCountPerPage()
      Provides the maximum number of records which is rendered on a each page, 0 is used when all records are rendered on one page.
      Returns:
      The maximum number.
      Since:
      3.0.114
    • setRecordCountPerPage

      void setRecordCountPerPage(int value)
      Defines the maximum number of records to be rendered on each page.
      Parameters:
      value - 0, for all records on one page, above 0, to define the maximum.
      Since:
      3.0.114
    • getMaxPageCount

      int getMaxPageCount()
      Provides the maximum number of pages to be generated. If 0, any number of pages get generated.
      Returns:
      The maximum number of pages generate.
      Since:
      3.0.114
    • setMaxPageCount

      void setMaxPageCount(int value)
      Defines the maximum number of pages to be generated. If set to 0, any number of pages will be generated.
      Parameters:
      value - Greater or equal to 0.
      Since:
      3.0.114
    • getSitemapVariableName

      @Nullable @Nullable String getSitemapVariableName()
      Returns the name of the variable which may be used in the sitemap for the embedding PageRef - may be null if the default label should be used. The value is also used to as part of URLs in de.espirit.firstspirit.generate.AdvancedUrlFactory.

      The value could be a 'reference chain', i.e. a dot-delimited path following entity references (e.g. "category.name"). If language specific fields are stored with a trailing '*' instead of the language suffix (e.g. "name*" instead of "name_EN"), the value will be resolved language specific using GenerationContext.getLanguage().

      Since:
      3.0.114
      See Also:
    • setSitemapVariableName

      void setSitemapVariableName(@Nullable @Nullable String value)
      Defines the name for the sitemap variable.
      Parameters:
      value - The variable's name.
      Since:
      3.0.114
      See Also:
    • getTableTemplate

      @Nullable @Nullable TableTemplate getTableTemplate()
      Provides the table template for rendering records.
      Returns:
      The table template or null.
      Since:
      3.0.114
    • getQuery

      @Nullable @Nullable Query getQuery()
      Provides the query used for fetching records.
      Returns:
      A query or null.
      Since:
      3.0.114
    • hasQuery

      boolean hasQuery()
      Indicates whether this Content2Params has a query defined or not.
      Returns:
      true if a query is defined, false otherwise
      Since:
      4.2.15
      See Also:
    • setQuery

      void setQuery(Query value) throws IOException
      Defines the query to be used for fetching records.
      Parameters:
      value - The query.
      Throws:
      IOException
      Since:
      3.0.114
    • getData

      List<Entity> getData(Language language)
      Provides all records for the given language.
      Parameters:
      language - The language.
      Returns:
      A list of records.
      Since:
      3.0.114
    • getData

      List<Entity> getData(String languageAbbreviation)
      Provides all records for the given language.
      Parameters:
      languageAbbreviation - The language abbreviation.
      Returns:
      A list of records.
      Since:
      3.0.114
    • getData

      List<Entity> getData(Language language, int pageNumber)
      Provides all records for the given language being rendered on the specified page number, where page counting starts with 0.
      Parameters:
      language - The language.
      pageNumber - The page number.
      Returns:
      A list of records.
      Since:
      3.0.114
    • getData

      List<Entity> getData(String languageAbbreviation, int pageNumber)
      Provides all records for the given language being rendered on the specified page number, where page counting starts with 0.
      Parameters:
      languageAbbreviation - The language abbreviation.
      pageNumber - The page number.
      Returns:
      A list of records.
      Since:
      3.0.114
    • getPageCount

      int getPageCount(Language language)
      Provides the number of pages which will be created by the projection specified with this parameters for the given language.
      Parameters:
      language - The language.
      Returns:
      The number of pages.
      Since:
      3.1.158
    • hasChangedAfter

      boolean hasChangedAfter(long timestamp)
      Indicates whether this parameters have changed after the given time stamp.
      Parameters:
      timestamp - A time stamp.
      Returns:
      true, if changed.
      Since:
      3.0.132
    • clearOrdering

      void clearOrdering()
      Requests to clear all ordering for this parameters.
      Since:
      4.0.0
    • addOrdering

      void addOrdering(@NotNull @NotNull String columnName, boolean ascending, boolean languageDependent)
      Adds an ordering to this parameters for the named column.
      Parameters:
      columnName - The name of the column.
      ascending - true, for ascending order.
      languageDependent - If to order language dependent.
      Since:
      4.0.0
    • getFilterParams

      Map<String,Object> getFilterParams()
      Returns an (unmodifyable) map containing the actual filter parameters.
      Since:
      4.0.0
      See Also:
    • setFilterParams

      void setFilterParams(Map<String,Object> params)
      Defines filter parameters by the given map.
      Parameters:
      params - A parameter map.
      Since:
      4.0.0
      See Also:
    • getSelect

      @NotNull @NotNull Select getSelect(@NotNull @NotNull Language language)
      Provides the select statement for the given language to request records.
      Parameters:
      language - The language.
      Returns:
      A select statement.
      Since:
      4.0
    • getMultiPageParams

      @NotNull @NotNull MultiPageParams getMultiPageParams(@NotNull @NotNull Language language)
      Provides the multi page parameters stored for the given language.
      Specified by:
      getMultiPageParams in interface MultiPageParamsProvider
      Parameters:
      language - The language.
      Returns:
      The multi page parameters.
      Since:
      4.0