Record Class ExchangeListQuery
java.lang.Object
java.lang.Record
co.ankatech.ankasecure.keymanagement.query.ExchangeListQuery
- Record Components:
status-DRAFT,READY,ACTIVE,SUSPENDED,EXPIRED,REVOKEDorCONSUMED;nullfor every statuscounterparty- the counterparty name;nullfor every counterpartyapplicationId- the application the exchange belongs to;nullfor every applicationownerPrincipalId- the exchange owner;nullfor every ownernameSearch- a fragment of the exchange name;nullfor every namepage- the zero-based page number;nullfor the server default (0)size- the page size;nullfor the server default (20)sortBy- the property to sort by;nullfor the server default (modifiedAt)sortDirection-ASCorDESC;nullfor the server default (DESC)
public record ExchangeListQuery(String status, String counterparty, UUID applicationId, UUID ownerPrincipalId, String nameSearch, Integer page, Integer size, String sortBy, String sortDirection)
extends Record
The filters and page of an exchange listing (
exchanges().list).
Its components are exactly the query parameters of the listExchanges operation; a null
component sends nothing, so the server applies its default.
ExchangeListQuery.firstPage().withStatus("ACTIVE").withNameSearch("payroll")
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationIdrecord component.Returns the value of thecounterpartyrecord component.final booleanIndicates whether some other object is "equal to" this one.static ExchangeListQueryfinal inthashCode()Returns a hash code value for this object.Returns the value of thenameSearchrecord component.Returns the value of theownerPrincipalIdrecord component.page()Returns the value of thepagerecord component.size()Returns the value of thesizerecord component.sortBy()Returns the value of thesortByrecord component.Returns the value of thesortDirectionrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.withApplicationId(UUID value) withCounterparty(String value) withNameSearch(String value) withOwnerPrincipalId(UUID value) withSortBy(String value) withSortDirection(String value) withStatus(String value)
-
Constructor Details
-
ExchangeListQuery
public ExchangeListQuery(String status, String counterparty, UUID applicationId, UUID ownerPrincipalId, String nameSearch, Integer page, Integer size, String sortBy, String sortDirection) Creates an instance of aExchangeListQueryrecord class.- Parameters:
status- the value for thestatusrecord componentcounterparty- the value for thecounterpartyrecord componentapplicationId- the value for theapplicationIdrecord componentownerPrincipalId- the value for theownerPrincipalIdrecord componentnameSearch- the value for thenameSearchrecord componentpage- the value for thepagerecord componentsize- the value for thesizerecord componentsortBy- the value for thesortByrecord componentsortDirection- the value for thesortDirectionrecord component
-
-
Method Details
-
firstPage
- Returns:
- the first page with the server's defaults and no filter
-
withStatus
- Parameters:
value- the newstatus;nullclears it- Returns:
- a copy of this query with
statusreplaced
-
withCounterparty
- Parameters:
value- the newcounterparty;nullclears it- Returns:
- a copy of this query with
counterpartyreplaced
-
withApplicationId
- Parameters:
value- the newapplicationId;nullclears it- Returns:
- a copy of this query with
applicationIdreplaced
-
withOwnerPrincipalId
- Parameters:
value- the newownerPrincipalId;nullclears it- Returns:
- a copy of this query with
ownerPrincipalIdreplaced
-
withNameSearch
- Parameters:
value- the newnameSearch;nullclears it- Returns:
- a copy of this query with
nameSearchreplaced
-
withPage
- Parameters:
value- the newpage;nullclears it- Returns:
- a copy of this query with
pagereplaced
-
withSize
- Parameters:
value- the newsize;nullclears it- Returns:
- a copy of this query with
sizereplaced
-
withSortBy
- Parameters:
value- the newsortBy;nullclears it- Returns:
- a copy of this query with
sortByreplaced
-
withSortDirection
- Parameters:
value- the newsortDirection;nullclears it- Returns:
- a copy of this query with
sortDirectionreplaced
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
counterparty
Returns the value of thecounterpartyrecord component.- Returns:
- the value of the
counterpartyrecord component
-
applicationId
Returns the value of theapplicationIdrecord component.- Returns:
- the value of the
applicationIdrecord component
-
ownerPrincipalId
Returns the value of theownerPrincipalIdrecord component.- Returns:
- the value of the
ownerPrincipalIdrecord component
-
nameSearch
Returns the value of thenameSearchrecord component.- Returns:
- the value of the
nameSearchrecord component
-
page
Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
sortBy
Returns the value of thesortByrecord component.- Returns:
- the value of the
sortByrecord component
-
sortDirection
Returns the value of thesortDirectionrecord component.- Returns:
- the value of the
sortDirectionrecord component
-