Interface NewsRepository

All Known Implementing Classes:
TemplateFilesRepository

public interface NewsRepository
Repository for Spincast's news entry / blog entries.
  • Method Details

    • getNewsEntriesTotalNumber

      int getNewsEntriesTotalNumber()
      Gets news entries number.
    • getNewsEntries

      List<NewsEntry> getNewsEntries(boolean ascOrder)
      Gets all the news entries.
      Parameters:
      ascOrder - If true, returns the entries by their publication date in ascending order. Otherwise, in descending order.
    • getNewsEntries

      List<NewsEntry> getNewsEntries(int startPos, int endPos, boolean ascOrder)
      Gets news entries.
      Parameters:
      startPos - The position of the first entry to return. The first element is "1", not "0".
      endPos - The position of the last entry to return (inclusive).
      ascOrder - If true, returns the entries by their publication date in ascending order. Otherwise, in descending order.
    • getNewsEntriesAndTotalNbr

      NewsEntriesAndTotalNbr getNewsEntriesAndTotalNbr(int startPos, int endPos, boolean ascOrder)
      Gets news entries and the number total of entries in the data source.
      Parameters:
      startPos - The position of the first entry to return. The first element is "1", not "0".
      endPos - The position of the last entry to return (inclusive).
      ascOrder - If true, returns the entries by their publication date in ascending order. Otherwise, in descending order.
    • getNewsEntry

      NewsEntry getNewsEntry(long newsId)
      Gets a specific news entry.
      Returns:
      the news entry or null if not found.