Difference between revisions of "SearchSocialFeeds"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
;Syntax: | ;Syntax: | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
List feeds = Functions.searchSocialFeeds(SearchContext sc); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
;Parameters: | ;Parameters: | ||
:; | :;sc:A [[Java_API:Support_Classes_and_Objects#SearchContext_Class|SearchContext]] object that defines the search. | ||
: | |||
;Returns: | ;Returns: | ||
:A list of strings containing IDs of posted messages. | |||
:A | |||
;Throws: | ;Throws: | ||
:Exception | :Exception | ||
;Example: | |||
:<syntaxhiglight lang="java" enclose="div"> | |||
SearchContext searchContext = new SearchContext(); | |||
searchContext.setFieldList("feedMessage,feedToType"); | |||
searchContext.setFilter("feedToType equals 'record'"); //criteria | |||
searchContext.setPage(0); | |||
searchContext.setPageSize(5000); | |||
searchContext.setSortBy("date_created"); | |||
searchContext.setSortBy2(""); | |||
searchContext.setSortOrder("DESC"); | |||
searchContext.setSortOrder2(""); | |||
List<SocialBean<SocialFeedBean>> results = searchSocialFeeds(searchContext ); | |||
for (SocialBean<SocialFeedBean> sb: results) | |||
{ | |||
SocialFeedBean sfb = sb.getObject(); | |||
Functions.debug(sfb.getFeedMessage()); | |||
} | |||
</syntaxhighlight> |
Latest revision as of 23:02, 13 December 2011
Search postings.
- Syntax
List feeds = Functions.searchSocialFeeds(SearchContext sc);
- Parameters
-
- sc
- A SearchContext object that defines the search.
- Returns
- A list of strings containing IDs of posted messages.
- Throws
- Exception
- Example
- <syntaxhiglight lang="java" enclose="div">
SearchContext searchContext = new SearchContext();
searchContext.setFieldList("feedMessage,feedToType"); searchContext.setFilter("feedToType equals 'record'"); //criteria searchContext.setPage(0); searchContext.setPageSize(5000); searchContext.setSortBy("date_created"); searchContext.setSortBy2(""); searchContext.setSortOrder("DESC"); searchContext.setSortOrder2("");
List<SocialBean<SocialFeedBean>> results = searchSocialFeeds(searchContext ); for (SocialBean<SocialFeedBean> sb: results) {
SocialFeedBean sfb = sb.getObject(); Functions.debug(sfb.getFeedMessage());
} </syntaxhighlight>