com.atlassian.crowd.search.query.entity
Class EntityQuery<T>

java.lang.Object
  extended by com.atlassian.crowd.search.query.entity.EntityQuery<T>
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.Query<T>
Direct Known Subclasses:
AliasQuery, ApplicationQuery, DirectoryQuery, GroupQuery, TokenQuery, UserQuery

public abstract class EntityQuery<T>
extends Object
implements com.atlassian.crowd.embedded.api.Query<T>


Field Summary
static int ALL_RESULTS
          Flag to indicate that an EntityQuery should retrieve all results.
static int MAX_MAX_RESULTS
          This is the recommended maximum number of 'max' results the system will allow you to return.
 
Constructor Summary
EntityQuery(Class<T> returnType, EntityDescriptor entityDescriptor, com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction, int startIndex, int maxResults)
           
EntityQuery(EntityQuery<T> query, int startIndex, int maxResults)
           
EntityQuery(EntityQuery query, Class<T> returnType)
           
 
Method Summary
 boolean equals(Object o)
           
 EntityDescriptor getEntityDescriptor()
           
 int getMaxResults()
           
 Class<T> getReturnType()
           
 com.atlassian.crowd.embedded.api.SearchRestriction getSearchRestriction()
           
 int getStartIndex()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_MAX_RESULTS

public static final int MAX_MAX_RESULTS
This is the recommended maximum number of 'max' results the system will allow you to return. This value is NOT enforced. ApplicationServiceGeneric often retrieves (startIndex + maxResults) number of results which breaks this MAX_MAX_RESULTS.

See Also:
Constant Field Values

ALL_RESULTS

public static final int ALL_RESULTS
Flag to indicate that an EntityQuery should retrieve all results.

WARNING: using this flag could retrieve thousands or millions of entities. Misuse can cause massive performance problems. This flag should only ever be used in exceptional circumstances.

If you need to find "all" entities, then consider making multiple successive calls to Crowd to receive partial results. That way, the entire result set is never stored in memory on the Crowd server at any one time.

See Also:
Constant Field Values
Constructor Detail

EntityQuery

public EntityQuery(Class<T> returnType,
                   EntityDescriptor entityDescriptor,
                   com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction,
                   int startIndex,
                   int maxResults)

EntityQuery

public EntityQuery(EntityQuery query,
                   Class<T> returnType)

EntityQuery

public EntityQuery(EntityQuery<T> query,
                   int startIndex,
                   int maxResults)
Method Detail

getEntityDescriptor

public EntityDescriptor getEntityDescriptor()

getSearchRestriction

public com.atlassian.crowd.embedded.api.SearchRestriction getSearchRestriction()
Specified by:
getSearchRestriction in interface com.atlassian.crowd.embedded.api.Query<T>

getStartIndex

public int getStartIndex()
Specified by:
getStartIndex in interface com.atlassian.crowd.embedded.api.Query<T>

getMaxResults

public int getMaxResults()
Specified by:
getMaxResults in interface com.atlassian.crowd.embedded.api.Query<T>

getReturnType

public Class<T> getReturnType()
Specified by:
getReturnType in interface com.atlassian.crowd.embedded.api.Query<T>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Atlassian. All Rights Reserved.