Package org.onyx.api
Class Action.ListBuilder
- Enclosing class:
Action
A builder class for querying actions in the ledger.
List all actions after a certain time:
Action.ItemIterable actions = new Action.ListBuilder()
.setFilter("timestamp > $1")
.addFilterParameter("1985-10-26T01:21:00Z")
.getIterable(ledger);
for (Action action : actions) {
System.out.println("timestamp: " + action.timestamp);
System.out.println("amount: " + action.amount);
}
-
Field Summary
Fields inherited from class org.onyx.api.BaseQueryBuilder
next -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIterable(Client client) Executes the query, returning an iterable over actions that match the query.Executes the query, returning a page of actions that match the query.Executes the query, returning a page of actions that match the query beginning with provided cursor.Methods inherited from class org.onyx.api.BaseQueryBuilder
addFilterParameter, setFilter, setFilterParameters, setPageSize
-
Constructor Details
-
ListBuilder
public ListBuilder()
-
-
Method Details
-
getPage
Executes the query, returning a page of actions that match the query.- Specified by:
getPagein classBaseQueryBuilder<Action.ListBuilder>- Parameters:
client- ledger API connection object- Returns:
- a page of actions
- Throws:
ChainException
-
getPage
Executes the query, returning a page of actions that match the query beginning with provided cursor.- Parameters:
client- ledger API connection objectcursor- string representing encoded query object- Returns:
- a page of actions
- Throws:
ChainException
-
getIterable
Executes the query, returning an iterable over actions that match the query.- Specified by:
getIterablein classBaseQueryBuilder<Action.ListBuilder>- Parameters:
client- ledger API connection object- Returns:
- an iterable over actions
- Throws:
ChainException
-