private static List<List<NameAndDirection>> gatherListProperties(List<String> errorMessages,
                                                                     AlternateKeys alternateKeys)
    {
        List<List<NameAndDirection>> listlist = new ArrayList<List<NameAndDirection>>();

        if (alternateKeys != null) {
            Key[] keys = alternateKeys.value();
            if (keys != null && keys.length > 0) {
                for (int i=0; i<keys.length; i++) {
                    String[] propNames = keys[i].value();
                    if (propNames == null || propNames.length == 0) {
                        errorMessages.add("Empty alternate key defined");
                        continue;
                    }
                    gatherListProperties(errorMessages, "alternate key", propNames, listlist);
                }
            }
        }

        return listlist;
    }
private static List < List < NameAndDirection > > gatherListProperties ( List < String > errorMessages , AlternateKeys alternateKeys ) { List < List < NameAndDirection > > listlist = new ArrayList < List < NameAndDirection > > ( ) ; if ( alternateKeys != null ) { Key [ ] keys = alternateKeys . value ( ) ; if ( keys != null && keys . length > 0 ) { for ( int i = 0 ; i < keys . length ; i ++ ) { String [ ] propNames = keys [ i ] . value ( ) ; if ( propNames == null || propNames . length == 0 ) { errorMessages . add ( "Empty alternate key defined" ) ; continue ; } gatherListProperties ( errorMessages , "alternate key" , propNames , listlist ) ; } } } return listlist ; }
@param alternateKeys pass in for gathering alternate key properties