Interface PostQuery

All Superinterfaces:
Extensible, OsidAggregateableQuery, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface PostQuery extends OsidObjectQuery, OsidAggregateableQuery

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

  • Method Details

    • matchFiscalPeriodId

      void matchFiscalPeriodId(Id fiscalPeriodId, boolean match)
      Sets the fiscal period Id for this query.
      Parameters:
      fiscalPeriodId - a fiscal period Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - foscalPeriodId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearFiscalPeriodIdTerms

      void clearFiscalPeriodIdTerms()
      Clears the fiscal period Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsFiscalPeriodQuery

      boolean supportsFiscalPeriodQuery()
      Tests if a FiscalPeriod is available.
      Returns:
      true if a fiscal period query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFiscalPeriodQuery

      FiscalPeriodQuery getFiscalPeriodQuery()
      Gets the query for a fiscal period. Multiple retrievals produce a nested OR term.
      Returns:
      the fiscal period query
      Throws:
      UnimplementedException - supportsFiscalPeriodQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsFiscalPeriodQuery()} is {@code true} .
    • matchAnyFiscalPeriod

      void matchAnyFiscalPeriod(boolean match)
      Matches any fiscal period.
      Parameters:
      match - true to match posts with any fiscal period, false to match posts with no fiscal period
      Compliance:
      mandatory - This method must be implemented.
    • clearFiscalPeriodTerms

      void clearFiscalPeriodTerms()
      Clears the fiscal period terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPosted

      void matchPosted(boolean match)
      Matches posts that have been posted.
      Parameters:
      match - true to match posted posts false to match unposted posts
      Compliance:
      mandatory - This method must be implemented.
    • clearPostedTerms

      void clearPostedTerms()
      Clears the posted terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDate

      void matchDate(DateTime low, DateTime high, boolean match)
      Matches the date between the given range inclusive.
      Parameters:
      low - start of range
      high - end of range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      NullArgumentException - low or high is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyDate

      void matchAnyDate(boolean match)
      Matches items that have any date set.
      Parameters:
      match - true to match items with any date, false to match items with no date
      Compliance:
      mandatory - This method must be implemented.
    • clearDateTerms

      void clearDateTerms()
      Clears the date terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPostEntryId

      void matchPostEntryId(Id postEntryId, boolean match)
      Sets the post entry Id for this query to match posts that have a related post entries.
      Parameters:
      postEntryId - a post entry Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - postEntryId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPostEntryIdTerms

      void clearPostEntryIdTerms()
      Clears the post entry Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPostEntryQuery

      boolean supportsPostEntryQuery()
      Tests if a PostEntryQuery is available for the location.
      Returns:
      true if a post entry query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPostEntryQuery

      PostEntryQuery getPostEntryQuery()
      Gets the query for a post entries. Multiple retrievals produce a nested OR term.
      Returns:
      the post entry query
      Throws:
      UnimplementedException - supportsPostEntryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPostEntryQuery()} is {@code true} .
    • matchAnyPostEntry

      void matchAnyPostEntry(boolean match)
      Matches any posts with post entries.
      Parameters:
      match - true to match posts with any post entry, false to match posts with no entries
      Compliance:
      mandatory - This method must be implemented.
    • clearPostEntryTerms

      void clearPostEntryTerms()
      Clears the post entry terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCorrectedPostId

      void matchCorrectedPostId(Id postId, boolean match)
      Sets the post entry Id for this query to match posts that have a corrected post.
      Parameters:
      postId - a post Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - postId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCorrectedPostIdTerms

      void clearCorrectedPostIdTerms()
      Clears the corrected post Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCorrectedPostQuery

      boolean supportsCorrectedPostQuery()
      Tests if a PostQuery is available.
      Returns:
      true if a post query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCorrectedPostQuery

      PostQuery getCorrectedPostQuery()
      Gets the query for a corrected posts. Multiple retrievals produce a nested OR term.
      Returns:
      the post query
      Throws:
      UnimplementedException - supportsCorrectedPostQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCorrectedPostQuery()} is {@code true} .
    • matchAnyCorrectedPost

      void matchAnyCorrectedPost(boolean match)
      Matches any posts with corrected posts.
      Parameters:
      match - true to match posts with any corrected post, false to match posts with no corrected posts
      Compliance:
      mandatory - This method must be implemented.
    • clearCorrectedPostTerms

      void clearCorrectedPostTerms()
      Clears the corrected post terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBusinessId

      void matchBusinessId(Id businessId, boolean match)
      Sets the business Id for this query to match posts assigned to businesses.
      Parameters:
      businessId - the business Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - businessId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearBusinessIdTerms

      void clearBusinessIdTerms()
      Clears the business Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBusinessQuery

      boolean supportsBusinessQuery()
      Tests if a BusinessQuery is available.
      Returns:
      true if a business query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBusinessQuery

      BusinessQuery getBusinessQuery()
      Gets the query for a business. Multiple retrievals produce a nested OR term.
      Returns:
      the business query
      Throws:
      UnimplementedException - supportsBusinessQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBusinessQuery()} is {@code true} .
    • clearBusinessTerms

      void clearBusinessTerms()
      Clears the business terms.
      Compliance:
      mandatory - This method must be implemented.
    • getPostQueryRecord

      PostQueryRecord getPostQueryRecord(Type postRecordType) throws OperationFailedException
      Gets the post query record corresponding to the given Post record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      postRecordType - a post record type
      Returns:
      the post query record
      Throws:
      NullArgumentException - postRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(postRecordType) is false
      Compliance:
      mandatory - This method must be implemented.