Interface NewsRepository
- All Known Implementing Classes:
TemplateFilesRepository
public interface NewsRepository
Repository for Spincast's news entry / blog entries.
-
Method Summary
Modifier and TypeMethodDescriptiongetNewsEntries
(boolean ascOrder) Gets all the news entries.getNewsEntries
(int startPos, int endPos, boolean ascOrder) Gets news entries.getNewsEntriesAndTotalNbr
(int startPos, int endPos, boolean ascOrder) Gets news entries and the number total of entries in the data source.int
Gets news entries number.getNewsEntry
(long newsId) Gets a specific news entry.
-
Method Details
-
getNewsEntriesTotalNumber
int getNewsEntriesTotalNumber()Gets news entries number. -
getNewsEntries
Gets all the news entries.- Parameters:
ascOrder
- Iftrue
, returns the entries by their publication date in ascending order. Otherwise, in descending order.
-
getNewsEntries
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
- Iftrue
, returns the entries by their publication date in ascending order. Otherwise, in descending order.
-
getNewsEntriesAndTotalNbr
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
- Iftrue
, returns the entries by their publication date in ascending order. Otherwise, in descending order.
-
getNewsEntry
Gets a specific news entry.- Returns:
- the news entry or
null
if not found.
-