// @Test public void testRemoveIdexedColumn() { CassandraIndexColumn indexColumn = new CassandraIndexColumn( UUID.fromString("26d41600-fe4b-11df-b39b-001cc0c3e436"), toUUID(96)); mapper.removeIndexedColumn(Comment.class, "commentedBy", "lorenabittencourt", indexColumn); List<CassandraIndexColumn> indexedColumns = mapper.findIndexedColumns(Comment.class, "commentedBy", "lorenabittencourt"); assertFalse(indexedColumns.contains(indexColumn)); }
// @Test public void testUpdateIndex() { String[] authors = {"diegossilveira", "nayarasilveira", "lorenabittencourt"}; for (int i = 200; i <= 500; i++) { Comment comment = new Comment(TimeUUIDUtils.getTimeUUID(), authors[i % 3], "My comment " + i / 3); mapper.store(comment); mapper.updateIndex(comment, "commentedBy"); } }
// @Test public void testFindIndexedColumns() { List<CassandraIndexColumn> indexedColumns = mapper.findIndexedColumns(Comment.class, "commentedBy", "lorenabittencourt"); for (CassandraIndexColumn indexColumn : indexedColumns) { System.out.println( TimeUUIDUtils.toDate(indexColumn.indexer()) + ": " + indexColumn.indexedKey()); } }