org.joo.libra.sql.ObjectUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joo-libra Show documentation
Show all versions of joo-libra Show documentation
Java Predicate with SQL-like syntax support
package org.joo.libra.sql;
import org.apache.commons.beanutils.PropertyUtils;
import lombok.NonNull;
public class ObjectUtils {
private ObjectUtils() {
}
public static Object getValue(final Object obj, final @NonNull String variableName)
throws ReflectiveOperationException {
if (obj == null)
return null;
return PropertyUtils.getNestedProperty(obj, variableName);
}
}