Package com.tnsai.accountability
Record Class AuditQuery
java.lang.Object
java.lang.Record
com.tnsai.accountability.AuditQuery
- Record Components:
agentId- filter to records produced by this identity; empty = any agentliabilityAtLeast- records at thisLiabilityClassor higher are returned; empty = any classfrom- inclusive lower wall-clock bound; empty = no lower boundto- exclusive upper wall-clock bound; empty = no upper boundcorrelationId- exact-match correlation id; empty = anylimit- maximum records to return; non-positive = no cap
public record AuditQuery(Optional<String> agentId, Optional<LiabilityClass> liabilityAtLeast, Optional<Instant> from, Optional<Instant> to, Optional<String> correlationId, int limit)
extends Record
Selection criteria for
LiabilitySink.query(com.tnsai.accountability.AuditQuery) (TNS-298).
Optional fields narrow the result set; null fields don't filter.
Querying is intentionally simple — adapters target relational / append-only stores where the framework can't push complex predicates portably. Operators who need richer querying read records out of the sink and filter in their own pipeline.
- Since:
- 0.10.0 (TNS-298)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.static AuditQueryall()No filters, no cap — match everything.static AuditQuery.Builderbuilder()Returns the value of thecorrelationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theliabilityAtLeastrecord component.intlimit()Returns the value of thelimitrecord component.booleanto()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuditQuery
public AuditQuery(Optional<String> agentId, Optional<LiabilityClass> liabilityAtLeast, Optional<Instant> from, Optional<Instant> to, Optional<String> correlationId, int limit) Creates an instance of aAuditQueryrecord class.- Parameters:
agentId- the value for theagentIdrecord componentliabilityAtLeast- the value for theliabilityAtLeastrecord componentfrom- the value for thefromrecord componentto- the value for thetorecord componentcorrelationId- the value for thecorrelationIdrecord componentlimit- the value for thelimitrecord component
-
-
Method Details
-
all
No filters, no cap — match everything. -
builder
-
matches
- Returns:
truewhenrecmatches every populated filter field. In-memory sinks use this to filter their backing collection; durable sinks may translate fields to native predicates and ignore this method.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
liabilityAtLeast
Returns the value of theliabilityAtLeastrecord component.- Returns:
- the value of the
liabilityAtLeastrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
correlationId
Returns the value of thecorrelationIdrecord component.- Returns:
- the value of the
correlationIdrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-