public class LatestArticlesQuery extends Object
Constructor and Description |
---|
LatestArticlesQuery() |
LatestArticlesQuery(int pPublicationId)
Creates a new
LatestArticlesQuery for the given publication. |
LatestArticlesQuery(LatestArticlesQuery pQuery)
Creates a copy of the given
LatestArticlesQuery . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object pOther) |
boolean |
getDescending() |
Collection |
getExcludeArticleTypes()
Returns a
Collection of Integer s, representing the ids of
all excluded article types. |
String |
getExpression() |
String |
getField() |
Timestamp |
getFromDate()
Returns the
Timestamp from which time we want to search for
the latest articles. |
boolean |
getHomeSectionOnly()
Gets state if we want to search in only homesection or in all subsections
also.
|
Collection |
getIncludeArticleTypes()
Returns a
Collection of Integer s, representing the ids of
all included article types. |
boolean |
getIncludeSubSections()
Include articles from sub sections in list.
|
int |
getMax()
Returns the max number of articles we want.
|
boolean |
getOnlyLive()
Says if we will search for published articles or all articles.
|
String |
getOrderBy() |
int |
getPublicationId()
Returns the publication id we are searching in
|
int |
getPublicationID()
Deprecated.
Use
getPublicationId() instead |
int[] |
getSectionID()
Deprecated.
|
int[] |
getSectionIds()
Retuns all the section ids.
|
Timestamp |
getToDate()
Returns the
Timestamp to which time we want to search for the
latest articles. |
int |
hashCode() |
boolean |
isCoveredBySectionRule(Article pArticle) |
boolean |
isExactToDateSet()
Returns true if an exact todate is set.
|
void |
setDescending(boolean pDescending) |
void |
setExcludeArticleTypes(Collection pExclude)
Sets the article types we want to exlucde from the search.
|
void |
setExpression(String pExpresseion) |
void |
setField(String pField) |
void |
setFromDate(String pFromDateString)
Sets the time from which we want to search for articles.
|
void |
setFromDate(Timestamp pFromDate)
Deprecated.
use setFromDate(int pHours) instead
|
void |
setHomeSectionOnly(boolean pHomeSectionOnly)
Sets if we are going to list articles which has sectionID(s) as
homeSection.
|
void |
setIncludeArticleTypes(Collection pInclude)
Sets the article types we want to inlucde in the latest article search.
|
void |
setIncludeSubSections(boolean pIncludeSubSections)
Include articles from sub sections in list.
|
void |
setMax(int pMaxCount)
sets maximum number of articles we want.
|
void |
setOnlyLive(boolean pOnlyLive)
Deprecated.
no replacement
|
void |
setOrderBy(String pOrderBy)
Sets the order-by parameter.
|
void |
setPublicationId(int pPublicationId)
Sets the publication id of the publication we want to search in
|
void |
setPublicationID(int pPublicationId)
Deprecated.
Use
setPublicationId(int) instead |
void |
setSectionID(int[] pSectionIds)
Deprecated.
|
void |
setSectionIds(int[] sectionIds)
Sets the section ids we are searching in.
|
void |
setToDate(String pToDateString)
Sets the time to which we want to search for articles.
|
void |
setToDate(Timestamp pToDate)
Sets the time/date to which we want to search for articles.
|
String |
toString() |
public LatestArticlesQuery()
public LatestArticlesQuery(int pPublicationId)
LatestArticlesQuery
for the given publication. No
validation is done to check wether the publication id is valid or
existing.pPublicationId
- the id of the publication to querypublic LatestArticlesQuery(LatestArticlesQuery pQuery)
LatestArticlesQuery
. All fields are
copied defensively.pQuery
- the query to copyIllegalArgumentException
- if pQuery == null
.public void setPublicationID(int pPublicationId)
setPublicationId(int)
insteadpublic void setPublicationId(int pPublicationId)
pPublicationId
- the id of the publication we will search inpublic int getPublicationID()
getPublicationId()
insteadpublic int getPublicationId()
public void setSectionID(int[] pSectionIds)
setSectionIds(int[])
public void setSectionIds(int[] sectionIds)
sectionIds
- an int array of the section idspublic int[] getSectionID()
getSectionIds()
public int[] getSectionIds()
public Timestamp getFromDate()
Timestamp
from which time we want to search for
the latest articles.Timestamp
public void setFromDate(Timestamp pFromDate)
pFromDate
- the Timestamp we want to search frompublic void setFromDate(String pFromDateString)
pFromDateString
- how many hours we want to search frompublic boolean isExactToDateSet()
public Timestamp getToDate()
Timestamp
to which time we want to search for the
latest articles.Timestamp
public void setToDate(Timestamp pToDate)
pToDate
- the Timestamp we want to search frompublic void setToDate(String pToDateString)
pToDateString
- how many hours we want to search from or an exact datepublic int getMax()
public void setMax(int pMaxCount)
pMaxCount
- the maximum number of articlespublic void setHomeSectionOnly(boolean pHomeSectionOnly)
pHomeSectionOnly
- true
if we only want to search in
homesectionpublic boolean getHomeSectionOnly()
true
if we only want to search in homesection,
false
if we want to search in homesection and all
subsectionspublic void setExcludeArticleTypes(Collection pExclude)
String
or the type id as
an Integer
.pExclude
- a Collection
of all exluded articletypespublic void setIncludeArticleTypes(Collection pInclude)
String
or the
type id as an Integer
.pInclude
- a Collection
of all inluded article typespublic Collection getExcludeArticleTypes()
Collection
of Integer
s, representing the ids of
all excluded article types. The collection is read-only.Collection
of Integer
s, representing the ids of
all excluded article types.public Collection getIncludeArticleTypes()
Collection
of Integer
s, representing the ids of
all included article types. The collection is read-only.Collection
of Integer
s, representing the ids of
all included article types.public boolean getOnlyLive()
false
if we search for all articles, true
if we will search only for published articles.public void setOnlyLive(boolean pOnlyLive)
true
we will only search for published articles.pOnlyLive
- says if we will search for published articles or all
articlespublic boolean getIncludeSubSections()
public void setIncludeSubSections(boolean pIncludeSubSections)
pIncludeSubSections
- set to true to include articles from all
subsections in listpublic void setOrderBy(String pOrderBy)
"publishDate"
to order by the publish date
"lastChangedDate"
to order by the last changed date
"publishDate"
is the default.pOrderBy
- the order-by parameterpublic String getOrderBy()
public void setDescending(boolean pDescending)
public boolean getDescending()
public void setExpression(String pExpresseion)
public String getExpression()
public void setField(String pField)
public String getField()
public boolean isCoveredBySectionRule(Article pArticle)
© 1998- 2021 Escenic AS