Difference between revisions of "SearchSocialGroups"
From LongJump Support Wiki
imported>Aeric (Created page with "{{subst: Java API}}") |
imported>Aeric |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE: | {{DISPLAYTITLE:searchSocialGroups}} | ||
Search groups. | |||
;Syntax: | ;Syntax: | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
List groups = Functions.searchSocialGroups(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 groups. | |||
:A | |||
;Throws: | ;Throws: | ||
:Exception | :Exception | ||
;Example: | ;Example: | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
... | SearchContext searchContext = new SearchContext(); | ||
searchContext.setFieldList("*"); | |||
searchContext.setFilter("privateGroup equals '1'"); //criteria | |||
searchContext.setPage(0); | |||
searchContext.setPageSize(5000); | |||
searchContext.setSortBy("date_created"); | |||
searchContext.setSortBy2(""); | |||
searchContext.setSortOrder("DESC"); | |||
searchContext.setSortOrder2(""); | |||
List<SocialBean<SocialGroupBean>> results = searchSocialGroups(searchContext); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 20:50, 14 May 2012
Search groups.
- Syntax
List groups = Functions.searchSocialGroups(SearchContext sc);
- Parameters
-
- sc
- A SearchContext object that defines the search.
- Returns
- A list of strings containing IDs of groups.
- Throws
- Exception
- Example
SearchContext searchContext = new SearchContext(); searchContext.setFieldList("*"); searchContext.setFilter("privateGroup equals '1'"); //criteria searchContext.setPage(0); searchContext.setPageSize(5000); searchContext.setSortBy("date_created"); searchContext.setSortBy2(""); searchContext.setSortOrder("DESC"); searchContext.setSortOrder2(""); List<SocialBean<SocialGroupBean>> results = searchSocialGroups(searchContext);