static A findConceptWhere(Class c, O... params) {
ret findConceptWhere(mainConcepts, c, params);
}
static A findConceptWhere(Concepts concepts, Class c, O... params) {
params = expandParams(c, params);
// indexed
if (concepts.fieldIndices != null)
for (int i = 0; i < l(params); i += 2) {
IFieldIndex index = concepts.getFieldIndex(c, (S) params[i]);
if (index != null) {
for (A x : index.getAll(params[i+1]))
if (checkConceptFields(x, params)) ret x;
ret;
}
}
// table scan
for (A x : concepts.list(c)) if (checkConceptFields(x, params)) ret x;
null;
}
static Concept findConceptWhere(Concepts concepts, S c, O... params) {
for (Concept x : concepts.list(c)) if (checkConceptFields(x, params)) ret x;
null;
}