Fluent builder for a filtered, paginated search over AuditItem records belonging to one tenant organisation. Obtained from AuditManager.newAuditItemSearchBuilder(), which binds the builder to the current tenant organisation. Chain the filter methods to narrow the search, then call search() to run the query and get back the matching records together with the total match count.

Group: Builders


Methods

entityIds(List<Long> v) · entityClasses(List<String> v) · opSource(String v) · opId(String v) · changeType(ChangeType v) · changeType(String v) · actionUser(Profile v) · actionUser(String emailOrName) · fromDate(Date v) · toDate(Date v) · searchProperties(SearchProperties v) · search()

entityIds(List<Long> v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items recorded against one of the given entity ids.

ParameterDescription
vthe entity ids to match, or null/empty to apply no restriction

entityClasses(List<String> v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items whose audited entity is one of the given classes.

ParameterDescription
vthe fully qualified class names of the entity types to match, or null/empty to apply no restriction

opSource(String v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items recorded with the given operation source, which identifies where the change originated (for example an app or subsystem name).

ParameterDescription
vthe operation source to match, or null/blank to apply no restriction

opId(String v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items sharing the given operation id, which correlates multiple audit items produced by the same logical operation.

ParameterDescription
vthe operation id to match, or null/blank to apply no restriction

changeType(ChangeType v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items of the given change type.

ParameterDescription
vthe change type to match (create, update or delete), or null to apply no restriction

changeType(String v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items of the given change type, named as a string. Scripts cannot reach the ChangeType enum - the sandbox blocks Java class access - so this is how a JS caller filters by type at all. Matched case-insensitively, and an unrecognised name is rejected rather than quietly applying no restriction, which would return every change instead of the one kind that was asked for.

ParameterDescription
vthe change type name: create, update or delete. Null or blank applies no restriction

actionUser(Profile v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items whose action was performed by the given profile.

ParameterDescription
vthe acting profile to match, or null to apply no restriction

actionUser(String emailOrName)

Returns: AuditItemSearchBuilder

Resolves a profile by username or email, recursively across the organisation tree, and restricts the search to audit items whose action was performed by that profile.

ParameterDescription
emailOrNamethe username or email address to look up

fromDate(Date v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items with an action date on or after the given date.

ParameterDescription
vthe inclusive lower bound on the action date, or null to apply no restriction

toDate(Date v)

Returns: AuditItemSearchBuilder

Restricts the search to audit items with an action date on or before the given date.

ParameterDescription
vthe inclusive upper bound on the action date, or null to apply no restriction

searchProperties(SearchProperties v)

Returns: AuditItemSearchBuilder

Supplies the paging and ordering to use when search() is run. When omitted, search() returns every matching record ordered by action date descending.

ParameterDescription
vthe paging and ordering properties to apply

Returns: ListAndCount<AuditItem>

Runs the search against the database using the filters and paging previously set on this builder, ordering by action date descending unless searchProperties supplies its own order. Issues one query to count all matching records and a second to fetch the current page.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.