predicate = and(predicate, path.eq(filter));
} else if (filter instanceof Number) {
NumberPath path = createNumberPath(entityPath, key, filter);
predicate = and(predicate, path.eq(filter));
} else if (filter instanceof Boolean) {
BooleanPath path = entityPath.getBoolean(key);
predicate = and(predicate, path.eq((Boolean) filter));
} else if (filter instanceof Enum) {
EnumPath path = entityPath.getEnum(key, Enum.class);
predicate = and(predicate, path.eq(filter));
} else if (BaseEntity.class.isAssignableFrom(filter.getClass())) {
PathBuilder path = entityPath.get(key);
predicate = and(predicate, path.eq(filter));
}
}
}
}