code: private <I extends IndexDescriptor> I storeIndex(Index index, TableDescriptor tableDescriptor, Map<String, ColumnDescriptor> columns, Class<I> indexType,
                                                       Class<? extends OnColumnDescriptor> onColumnType, Store store) {
          I indexDescriptor = store.create(indexType);
          indexDescriptor.setName(index.getName());
          indexDescriptor.setUnique(index.isUnique());
          indexDescriptor.setCardinality(index.getCardinality());
          indexDescriptor.setIndexType(index.getIndexType().name());
          indexDescriptor.setPages(index.getPages());
          for (IndexColumn indexColumn : index.getColumns()) {
              ColumnDescriptor columnDescriptor = columns.get(indexColumn.getName());
              OnColumnDescriptor onColumnDescriptor = store.create(indexDescriptor, onColumnType, columnDescriptor);
              onColumnDescriptor.setIndexOrdinalPosition(indexColumn.getIndexOrdinalPosition());
              onColumnDescriptor.setSortSequence(indexColumn.getSortSequence().name());
          }
          return indexDescriptor;
      }
docs: Stores index data.
  
  @param index           The index.
  @param tableDescriptor The table descriptor.
  @param columns         The cached columns.
  @param indexType       The index type to create.
  @param onColumnType    The type representing "on column" to create.
  @param store           The store.
  @return The created index descriptor.