public interface NewsRepository
| Modifier and Type | Method and Description |
|---|---|
List<NewsEntry> |
getNewsEntries(boolean ascOrder)
Gets all the news entries.
|
List<NewsEntry> |
getNewsEntries(int startPos,
int endPos,
boolean ascOrder)
Gets news entries.
|
NewsEntriesAndTotalNbr |
getNewsEntriesAndTotalNbr(int startPos,
int endPos,
boolean ascOrder)
Gets news entries and the number total of entries in the data source.
|
int |
getNewsEntriesTotalNumber()
Gets news entries number.
|
NewsEntry |
getNewsEntry(long newsId)
Gets a specific news entry.
|
int getNewsEntriesTotalNumber()
List<NewsEntry> getNewsEntries(boolean ascOrder)
ascOrder - If true, returns the entries by their
publication date in ascending order. Otherwise, in descending
order.List<NewsEntry> getNewsEntries(int startPos, int endPos, boolean ascOrder)
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.NewsEntriesAndTotalNbr getNewsEntriesAndTotalNbr(int startPos, int endPos, boolean ascOrder)
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.NewsEntry getNewsEntry(long newsId)
null if not found.Copyright © 2019. All rights reserved.