private void addPredicatesToScannerBuilder ( KuduScannerBuilder scannerBuilder , EmbeddableType embeddable , Field [ ] fields , MetamodelImpl metaModel , Object key ) { for ( Field f : fields ) { if ( ! ReflectUtils . isTransientOrStatic ( f ) ) { Object value = PropertyAccessorHelper . getObject ( key , f ) ; if ( f . getType ( ) . isAnnotationPresent ( Embeddable . class ) ) { // nested addPredicatesToScannerBuilder ( scannerBuilder , ( EmbeddableType ) metaModel . embeddable ( f . getType ( ) ) , f . getType ( ) . getDeclaredFields ( ) , metaModel , value ) ; } else { Attribute attribute = embeddable . getAttribute ( f . getName ( ) ) ; Type type = KuduDBValidationClassMapper . getValidTypeForClass ( f . getType ( ) ) ; ColumnSchema column = new ColumnSchema . ColumnSchemaBuilder ( ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) , type ) . build ( ) ; KuduPredicate predicate = KuduDBDataHandler . getEqualComparisonPredicate ( column , type , value ) ; scannerBuilder . addPredicate ( predicate ) ; } } } }
Adds the predicates to scanner builder .