}
public Query<?> toQuery() {
State state = getState();
Query<?> query = Query.fromType(getQueryType());
Predicate predicate = query.getPredicate();
for (ObjectField field : getIndexedFields()) {
String name = field.getInternalName();
Object value = state.get(FIELD_PREFIX + name);