Package net.corda.v5.ledger.utxo.query
Interface VaultNamedQueryStateAndRefTransformer
-
- All Implemented Interfaces:
-
net.corda.v5.ledger.utxo.query.VaultNamedQueryTransformer
public interface VaultNamedQueryStateAndRefTransformer<T extends ContractState, R> implements VaultNamedQueryTransformer<T, R>
Representation of a transformer function that will be applied to the result set returned by the named query. It is assumed that the result set will contain objects.
Example usage:
- Kotlin:
class MyVaultNamedQueryTransformer : VaultNamedQueryStateAndRefTransformer<ContractState, MyPojo> { override fun transform(data: StateAndRef<ContractState>, parameters: Map<String, Any>): MyPojo { return MyPojo(1) } }
- Java:
public class MyVaultNamedQueryTransformer implements VaultNamedQueryStateAndRefTransformer<ContractState, MyPojo> { public MyPojo transform(StateAndRef<ContractState> state, Map<String, Object> parameters) { return new MyPojo(1); } }