Interface RelationshipQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidRelationshipQuery, OsidTemporalQuery, Suppliable

public interface RelationshipQuery extends OsidRelationshipQuery

This is the query for searching relationships. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchSourceId

      void matchSourceId(Id peer, boolean match)
      Matches a relationship peer.
      Parameters:
      peer - peer Id to match
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - peer is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSourceIdTerms

      void clearSourceIdTerms()
      Clears the peer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDestinationId

      void matchDestinationId(Id peer, boolean match)
      Matches the other relationship peer.
      Parameters:
      peer - peer Id to match
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - peer is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDestinationIdTerms

      void clearDestinationIdTerms()
      Clears the other peer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSamePeerId

      void matchSamePeerId(boolean match)
      Matches circular relationships to the same peer.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearSamePeerIdTerms

      void clearSamePeerIdTerms()
      Clears the same peer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFamilyId

      void matchFamilyId(Id familyId, boolean match)
      Sets the family Id for this query.
      Parameters:
      familyId - a family Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - familyId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearFamilyIdTerms

      void clearFamilyIdTerms()
      Clears the family Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsFamilyQuery

      boolean supportsFamilyQuery()
      Tests if a FamilyQuery is available.
      Returns:
      true if a family query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFamilyQuery

      FamilyQuery getFamilyQuery()
      Gets the query for a family. Multiple retrievals produce a nested OR term.
      Returns:
      the family query
      Throws:
      UnimplementedException - supportsFamilyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsFamilyQuery()} is {@code true} .
    • clearFamilyTerms

      void clearFamilyTerms()
      Clears the family terms.
      Compliance:
      mandatory - This method must be implemented.
    • getRelationshipQueryRecord

      RelationshipQueryRecord getRelationshipQueryRecord(Type relationshipRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the relationship query record corresponding to the given Relationship record Type . Multiple record retrievals produce a nested OR term.
      Parameters:
      relationshipRecordType - a relationship record type
      Returns:
      the relationship query record
      Throws:
      NullArgumentException - relationshipRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(relationshipRecordType) is false
      Compliance:
      mandatory - This method must be implemented.