Difference between revisions of "SearchSocialGroups"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 19: | Line 19: | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
SearchContext searchContext = new SearchContext(); | SearchContext searchContext = new SearchContext(); | ||
searchContext.setFieldList("*"); | searchContext.setFieldList("*"); | ||
searchContext.setFilter(" | searchContext.setFilter("privateGroup equals '1'"); //criteria | ||
searchContext.setPage(0); | searchContext.setPage(0); | ||
searchContext.setPageSize(5000); | searchContext.setPageSize(5000); | ||
Line 27: | Line 28: | ||
searchContext.setSortOrder("DESC"); | searchContext.setSortOrder("DESC"); | ||
searchContext.setSortOrder2(""); | searchContext.setSortOrder2(""); | ||
List<SocialBean<SocialGroupBean>> results = searchSocialGroups(searchContext); | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 23:03, 13 December 2011
Search groups.
- Syntax
Result result = 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);