Search in sources :

Example 1 with OCaseInsentiveComparator

use of com.orientechnologies.common.comparator.OCaseInsentiveComparator in project orientdb by orientechnologies.

the class OCommandExecutorSQLDropProperty method relatedIndexes.

private List<OIndex<?>> relatedIndexes(final String fieldName) {
    final List<OIndex<?>> result = new ArrayList<OIndex<?>>();
    final ODatabaseDocument database = getDatabase();
    for (final OIndex<?> oIndex : database.getMetadata().getIndexManager().getClassIndexes(className)) {
        if (OCollections.indexOf(oIndex.getDefinition().getFields(), fieldName, new OCaseInsentiveComparator()) > -1) {
            result.add(oIndex);
        }
    }
    return result;
}
Also used : OIndex(com.orientechnologies.orient.core.index.OIndex) ODatabaseDocument(com.orientechnologies.orient.core.db.document.ODatabaseDocument) ArrayList(java.util.ArrayList) OCaseInsentiveComparator(com.orientechnologies.common.comparator.OCaseInsentiveComparator)

Aggregations

OCaseInsentiveComparator (com.orientechnologies.common.comparator.OCaseInsentiveComparator)1 ODatabaseDocument (com.orientechnologies.orient.core.db.document.ODatabaseDocument)1 OIndex (com.orientechnologies.orient.core.index.OIndex)1 ArrayList (java.util.ArrayList)1