mirror of
https://github.com/google/nomulus
synced 2026-04-26 19:15:24 +00:00
Make entities serializable for DB validation (#1401)
* Make entities serializable for DB validation Make entities that are asynchronously replicated between Datastore and Cloud SQL serializable so that they may be used in BEAM pipeline based comparison tool. Introduced an UnsafeSerializable interface (extending Serializable) and added to relevant classes. Implementing classes are allowed some shortcuts as explained in the interface's Javadoc. Post migration we will decide whether to revert this change or properly implement serialization. Verified with production data.
This commit is contained in:
@@ -65,5 +65,10 @@ public final class SerializeUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/** Serializes an object then deserializes it. This is typically used in tests. */
|
||||
public static Object serializeDeserialize(Object object) {
|
||||
return deserialize(Object.class, serialize(object));
|
||||
}
|
||||
|
||||
private SerializeUtils() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user