use of com.querydsl.core.types.dsl.ComparableExpressionBase in project Settler by EmhyrVarEmreis.
the class AbstractService method getComparableExpressionBase.
protected ComparableExpressionBase<?> getComparableExpressionBase(String fieldName, QEntity qObject) throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
String[] t = fieldName.split("\\.");
Object o = qObject;
for (String fieldNameTmp : t) {
Field f = o.getClass().getField(fieldNameTmp);
f.setAccessible(true);
o = f.get(o);
}
if (o instanceof ComparableExpressionBase) {
return (ComparableExpressionBase<?>) o;
} else {
return null;
}
}
Aggregations