boolean propertyFound = false;
try {
Object value = PropertyUtils.getProperty( object, property );
if( value != null ) {
if( matchValue != null ) {
propertyFound = matchValue.equals( value );
} else {
propertyFound = true;
}
}
} catch(Exception e) {
// If there was an exception, the predicate returns false
}
return propertyFound;