Interface DemographicQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidOperableQuery, OsidQuery, OsidRuleQuery, Suppliable

public interface DemographicQuery extends OsidRuleQuery

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

  • Method Details

    • matchIncludedDemographicId

      void matchIncludedDemographicId(Id demographicId, boolean match)
      Matches demographics including the given demographic.
      Parameters:
      demographicId - the demographic Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - demographicId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedDemographicIdTerms

      void clearIncludedDemographicIdTerms()
      Clears the demographic Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsIncludedDemographicQuery

      boolean supportsIncludedDemographicQuery()
      Tests if a DemographicQuery is available.
      Returns:
      true if a demographic query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getIncludedDemographicQuery

      DemographicQuery getIncludedDemographicQuery()
      Gets the query for a demographic. Multiple retrievals produce a nested OR term.
      Returns:
      the demographic query
      Throws:
      UnimplementedException - supportsIncludedDemographicQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdIncludedDemographicQuery()} is {@code true} .
    • matchAnyIncludedDemographic

      void matchAnyIncludedDemographic(boolean match)
      Matches demographics including any demographic.
      Parameters:
      match - true for demographics that include any demographic, false to match demographics including no demographics
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedDemographicTerms

      void clearIncludedDemographicTerms()
      Clears the demographic query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchIncludedIntersectingDemographicId

      void matchIncludedIntersectingDemographicId(Id demographicId, boolean match)
      Matches demographics including the given intersecting demographic.
      Parameters:
      demographicId - the demographic Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - demographicId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedIntersectingDemographicIdTerms

      void clearIncludedIntersectingDemographicIdTerms()
      Clears the intersecting demographic Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsIncludedIntersectingDemographicQuery

      boolean supportsIncludedIntersectingDemographicQuery()
      Tests if a DemographicQuery is available.
      Returns:
      true if a demographic query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getIncludedIntersectingDemographicQuery

      DemographicQuery getIncludedIntersectingDemographicQuery()
      Gets the query for an intersecting demographic. Multiple retrievals produce a nested OR term.
      Returns:
      the demographic query
      Throws:
      UnimplementedException - supportsIncludedDemographicQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdIncludedDemographicQuery()} is {@code true} .
    • matchAnyIncludedIntersectingDemographic

      void matchAnyIncludedIntersectingDemographic(boolean match)
      Matches demographics including any intersecting demographic.
      Parameters:
      match - true for demographics that include any intersecting demographic, false to match demographics including no intersecting demographics
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedIntersectingDemographicTerms

      void clearIncludedIntersectingDemographicTerms()
      Clears the intersecting demographic query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchIncludedExclusiveDemographicId

      void matchIncludedExclusiveDemographicId(Id demographicId, boolean match)
      Matches demographics including the given exclusive demographic.
      Parameters:
      demographicId - the demographic Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - demographicId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedExclusiveDemographicIdTerms

      void clearIncludedExclusiveDemographicIdTerms()
      Clears the exclusive demographic Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsIncludedExclusiveDemographicQuery

      boolean supportsIncludedExclusiveDemographicQuery()
      Tests if a DemographicQuery is available.
      Returns:
      true if a demographic query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getIncludedExclusiveDemographicQuery

      DemographicQuery getIncludedExclusiveDemographicQuery()
      Gets the query for an exclusive demographic. Multiple retrievals produce a nested OR term.
      Returns:
      the demographic query
      Throws:
      UnimplementedException - supportsIncludedDemographicQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdIncludedDemographicQuery()} is {@code true} .
    • matchAnyIncludedExclusiveDemographic

      void matchAnyIncludedExclusiveDemographic(boolean match)
      Matches demographics including any exclusive demographic.
      Parameters:
      match - true for demographics that include any exclusive demographic, false to match demographics including no exclusive demographics
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedExclusiveDemographicTerms

      void clearIncludedExclusiveDemographicTerms()
      Clears the demographic query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchExcludedDemographicId

      void matchExcludedDemographicId(Id demographicId, boolean match)
      Matches demographics excluding the given a demographic.
      Parameters:
      demographicId - the demographic Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - demographicId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearExcludedDemographicIdTerms

      void clearExcludedDemographicIdTerms()
      Clears the excluded demographic Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsExcludedDemographicQuery

      boolean supportsExcludedDemographicQuery()
      Tests if a DemographicQuery is available to match demographics with an excluded demographic.
      Returns:
      true if a demographic query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getExcludedDemographicQuery

      DemographicQuery getExcludedDemographicQuery()
      Gets the query for an excluded demographic. Multiple retrievals produce a nested OR term.
      Returns:
      the demographic query
      Throws:
      UnimplementedException - supportsExcludedDemographicQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdExcludedDemographicQuery()} is {@code true} .
    • matchAnyExcludedDemographic

      void matchAnyExcludedDemographic(boolean match)
      Matches demographics excluding any demographic.
      Parameters:
      match - true for demographics with any excluded demographic, false to match demographics with no excluded demographics
      Compliance:
      mandatory - This method must be implemented.
    • clearExcludedDemographicTerms

      void clearExcludedDemographicTerms()
      Clears the excluded demographic query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchIncludedResourceId

      void matchIncludedResourceId(Id resourceId, boolean match)
      Matches demographics including the given resource.
      Parameters:
      resourceId - the resource Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedResourceIdTerms

      void clearIncludedResourceIdTerms()
      Clears the included resource Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsIncludedResourceQuery

      boolean supportsIncludedResourceQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getIncludedResourceQuery

      ResourceQuery getIncludedResourceQuery()
      Gets the query for a resource. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsIncludedResourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdIncludedResourceQuery()} is {@code true} .
    • matchAnyIncludedResource

      void matchAnyIncludedResource(boolean match)
      Matches demographics including any resource.
      Parameters:
      match - true for demographics that include any resource, false to match demographics including no resources
      Compliance:
      mandatory - This method must be implemented.
    • clearIncludedResourceTerms

      void clearIncludedResourceTerms()
      Clears the included resource query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchExcludedResourceId

      void matchExcludedResourceId(Id resourceId, boolean match)
      Matches demographics excluding the given resource.
      Parameters:
      resourceId - the resource Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearExcludedResourceIdTerms

      void clearExcludedResourceIdTerms()
      Clears the excluded resource Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsExcludedResourceQuery

      boolean supportsExcludedResourceQuery()
      Tests if a ResourceQuery is available to match demographics with an excluded resource.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getExcludedResourceQuery

      ResourceQuery getExcludedResourceQuery()
      Gets the query for an excluded resource. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsExcludedResourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdExcludedResourceQuery()} is {@code true} .
    • matchAnyExcludedResource

      void matchAnyExcludedResource(boolean match)
      Matches demographics excluding any resource.
      Parameters:
      match - true for demographics that exclude any resource, false to match demographics excluding no resources
      Compliance:
      mandatory - This method must be implemented.
    • clearExcludedResourceTerms

      void clearExcludedResourceTerms()
      Clears the excluded resource query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchResultingResourceId

      void matchResultingResourceId(Id resourceId, boolean match)
      Matches demographics resulting in the given resource.
      Parameters:
      resourceId - the resource Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearResultingResourceIdTerms

      void clearResultingResourceIdTerms()
      Clears the resulting resource Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResultingResourceQuery

      boolean supportsResultingResourceQuery()
      Tests if a ResourceQuery is available to match demographics resulting in a resource.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResultingResourceQuery

      ResourceQuery getResultingResourceQuery()
      Gets the query for a resulting resource. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsResultingResourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsdResultingResourceQuery()} is {@code true} .
    • matchAnyResultingResource

      void matchAnyResultingResource(boolean match)
      Matches demographics that have any resulting resource.
      Parameters:
      match - true for demographics that have any resulting resource, false to match demographics with no resulting resources
      Compliance:
      mandatory - This method must be implemented.
    • clearResultingResourceTerms

      void clearResultingResourceTerms()
      Clears the resource query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBinId

      void matchBinId(Id binId, boolean match)
      Matches mapped to the bin.
      Parameters:
      binId - the bin Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - binId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearBinIdTerms

      void clearBinIdTerms()
      Clears the bin Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBinQuery

      boolean supportsBinQuery()
      Tests if a BinQuery is available.
      Returns:
      true if a bin query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBinQuery

      BinQuery getBinQuery()
      Gets the query for a bin. Multiple retrievals produce a nested OR term.
      Returns:
      the bin query
      Throws:
      UnimplementedException - supportsBinQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBinQuery()} is {@code true} .
    • clearBinTerms

      void clearBinTerms()
      Clears the bin query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getDemographicQueryRecord

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