Class AuditQuery

java.lang.Object
fr.becpg.repo.audit.model.AuditQuery

public class AuditQuery extends Object

AuditQuery class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • sortBy

      private String sortBy
    • filter

      private String filter
    • inMemoryFilters

      private List<String> inMemoryFilters
    • asc

      private boolean asc
    • dbAsc

      private boolean dbAsc
    • maxResults

      private int maxResults
    • fromId

      private Long fromId
    • toId

      private Long toId
    • fromTime

      private Date fromTime
    • toTime

      private Date toTime
    • startAfterId

      private Long startAfterId
  • Constructor Details

    • AuditQuery

      private AuditQuery()

      Constructor for AuditQuery.

  • Method Details

    • copy

      public AuditQuery copy()

      copy.

      A copy of this query, so that a caller can derive a query of its own without touching the one it was given.
      Returns:
      a AuditQuery object
    • createQuery

      public static AuditQuery createQuery()

      createQuery.

      Returns:
      a AuditQuery object
    • idRange

      public AuditQuery idRange(Long fromId, Long toId)

      idRange.

      Parameters:
      fromId - a Long object
      toId - a Long object
      Returns:
      a AuditQuery object
    • timeRange

      public AuditQuery timeRange(Date fromTime, Date toTime)

      timeRange.

      Parameters:
      fromTime - a Date object
      toTime - a Date object
      Returns:
      a AuditQuery object
    • startAfterId

      public AuditQuery startAfterId(Long startAfterId)

      startAfterId.

      Resume a keyset paged scan right after the given entry identifier, in the database order the query asks for.
      Parameters:
      startAfterId - a Long object
      Returns:
      a AuditQuery object
    • sortBy

      public AuditQuery sortBy(String sortBy)

      sortBy.

      Parameters:
      sortBy - a String object
      Returns:
      a AuditQuery object
    • filter

      public AuditQuery filter(String key, String value)

      filter.

      Parameters:
      key - a String object
      value - a String object
      Returns:
      a AuditQuery object
    • filter

      public AuditQuery filter(String filter)

      filter.

      Parameters:
      filter - a String object
      Returns:
      a AuditQuery object
    • filters

      public AuditQuery filters(List<String> filters)

      filters.

      The audit query of Alfresco matches a single key-value pair: the first filter is the one the database reads with, the next ones are applied in memory on the entries it returns. The audit service puts the most selective one first, following the filter hierarchy of the plugin. The given filters replace every filter of the query: an empty list leaves it unfiltered.
      Parameters:
      filters - the filters, each written "key=value", all of which an entry must match
      Returns:
      a AuditQuery object
    • dbAsc

      public AuditQuery dbAsc(boolean dbAsc)

      dbAsc.

      Parameters:
      dbAsc - a boolean
      Returns:
      a AuditQuery object
    • asc

      public AuditQuery asc(boolean asc)

      asc.

      Parameters:
      asc - a boolean
      Returns:
      a AuditQuery object
    • maxResults

      public AuditQuery maxResults(int maxResults)

      maxResults.

      Parameters:
      maxResults - a int
      Returns:
      a AuditQuery object
    • isDbAscending

      public boolean isDbAscending()

      isDbAscending.

      Returns:
      a boolean
    • getFromId

      public Long getFromId()

      Getter for the field fromId.

      Returns:
      a Long object
    • getToId

      public Long getToId()

      Getter for the field toId.

      Returns:
      a Long object
    • getStartAfterId

      public Long getStartAfterId()

      Getter for the field startAfterId.

      Returns:
      a Long object
    • getFromTime

      public Date getFromTime()

      Getter for the field fromTime.

      Returns:
      a Date object
    • getToTime

      public Date getToTime()

      Getter for the field toTime.

      Returns:
      a Date object
    • getMaxResults

      public int getMaxResults()

      Getter for the field maxResults.

      Returns:
      a int
    • getSortBy

      public String getSortBy()

      Getter for the field sortBy.

      Returns:
      a String object
    • getFilter

      public String getFilter()

      Getter for the field filter.

      Returns:
      a String object
    • getFilters

      public List<String> getFilters()

      getFilters.

      Every filter of the query, the one the database reads with first.
      Returns:
      a List object
    • getInMemoryFilters

      public List<String> getInMemoryFilters()

      Getter for the field inMemoryFilters.

      The filters the entries read from the database still have to match.
      Returns:
      a List object
    • isAscending

      public boolean isAscending()

      isAscending.

      Returns:
      a boolean