question: public void addCriteria ( Criteria otherCriteria ) { if ( otherCriteria instanceof AdvancedCriteria || otherCriteria instanceof Criterion ) { throw new IllegalArgumentException ( "Cannot add a Criterion or AdvancedCriteria to simple Criteria. " + "Use Criteria.asAdvancedCriteria() to convert to AdvancedCriteria" ) ; } Map otherMap = otherCriteria . getValues ( ) ; Set otherKeys = otherMap . keySet ( ) ; for ( Iterator i = otherKeys . iterator ( ) ; i . hasNext ( ) ; ) { String field = ( String ) i . next ( ) ; Object value = otherMap . get ( field ) ; JSOHelper . setAttribute ( jsObj , field , value ) ; } }
target:  Adds the criteria from the passed criteria object.