@Override public PropertyKey[] getFieldKeys() { IndexField[] fields = index.getFieldKeys(); PropertyKey[] keys = new PropertyKey[fields.length]; for (int i = 0; i < fields.length; i++) { keys[i] = fields[i].getFieldKey(); } return keys; }
@Override public SchemaStatus getIndexStatus(PropertyKey key) { Preconditions.checkArgument( Sets.newHashSet(getFieldKeys()).contains(key), "Provided key is not part of this index: %s", key); if (index.isCompositeIndex()) return ((CompositeIndexType) index).getStatus(); else return ((MixedIndexType) index).getField(key).getStatus(); }
@Override public boolean isMixedIndex() { return index.isMixedIndex(); }
@Override public boolean isCompositeIndex() { return index.isCompositeIndex(); }
@Override public boolean isUnique() { if (index.isMixedIndex()) return false; return ((CompositeIndexType) index).getCardinality() == Cardinality.SINGLE; }
@Override public Parameter[] getParametersFor(PropertyKey key) { if (index.isCompositeIndex()) return new Parameter[0]; return ((MixedIndexType) index).getField(key).getParameters(); }
@Override public Class<? extends Element> getIndexedElement() { return index.getElement().getElementType(); }
@Override public String getBackingIndex() { return index.getBackingIndexName(); }
@Override public String name() { return index.getName(); }