EntityCondition havingEntityCondition = getHavingEntityCondition(context, modelEntity, delegator.getModelFieldTypeReader(modelEntity));
if (useCache) {
// if useCache == true && outputHandler instanceof UseIterator, throw exception; not a valid combination
if (outputHandler instanceof UseIterator) {
Debug.logWarning("In find entity by " + label + " cannot have use-cache set to true " + label + " select use-iterator for the output type. Using cache and ignoring use-iterator setting.", module);
outputHandler = new GetAll();
}
if (distinct) {
throw new IllegalArgumentException("In find entity by " + label + " cannot have use-cache set to true " + label + " set distinct to true.");
}
if (havingEntityCondition != null) {