@Test public void testAddAllColumns() { ColumnStore<Node> columnStore = generateEmptyNodeStore(); IndexImpl<Node> index = columnStore.indexStore.mainIndex; ColumnImpl col1 = new ColumnImpl("1", String.class, "1", null, Origin.DATA, true, false); ColumnImpl col2 = new ColumnImpl("2", String.class, "2", null, Origin.DATA, false, false); ColumnImpl col3 = new ColumnImpl("3", String.class, "3", null, Origin.DATA, true, false); col1.setStoreId(0); col2.setStoreId(1); col3.setStoreId(2); index.addAllColumns(new ColumnImpl[] { col1, col2, col3 }); Assert.assertEquals(index.size(), 2); }
protected void addAllColumns(ColumnImpl[] cols) { ensureColumnSize(cols.length); for (ColumnImpl col : cols) { if (col.isIndexed()) { AbstractIndex index = createIndex(col); columns[col.storeId] = index; columnsCount++; } } }
IndexImpl implements Index<T> { protected void addAllColumns(ColumnImpl[] cols) { ensureColumnSize(cols.length); for (ColumnImpl col : cols) { if (col.isIndexed()) { AbstractIndex index = createIndex(col); columns[col.storeId] = index; columnsCount++; } } } }
IndexImpl implements Index<T> { protected void addAllColumns(ColumnImpl[] cols) { ensureColumnSize(cols.length); for (ColumnImpl col : cols) { if (col.isIndexed()) { AbstractIndex index = createIndex(col); columns[col.storeId] = index; columnsCount++; } } } IndexImpl(ColumnStore<T> columnStore); }
IndexImpl implements Index<T> { protected void addAllColumns(ColumnImpl[] cols) { ensureColumnSize(cols.length); for (ColumnImpl col : cols) { if (col.isIndexed()) { AbstractIndex index = createIndex(col); columns[col.storeId] = index; columnsCount++; } } } IndexImpl(ColumnStore<T> columnStore); @Override Class<T> getIndexClass(); @Override String getIndexName(); @Override int count(Column column, Object value); int count(String key, Object value); Iterable<T> get(String key, Object value); @Override Iterable<T> get(Column column, Object value); @Override boolean isSortable(Column column); @Override Number getMinValue(Column column); @Override Number getMaxValue(Column column); Iterable<Map.Entry<Object, Set<T>>> get(Column column); @Override Collection values(Column column); @Override int countValues(Column column); @Override int countElements(Column column); Object put(String key, Object value, T element); Object put(Column column, Object value, T element); void remove(String key, Object value, T element); void remove(Column column, Object value, T element); Object set(String key, Object oldValue, Object value, T element); Object set(Column column, Object oldValue, Object value, T element); void clear(); }
IndexImpl implements Index<T> { protected void addAllColumns(ColumnImpl[] cols) { ensureColumnSize(cols.length); for (ColumnImpl col : cols) { if (col.isIndexed()) { AbstractIndex index = createIndex(col); columns[col.storeId] = index; columnsCount++; } } } IndexImpl(ColumnStore<T> columnStore); @Override Class<T> getIndexClass(); @Override String getIndexName(); @Override int count(Column column, Object value); int count(String key, Object value); Iterable<T> get(String key, Object value); @Override Iterable<T> get(Column column, Object value); @Override boolean isSortable(Column column); @Override Number getMinValue(Column column); @Override Number getMaxValue(Column column); Iterable<Map.Entry<Object, Set<T>>> get(Column column); @Override Collection values(Column column); @Override int countValues(Column column); @Override int countElements(Column column); Object put(String key, Object value, T element); Object put(Column column, Object value, T element); void remove(String key, Object value, T element); void remove(Column column, Object value, T element); Object set(String key, Object oldValue, Object value, T element); Object set(Column column, Object oldValue, Object value, T element); void clear();  }