throw new UnsupportedOperationException(
"null key, null index, and null entity binding");
}
entityBinding.objectToKey(value, keyThang);
} else {
KeyExtractor extractor = index.getKeyExtractor();
DataThang primaryKeyThang = null;
DataThang valueThang = null;
if (entityBinding != null) {
if (extractor.getPrimaryKeyFormat() != null) {
primaryKeyThang = new DataThang();
entityBinding.objectToKey(value, primaryKeyThang);
}
if (extractor.getValueFormat() != null) {
valueThang = new DataThang();
entityBinding.objectToValue(value, valueThang);
}
} else {
if (extractor.getPrimaryKeyFormat() != null) {
throw new IllegalStateException(
"primary key needed by index extractor");
}
if (extractor.getValueFormat() != null) {
valueThang = new DataThang();
valueBinding.objectToData(value, valueThang);
}
}
extractor.extractIndexKey(primaryKeyThang, valueThang, keyThang);
}
if (checkRange != null) {
return checkRange.check(keyThang) ? 0 : Db.DB_NOTFOUND;
} else {
return 0;