if (request.hasRevision()) {
value = new ArrayList<RevValue>(1);
RevValue revVal = database.getRevision(user, index, revision);
if (revVal == null) {
throw new NotFoundException("Cannot find requested index with revision");
}
value.add(revVal);
} else {
value = database.getRecord(user, index);
}
if (value == null) {
throw new NotFoundException("No value for that index");
}
return MessageLibrary.getResponseAsProtobuf(value);
}