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 ; }
Stores index data .