public void saveEntryIndex(QueryableEntry e) throws QueryException { Data key = e.getIndexKey(); Comparable oldValue = recordValues.remove(key); Comparable newValue = e.getAttribute(attribute); if (newValue == null) { newValue = NULL; } recordValues.put(key, newValue); if (newValue.getClass().isEnum()) { newValue = TypeConverters.ENUM_CONVERTER.convert(newValue); } if (oldValue == null) { // new indexStore.newIndex(newValue, e); } else { // update indexStore.removeIndex(oldValue, key); indexStore.newIndex(newValue, e); } if (attributeType == null) { attributeType = e.getAttributeType(attribute); } }