@Override public boolean isMultiValueKey(IndexableItem indexableItem) throws JasDBStorageException { return indexableItem.isMultiValue(field); }
@Override public Key createKey(IndexableItem indexableItem) throws JasDBStorageException { Object value = indexableItem.getValue(field); return convertToKey(value); }
private static boolean isIndexable(KeyInfo keyInfo, IndexableItem item) { for(String field : keyInfo.getKeyFields()) { if(!item.hasValue(field)) { return false; } } return true; }
@Override public Set<Key> createMultivalueKeys(IndexableItem indexableItem) throws JasDBStorageException { List<Object> values = indexableItem.getValues(field); Set<Key> keys = new HashSet<>(values.size()); for(Object value : values) { keys.add(convertToKey(value)); } return keys; }
@Override public Key createKey(IndexableItem indexableItem) throws JasDBStorageException { Object value = indexableItem.getValue(field); return convertToKey(value); }
public static boolean isAnyDataPresent(IndexableItem sEntity, Index index) { for(String indexField : index.getKeyInfo().getKeyFields()) { if(sEntity.hasValue(indexField)) { return true; } } return false; }
@Override public Key createKey(IndexableItem indexableItem) throws JasDBStorageException { Object value = indexableItem.getValue(field); return convertToKey(value); }