public static String serializeKeys ( Set < String > foreignKeys ) { if ( null == foreignKeys || foreignKeys . isEmpty ( ) ) { return null ; } StringBuilder sb = new StringBuilder ( ) ; for ( String key : foreignKeys ) { if ( sb . length ( ) > 0 ) { sb . append ( Constants . FOREIGN_KEY_SEPARATOR ) ; } sb . append ( key ) ; } return sb . toString ( ) ; }
Creates a string representation of a set of foreign keys by combining them together separated by ~ character .