Interface RealmSearchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, RealmQuerySession

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.

  • Method Details

    • getRealmSearch

      RealmSearch getRealmSearch()
      Gets a realm search.
      Returns:
      the realm search
      Compliance:
      mandatory - This method must be implemented.
    • getRealmSearchOrder

      RealmSearchOrder getRealmSearchOrder()
      Gets a realm search order. The RealmSearchOrder is supplied to a RealmSearch to specify the ordering of results.
      Returns:
      the realm search order
      Compliance:
      mandatory - This method must be implemented.
    • getRealmsBySearch

      Gets the search results matching the given search.
      Parameters:
      realmQuery - the realm query
      realmSearch - the realm search
      Returns:
      the search results
      Throws:
      NullArgumentException - realmQuery or realmSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - realmQuery or realmSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getRealmQueryFromInspector

      RealmQuery getRealmQueryFromInspector(RealmQueryInspector realmQueryInspector)
      Gets a realm query from an inspector. The inspector is available from a RealmSearchResults .
      Parameters:
      realmQueryInspector - a realm query inspector
      Returns:
      the realm query
      Throws:
      NullArgumentException - realmQueryInspector is null
      UnsupportedException - irealmQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.