code: private void createForeignKeys(Set<ForeignKey> allForeignKeys, Map<Column, ColumnDescriptor> allColumns, Store store) {
          // Foreign keys
          for (ForeignKey foreignKey : allForeignKeys) {
              ForeignKeyDescriptor foreignKeyDescriptor = store.create(ForeignKeyDescriptor.class);
              foreignKeyDescriptor.setName(foreignKey.getName());
              foreignKeyDescriptor.setDeferrability(foreignKey.getDeferrability().name());
              foreignKeyDescriptor.setDeleteRule(foreignKey.getDeleteRule().name());
              foreignKeyDescriptor.setUpdateRule(foreignKey.getUpdateRule().name());
              for (ForeignKeyColumnReference columnReference : foreignKey.getColumnReferences()) {
                  ForeignKeyReferenceDescriptor keyReferenceDescriptor = store.create(ForeignKeyReferenceDescriptor.class);
                  // foreign key table and column
                  Column foreignKeyColumn = columnReference.getForeignKeyColumn();
                  ColumnDescriptor foreignKeyColumnDescriptor = allColumns.get(foreignKeyColumn);
                  keyReferenceDescriptor.setForeignKeyColumn(foreignKeyColumnDescriptor);
                  // primary key table and column
                  Column primaryKeyColumn = columnReference.getPrimaryKeyColumn();
                  ColumnDescriptor primaryKeyColumnDescriptor = allColumns.get(primaryKeyColumn);
                  keyReferenceDescriptor.setPrimaryKeyColumn(primaryKeyColumnDescriptor);
                  foreignKeyDescriptor.getForeignKeyReferences().add(keyReferenceDescriptor);
              }
          }
      }
docs: Create the foreign key descriptors.
  
  @param allForeignKeys All collected foreign keys.
  @param allColumns     All collected columns.
  @param store          The store.