@SuppressWarnings({"rawtypes","unchecked"}) private List filterResourcesForLookup(Iterable resources,ResourceField field){
  List results=new ArrayList();
  Iterator iterator=resources.iterator();
  while (iterator.hasNext()) {
    Object resource=iterator.next();
    Object property=PropertyUtils.getProperty(resource,field.getUnderlyingName());
    LookupIncludeBehavior lookupIncludeBehavior=field.getLookupIncludeAutomatically();
    if (lookupIncludeBehavior == LookupIncludeBehavior.AUTOMATICALLY_ALWAYS || (property == null && lookupIncludeBehavior == LookupIncludeBehavior.AUTOMATICALLY_WHEN_NULL)) {
      results.add(resource);
    }
  }
  return results;
}

@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private List filterResourcesForLookup ( Iterable resources , ResourceField field ) { List results = new ArrayList ( ) ; Iterator iterator = resources . iterator ( ) ; while ( iterator . hasNext ( ) ) { Object resource = iterator . next ( ) ; Object property = PropertyUtils . getProperty ( resource , field . getUnderlyingName ( ) ) ; LookupIncludeBehavior lookupIncludeBehavior = field . getLookupIncludeAutomatically ( ) ; if ( lookupIncludeBehavior == LookupIncludeBehavior . AUTOMATICALLY_ALWAYS || ( property == null && lookupIncludeBehavior == LookupIncludeBehavior . AUTOMATICALLY_WHEN_NULL ) ) { results . add ( resource ) ; } } return results ; }
filter by resources that need lookup based on incusion behavior .
