} else if (filter instanceof Date) {
DatePath path = entityPath.getDate(key, Date.class);
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);