public OMultiKey(final Collection<?> keys) { this.keys = new ArrayList<Object>(keys); hash = generateHashCode(keys); }
public boolean areIndexed(final String className, Collection<String> fields) { final OMultiKey multiKey = new OMultiKey(fields); final Map<OMultiKey, Set<OIndex<?>>> propertyIndex = getIndexOnProperty(className); if (propertyIndex == null) return false; return propertyIndex.containsKey(multiKey) && !propertyIndex.get(multiKey).isEmpty(); }
public OMultiKey(final Collection<?> keys) { this.keys = new ArrayList<Object>(keys); hash = generateHashCode(keys); }
public Set<OIndex<?>> getClassInvolvedIndexes(final String className, Collection<String> fields) { final OMultiKey multiKey = new OMultiKey(fields); final Map<OMultiKey, Set<OIndex<?>>> propertyIndex = getIndexOnProperty(className); if (propertyIndex == null || !propertyIndex.containsKey(multiKey)) return Collections.emptySet(); final Set<OIndex<?>> rawResult = propertyIndex.get(multiKey); final Set<OIndex<?>> transactionalResult = new HashSet<>(rawResult.size()); for (final OIndex<?> index : rawResult) { //ignore indexes that ignore null values on partial match if (fields.size() == index.getDefinition().getFields().size() || !index.getDefinition().isNullValuesIgnored()) { transactionalResult.add(preProcessBeforeReturn(getDatabase(), index)); } } return transactionalResult; }
final OMultiKey multiKey = new OMultiKey(fields);
final OMultiKey multiKey = new OMultiKey(fields); Set<OIndex<?>> indexSet = propertyIndex.get(multiKey);