DatabaseEntry contentKeyEntry = new DatabaseEntry();
DatabaseEntry value = new DatabaseEntry();
CompoundKeyBinding binding = new CompoundKeyBinding();
binding.objectToEntry(new CompoundKey(messageId, 0), contentKeyEntry);
OperationStatus status = cursor.getSearchKeyRange(contentKeyEntry, value, LockMode.DEFAULT);
OldDataBinding dataBinding = new OldDataBinding();
while (status == OperationStatus.SUCCESS)
{
CompoundKey compoundKey = binding.entryToObject(contentKeyEntry);