public Object [ ] valuesForColumns ( T bo , String ... columns ) { Map < String , ColAttrMapping > columnAttributeMappings = getColumnAttributeMappings ( ) ; Object [ ] result = new Object [ columns . length ] ; for ( int i = 0 ; i < columns . length ; i ++ ) { ColAttrMapping colAttrMapping = columnAttributeMappings . get ( columns [ i ] ) ; try { result [ i ] = colAttrMapping != null ? colAttrMapping . extractAttrValue ( bo ) : null ; } catch ( Exception e ) { throw e instanceof RuntimeException ? ( RuntimeException ) e : new RuntimeException ( e ) ; } } return result ; }
Extract attribute values from a BO for corresponding DB table columns