public interface RealmSearchSession extends RealmQuerySession
This session provides methods for searching Realm
objects. The search query is constructed using the RealmQuery.
The realm record Type
also specifies the realm
query record for the realm query.
getRealmsByQuery()
is the basic search method and
returns a list of Realm
elements. A more advanced search
may be performed with getRealmsBySearch().
It accepts a
RealmSearch
in addition to the query for the purpose of
specifying additional options affecting the entire search, such as
ordering. getRealmsBySearch()
returns a
RealmSearchResults
that can be used to access the resulting
RealmList
or be used to perform a search within the result set
through RealmSearch.
Realms may have a query record indicated by their respective record
types. The query record is accessed via the RealmQuery.
The
returns in this session may not be cast directly to these interfaces.
Modifier and Type | Method and Description |
---|---|
RealmQuery |
getRealmQueryFromInspector(RealmQueryInspector realmQueryInspector)
Gets a realm query from an inspector.
|
RealmSearchResults |
getRealmsBySearch(RealmQuery realmQuery,
RealmSearch realmSearch)
Gets the search results matching the given search.
|
RealmSearch |
getRealmSearch()
Gets a realm search.
|
RealmSearchOrder |
getRealmSearchOrder()
Gets a realm search order.
|
canSearchRealms, getRealmQuery, getRealmsByQuery
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
RealmSearch getRealmSearch()
mandatory
- This method must be implemented. RealmSearchOrder getRealmSearchOrder()
RealmSearchOrder
is
supplied to a RealmSearch
to specify the ordering of
results.mandatory
- This method must be implemented. RealmSearchResults getRealmsBySearch(RealmQuery realmQuery, RealmSearch realmSearch) throws OperationFailedException, PermissionDeniedException
realmQuery
- the realm queryrealmSearch
- the realm searchNullArgumentException
- realmQuery
or
realmSearch
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- realmQuery
or
realmSearch
is not of this servicemandatory
- This method must be implemented. RealmQuery getRealmQueryFromInspector(RealmQueryInspector realmQueryInspector)
RealmSearchResults.
realmQueryInspector
- a realm query inspectorNullArgumentException
- realmQueryInspector
is null
UnsupportedException
- irealmQueryInspector
is not of this servicemandatory
- This method must be implemented.