Class MCRObjectQuery

java.lang.Object
org.mycore.datamodel.objectinfo.MCRObjectQuery

public class MCRObjectQuery extends Object
Used to Query a collection of mycore objects.
  • Constructor Details

    • MCRObjectQuery

      public MCRObjectQuery()
  • Method Details

    • afterId

      public MCRObjectID afterId()
      Returns:
      the id after which the listing starts
    • afterId

      public MCRObjectQuery afterId(MCRObjectID lastId)
      modifies this query to only return object ids after lastId should not be used together with the sort(SortBy, SortOrder) method
      Parameters:
      lastId -
      Returns:
      this
    • offset

      public int offset()
      Returns:
      the amount of objects to skip from the start of the results
    • offset

      public MCRObjectQuery offset(int offset)
      modifies this query to skip the amount offset objects at the start of the results
      Parameters:
      offset - amount
      Returns:
      this
    • limit

      public int limit()
      Returns:
      the maximum amount of results
    • limit

      public MCRObjectQuery limit(int limit)
      modifies this query to limit the amount of results
      Parameters:
      limit - amount
      Returns:
      this
    • type

      public String type()
      Returns:
      the type restriction
    • type

      public MCRObjectQuery type(String type)
      modifies this query to restrict the type of the objects
      Parameters:
      type - restriction
      Returns:
      this
    • project

      public String project()
      Returns:
      the project restriction
    • project

      public MCRObjectQuery project(String project)
      modifies this query to restrict the project of the objects
      Parameters:
      project - restriction
      Returns:
      this
    • status

      public String status()
      Returns:
      the status restriction
    • status

      public MCRObjectQuery status(String status)
      modifies this query to restrict the status of the objects. e.G. state:submitted
      Parameters:
      status - restriction
      Returns:
      this
    • sort

      modifies this query to change the order of the resulting list
      Parameters:
      sortBy - the sort field
      sortOrder - the sort direction
      Returns:
      this
    • sortBy

      public MCRObjectQuery.SortBy sortBy()
      Returns:
      the order field of the resulting list
    • sortAsc

      public MCRObjectQuery.SortOrder sortAsc()
      Returns:
      the sort direction of the result list
    • modifiedBefore

      public Instant modifiedBefore()
      Returns:
      the upper bound limit of the modified date
    • modifiedBefore

      public MCRObjectQuery modifiedBefore(Instant modifiedBefore)
      modifies this query to limit the upper bound of the modified date
      Parameters:
      modifiedBefore - the upper bound limit
      Returns:
      the same query
    • modifiedAfter

      public Instant modifiedAfter()
      Returns:
      the lower bound limit of the modifed date
    • modifiedAfter

      public MCRObjectQuery modifiedAfter(Instant modifiedAfter)
      modifies this query to limit the lower bound of the modified date
      Parameters:
      modifiedAfter - the lower bound limit
      Returns:
      this
    • createdBefore

      public Instant createdBefore()
      Returns:
      the upper bound limit of the created date
    • createdBefore

      public MCRObjectQuery createdBefore(Instant createdBefore)
      modifies this query to limit the upper bound of the created date
      Parameters:
      createdBefore - the upper bound limit
      Returns:
      this
    • createdAfter

      public Instant createdAfter()
      Returns:
      the lower bound limit of the created date
    • createdAfter

      public MCRObjectQuery createdAfter(Instant createdAfter)
      modifies this query to limit the lower bound of the created date
      Parameters:
      createdAfter - the lower bound limit
      Returns:
      this
    • deletedBefore

      public Instant deletedBefore()
      Returns:
      the upper bound limit of the deleted date
    • deletedBefore

      public MCRObjectQuery deletedBefore(Instant deletedBefore)
      modifies this query to limit the upper bound of the deleted date
      Parameters:
      deletedBefore - the upper bound limit
      Returns:
      this
    • deletedAfter

      public Instant deletedAfter()
      Returns:
      the lower bound limit of the deleted date
    • deletedAfter

      public MCRObjectQuery deletedAfter(Instant deletedAfter)
      modifies this query to limit the lower bound of the deleted date
      Parameters:
      deletedAfter - the lower bound limit
      Returns:
      this
    • createdBy

      public String createdBy()
      Returns:
      the created by user restriction
    • createdBy

      public MCRObjectQuery createdBy(String createdBy)
      modifies this query to restrict the user which created the objects
      Parameters:
      createdBy - the user restriction
      Returns:
      this
    • modifiedBy

      public String modifiedBy()
      Returns:
      the modified by user restriction
    • modifiedBy

      public MCRObjectQuery modifiedBy(String modifiedBy)
      modifies this query to restrict the user which last modified the objects
      Parameters:
      modifiedBy - the user restriction
      Returns:
      this
    • deletedBy

      public String deletedBy()
      Returns:
      the deleted by user restriction
    • deletedBy

      public MCRObjectQuery deletedBy(String deletedBy)
      modifies this query to restrict the user which deleted the objects
      Parameters:
      deletedBy - the user restriction
      Returns:
      this
    • numberGreater

      public int numberGreater()
      Returns:
      the lower bound limit to the object id number
    • numberGreater

      public MCRObjectQuery numberGreater(int numberGreater)
      modifies this query to limit the lower bound of the object id number
      Parameters:
      numberGreater - the lower bound limit
      Returns:
      this
    • numberLess

      public int numberLess()
      Returns:
      the upper bound limit of the object id number
    • numberLess

      public MCRObjectQuery numberLess(int numberLess)
      modifies this query to limit the upper bound of the object id number
      Parameters:
      numberLess - the upper bound limit
      Returns:
      this
    • getIncludeCategories

      public List<String> getIncludeCategories()
      Returns:
      a modifiable list of classification category ids. A result object need to be linked to all the categories.
    • toString

      public String toString()
      Overrides:
      toString in class Object