Interface WorkQuery

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

public interface WorkQuery extends OsidObjectQuery, OsidSubjugateableQuery

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

  • Method Details

    • matchJobId

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

      void clearJobIdTerms()
      Clears the job Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsJobQuery

      boolean supportsJobQuery()
      Tests if a JobQuery is available.
      Returns:
      true if a job query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getJobQuery

      JobQuery getJobQuery()
      Gets the query for a job. Multiple retrievals produce a nested OR term.
      Returns:
      the job query
      Throws:
      UnimplementedException - supportsJobQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsJobQuery()} is {@code true} .
    • clearJobTerms

      void clearJobTerms()
      Clears the job query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompetencyId

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

      void clearCompetencyIdTerms()
      Clears the competency Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCompetencyQuery

      boolean supportsCompetencyQuery()
      Tests if a CompetencyQuery is available.
      Returns:
      true if a competency query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCompetencyQuery

      CompetencyQuery getCompetencyQuery()
      Gets the query for a competency. Multiple retrievals produce a nested OR term.
      Returns:
      the competency query
      Throws:
      UnimplementedException - supportscompetencyQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportscompetencyQuery()} is {@code true} .
    • matchAnyCompetency

      void matchAnyCompetency(boolean match)
      Matches work that have any competency.
      Parameters:
      match - true to match work with any competency, false to match work with no competency
      Compliance:
      mandatory - This method must be implemented.
    • clearCompetencyTerms

      void clearCompetencyTerms()
      Clears the competency query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCreatedDate

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

      void clearCreatedDateTerms()
      Clears the creation date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompletionDate

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

      void matchAnyCompletionDate(boolean match)
      Matches work that have any completion date.
      Parameters:
      match - true to match completed work, false to match incomplete work
      Compliance:
      mandatory - This method must be implemented.
    • clearCompletionDateTerms

      void clearCompletionDateTerms()
      Clears the completion date query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCommissionId

      void matchCommissionId(Id commissionId, boolean match)
      Sets the commission Id for this query to match commissions.
      Parameters:
      commissionId - the availability Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - commissionId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCommissionIdTerms

      void clearCommissionIdTerms()
      Clears the commission Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAvailabilityQuery

      boolean supportsAvailabilityQuery()
      Tests if a CommissionQuery is available.
      Returns:
      true if a commission query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCommissionQuery

      CommissionQuery getCommissionQuery()
      Gets the query for a commission. Multiple retrievals produce a nested OR term.
      Returns:
      the commission query
      Throws:
      UnimplementedException - supportsCommissionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCommissionQuery()} is {@code true} .
    • matchAnyCommission

      void matchAnyCommission(boolean match)
      Matches work that have any commission.
      Parameters:
      match - true to match work with any commission, false to match work with no availability
      Compliance:
      mandatory - This method must be implemented.
    • clearCommissionTerms

      void clearCommissionTerms()
      Clears the commission query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchFoundryId

      void matchFoundryId(Id foundryId, boolean match)
      Sets the foundry Id for this query to match works assigned to foundries.
      Parameters:
      foundryId - the foundry Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - foundryId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearFoundryIdTerms

      void clearFoundryIdTerms()
      Clears the foundry Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsFoundryQuery

      boolean supportsFoundryQuery()
      Tests if a FoundryQuery is available.
      Returns:
      true if a foundry query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFoundryQuery

      FoundryQuery getFoundryQuery()
      Gets the query for a foundry. Multiple retrievals produce a nested OR term.
      Returns:
      the foundry query
      Throws:
      UnimplementedException - supportsFoundryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsFoundryQuery()} is {@code true} .
    • clearFoundryTerms

      void clearFoundryTerms()
      Clears the foundry query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getWorkQueryRecord

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