Exemple #1
0
 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);
   }
 }
Exemple #2
0
 public void removeEntryIndex(Data indexKey) {
   Comparable oldValue = recordValues.remove(indexKey);
   if (oldValue != null) {
     indexStore.removeIndex(oldValue, indexKey);
   }
 }