I'm trying to search value inside Corda unconsumed states on a collection Field.
Following is the string field I am using -
Field uniqueAttributeName = MySchema.PersistentIOU.class.getDeclaredField("fieldname");
CriteriaExpression uniqueAttributeEXpression = Builder.equal(uniqueAttributeName, "valueToSearch");
QueryCriteria customCriteria = new QueryCriteria.VaultCustomQueryCriteria(uniqueAttributeEXpression);
result = rpcOps.vaultQueryByCriteria(customCriteria, MyState.class).getStates();
The above code worked fine when fieldname is String but I have another field which is List and I'm not sure how to search inside List for a specific value. Please help.