final ArrayList<OIndex<?>> relatedIndexes = new ArrayList<OIndex<?>>();
for (final OIndex<?> index : indexManager.getClassIndexes(owner.getName())) {
final OIndexDefinition definition = index.getDefinition();
if (OCollections.indexOf(definition.getFields(), globalRef.getName(), new OCaseInsentiveComparator()) > -1) {
if (definition instanceof OPropertyIndexDefinition) {
relatedIndexes.add(index);
} else {
throw new IllegalArgumentException("This operation applicable only for property indexes. " + index.getName() + " is "
+ index.getDefinition());