File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
datastore/src/main/java/io/spine/server/storage/datastore Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 2323import com .google .cloud .datastore .BaseEntity ;
2424import com .google .cloud .datastore .Entity ;
2525import com .google .cloud .datastore .Key ;
26+ import com .google .common .annotations .VisibleForTesting ;
2627import com .google .common .base .Functions ;
2728import com .google .protobuf .Any ;
2829import com .google .protobuf .FieldMask ;
@@ -243,6 +244,19 @@ protected DatastoreWrapper getDatastore() {
243244 return datastore ;
244245 }
245246
247+ /**
248+ * Obtains the {@link TypeUrl} of the messages to save to this store.
249+ *
250+ * <p>Allows the customization of the storage behavior in descendants.
251+ *
252+ * @return the {@link TypeUrl} of the stored messages
253+ */
254+ @ VisibleForTesting
255+ // Otherwise this getter is not used
256+ TypeUrl getTypeUrl () {
257+ return typeUrl ;
258+ }
259+
246260 protected Entity entityRecordToEntity (I id , EntityRecordWithColumns record ) {
247261 EntityRecord entityRecord = record .getRecord ();
248262 Key key = datastore .keyFor (kindFrom (entityRecord ), ofEntityId (id ));
You can’t perform that action at this time.
0 commit comments