}
private RemoteConvWavelet parseWaveletEntity(Entity entity) {
Pair<SourceInstance, WaveletName> instanceAndWaveId = parseWaveletKey(entity.getKey());
try {
RobotSearchDigest digest = GsonProto.fromGson(new RobotSearchDigestGsonImpl(),
DatastoreUtil.getExistingProperty(entity, WAVELET_DIGEST_PROPERTY, Text.class)
.getValue());
Assert.check(
instanceAndWaveId.getSecond().waveId.equals(WaveId.deserialise(digest.getWaveId())),
"Wave id mismatch: %s, %s", instanceAndWaveId, entity);
Assert.check(DatastoreUtil.getExistingProperty(
entity, WAVELET_LAST_MODIFIED_MILLIS_PROPERTY, Long.class)
.equals(digest.getLastModifiedMillis()),
"Mismatched last modified times: %s, %s", digest, entity);
@Nullable String privateLocalId = DatastoreUtil.getOptionalProperty(
entity, WAVELET_PRIVATE_LOCAL_ID_PROPERTY, String.class);
@Nullable String sharedLocalId = DatastoreUtil.getOptionalProperty(
entity, WAVELET_SHARED_LOCAL_ID_PROPERTY, String.class);