VaultService._trackBy - corda

corda / net.corda.core.node.services / VaultService / _trackBy

# _trackBy

`abstract fun <T : ContractState> _trackBy(criteria: QueryCriteria, paging: PageSpecification, sorting: Sort, contractStateType: Class<out T>): DataFeed<Page<T>, Update<T>>`

Generic vault query function which takes a QueryCriteria object to define filters, optional PageSpecification and optional Sort modification criteria (default unsorted), and returns a DataFeed object containing:

1. a snapshot as a Vault.Page (described previously in queryBy).
2. an Observable of Vault.Update.

### Exceptions

`VaultQueryException` -

if the query cannot be executed for any reason.

Notes: - The snapshot part of the query adheres to the same behaviour as the queryBy function. - The update part of the query currently only supports query criteria filtering by contract type(s) and state status(es). CID-731 <> proposes adding the complete set of QueryCriteria filtering.