|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.internet2.middleware.grouper.filter.GrouperQuery
public class GrouperQuery
Perform arbitrary queries against the Groups Registry.
| Method Summary | |
|---|---|
static GrouperQuery |
createQuery(GrouperSession s,
QueryFilter filter)
Create a query for searching the Groups Registry. |
java.util.Set<Group> |
getGroups()
Get groups matching query filter. |
java.util.Set |
getMembers()
Get members matching query filter. |
java.util.Set |
getMemberships()
Get memberships matching query filter. |
java.util.Set<Stem> |
getStems()
Get stems matching query filter. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static GrouperQuery createQuery(GrouperSession s,
QueryFilter filter)
throws QueryException
GrouperQuery gq = GrouperQuery.createQuery(
s,
new AndFilter(
new GroupCreatedAfterFilter(date, stem),
new GroupAttributeFilter(attr, value, stem)
)
);
This method defines a query but does not execute the query. Evaulation
takes place in the getGroups(), getMembers(),
getMemberships() and getStems() methods. Those methods
all operate in the same manner. They first execute the query filter. This
returns a set of candidate results. Each method then iterates through the
candidate set, extracting objects of the the appropriate time to return.
Several of the methods also convert between object types in order to return
results. See each method for more details.
All query filters implement the QueryFilter interface. See that
class for information on the query filters supplied by Grouper as well as
information on creating custom query filters.
s - Query within this session context.filter - A QueryFilter specification.
GrouperQuery object.
QueryException
public java.util.Set<Group> getGroups()
throws QueryException
Set groups = gq.getGroups();
This method (currently) performs no candidate object conversion. Only
Group objects in the candidate set will be returned.
Group objects.
QueryException
public java.util.Set getMembers()
throws QueryException
Set members = gq.getMembers();
This method calls getMemberships() internally. Each Membership's
Member is then extracted and returned.
Member objects.
QueryException
public java.util.Set getMemberships()
throws QueryException
Set memberships = gq.getMemberships();
If this method finds a Group in the candidate set it will add all
Memberships returned by calling Group.getMemberships() to
the result set.
Membership objects.
QueryException
public java.util.Set<Stem> getStems()
throws QueryException
Set stems = gq.getStems();
This method (currently) performs no candidate object conversion. Only
Stem objects in the candidate set will be returned.
Stem objects.
QueryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||