Class ContentMultiPageParams

java.lang.Object
de.espirit.firstspirit.access.store.MultiPageParams
de.espirit.firstspirit.access.store.sitestore.ContentMultiPageParams
All Implemented Interfaces:
Iterable<Entity>

public class ContentMultiPageParams extends MultiPageParams implements Iterable<Entity>
Definition of information for multi page output of data records.
Since:
4.0.17
  • Field Details

  • Constructor Details

    • ContentMultiPageParams

      public ContentMultiPageParams(@NotNull @NotNull Session session, @NotNull @NotNull Select select, int entitiesPerPage, int maxPageCount, @Nullable @Nullable Date time)
      Constructor based on some restrictions.
      Parameters:
      session - The session.
      select - The select statement.
      entitiesPerPage - Records put out per page.
      maxPageCount - The maximum number of pages to create.
      time - A time constraint for records to look up.
      Since:
      4.1.7
  • Method Details

    • adjustTime

      public static void adjustTime(Select select, Date time)
      Adjusts the time constraint.
      Parameters:
      time - The time constraint.
      Since:
      4.1.7
    • getType

      public String getType()
      Provides the type of parameters.
      Specified by:
      getType in class MultiPageParams
      Returns:
      The parameters' type.
      Since:
      4.0.19
    • getEntitiesPerPage

      public int getEntitiesPerPage()
      Provides the number of records to put out per page.
      Returns:
      The number of records to put out.
      Since:
      4.0.17
    • getData

      @NotNull public @NotNull EntityList getData()
      Provides the records for output.
      Returns:
      A list of records.
      Since:
      4.0.19
    • getPageCount

      public int getPageCount()
      Provides the number of pages that will be generated.
      Specified by:
      getPageCount in class MultiPageParams
      Returns:
      The page count.
      Since:
      4.0.17
    • getPageParams

      public ContentMultiPageParams.ContentPageParams getPageParams(int index)
      Provides the parameters stored for the given index.
      Specified by:
      getPageParams in class MultiPageParams
      Parameters:
      index - The index.
      Returns:
      The matching parameters.
      Since:
      4.0.20
    • getPageParams

      @NotNull public @NotNull PageParams getPageParams(Map<String,?> params)
      Provides the parameters based on the given options.
      Overrides:
      getPageParams in class MultiPageParams
      Parameters:
      params - A map of options.
      Returns:
      the PageParams object for the given params
      Since:
      4.1.12
      See Also:
    • renders

      public boolean renders(Map<String,?> params)
      Renders a record identified by the given options.
      Parameters:
      params - A map of options.
      Since:
      4.1.12
      See Also:
    • rendersEntityId

      public boolean rendersEntityId(long entityId)
      Will the entity with specified id be rendered by the multi page?
      Since:
      5.0.100
    • iterator

      public Iterator<Entity> iterator()
      Enables to iterate over the records retrieved via these parameters.
      Specified by:
      iterator in interface Iterable<Entity>
      Returns:
      An iterator on records.
      Since:
      4.0.17
    • get

      public Entity get(int index)
      Provides the record stored at the given index.
      Parameters:
      index - The index.
      Returns:
      A record or null.
      Since:
      4.0.17