public static String getColumnSharedPrefix ( String [ ] associationKeyColumns ) { String prefix = null ; for ( String column : associationKeyColumns ) { String newPrefix = getPrefix ( column ) ; if ( prefix == null ) { // first iteration prefix = newPrefix ; if ( prefix == null ) { // no prefix, quit break ; } } else { // subsequent iterations if ( ! equals ( prefix , newPrefix ) ) { // different prefixes prefix = null ; break ; } } } return prefix ; }
Returns the shared prefix of these columns . Null otherwise .