Refer to Datastore everywhere correctly by its capitalized form

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147479683
This commit is contained in:
mcilwain 2017-02-14 09:11:30 -08:00 committed by Ben McIlwain
parent a8cf81bca2
commit cdadb54acd
123 changed files with 232 additions and 235 deletions

View file

@ -21,7 +21,7 @@ import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Parent;
import google.registry.model.ImmutableObject;
/** A singleton entity in the datastore. */
/** A singleton entity in Datastore. */
public abstract class CrossTldSingleton extends ImmutableObject {
public static final long SINGLETON_ID = 1; // There is always exactly one of these.

View file

@ -36,7 +36,7 @@ import org.joda.time.DateTime;
@Entity
public class Cursor extends ImmutableObject {
/** The types of cursors, used as the string id field for each cursor in datastore. */
/** The types of cursors, used as the string id field for each cursor in Datastore. */
public enum CursorType {
/** Cursor for ensuring rolling transactional isolation of BRDA staging operation. */
BRDA(Registry.class),

View file

@ -29,7 +29,7 @@ import google.registry.model.annotations.NotBackedUp.Reason;
/**
* A helper class to convert email addresses to GAE user ids. It does so by persisting a User
* object with the email address to datastore, and then immediately reading it back.
* object with the email address to Datastore, and then immediately reading it back.
*/
@Entity
@NotBackedUp(reason = Reason.TRANSIENT)

View file

@ -19,7 +19,7 @@ import com.google.common.collect.Range;
import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject;
/** An object that's equivalent to a {@code Range<Long>} that can be persisted to datastore. */
/** An object that's equivalent to a {@code Range<Long>} that can be persisted to Datastore. */
@Embed
public class PersistedRangeLong extends ImmutableObject {

View file

@ -38,21 +38,21 @@ import javax.annotation.Nullable;
import org.joda.time.DateTime;
/**
* An entity property whose value transitions over time. Each value it takes on becomes active
* at a corresponding instant, and remains active until the next transition occurs. At least one
* "start of time" value (corresponding to START_OF_TIME, i.e. the Unix epoch) must be provided
* so that the property will have a value for all possible times.
* An entity property whose value transitions over time. Each value it takes on becomes active at a
* corresponding instant, and remains active until the next transition occurs. At least one "start
* of time" value (corresponding to START_OF_TIME, i.e. the Unix epoch) must be provided so that the
* property will have a value for all possible times.
*
* <p>This concept is naturally represented by a sorted map of {@code DateTime} to {@code V}, but
* the AppEngine datastore cannot natively represent a map keyed on non-strings. Instead, we store
* the App Engine Datastore cannot natively represent a map keyed on non-strings. Instead, we store
* an ordered list of transitions and use Objectify's @Mapify annotation to automatically recreate
* the sorted map on load from the datastore, which is used as a backing map for this property; the
* the sorted map on load from Datastore, which is used as a backing map for this property; the
* property itself also implements Map by way of extending ForwardingMap, so that this property can
* stored directly as the @Mapify field in the entity.
*
* <p>The type parameter {@code T} specifies a user-defined subclass of {@code TimedTransition<V>}
* to use for storing the list of transitions. The user is given this choice of subclass so that
* the field of the value type stored in the transition can be given a customized name.
* to use for storing the list of transitions. The user is given this choice of subclass so that the
* field of the value type stored in the transition can be given a customized name.
*/
public class TimedTransitionProperty<V, T extends TimedTransitionProperty.TimedTransition<V>>
extends ForwardingMap<DateTime, T> {
@ -62,7 +62,7 @@ public class TimedTransitionProperty<V, T extends TimedTransitionProperty.TimedT
* for the {@code DateTime}, which means that subclasses should supply the field of type {@code V}
* and implementations of the abstract getter and setter methods to access that field. This design
* is so that subclasses tagged with @Embed can define a custom field name for their value, for
* the purpose of backwards compatibility and better readability of the datastore representation.
* the purpose of backwards compatibility and better readability of the Datastore representation.
*
* <p>The public visibility of this class exists only so that it can be subclassed; clients should
* never call any methods on this class or attempt to access its members, but should instead treat
@ -235,17 +235,15 @@ public class TimedTransitionProperty<V, T extends TimedTransitionProperty.TimedT
}
/**
* Returns a new mutable {@code TimedTransitionProperty} representing the given map of DateTime
* to value, with transitions constructed using the given {@code TimedTransition} subclass.
* Returns a new mutable {@code TimedTransitionProperty} representing the given map of DateTime to
* value, with transitions constructed using the given {@code TimedTransition} subclass.
*
* <p>This method should only be used for initializing fields that are declared with the
* @Mapify annotation. The map for those fields must be mutable so that Objectify can load values
* from the datastore into the map, but clients should still never mutate the field's map
* directly.
* <p>This method should only be used for initializing fields that are declared with the @Mapify
* annotation. The map for those fields must be mutable so that Objectify can load values from
* Datastore into the map, but clients should still never mutate the field's map directly.
*/
public static <V, T extends TimedTransition<V>> TimedTransitionProperty<V, T> forMapify(
ImmutableSortedMap<DateTime, V> valueMap,
Class<T> timedTransitionSubclass) {
ImmutableSortedMap<DateTime, V> valueMap, Class<T> timedTransitionSubclass) {
return new TimedTransitionProperty<>(
new TreeMap<>(makeTransitionMap(valueMap, timedTransitionSubclass)));
}
@ -254,10 +252,9 @@ public class TimedTransitionProperty<V, T extends TimedTransitionProperty.TimedT
* Returns a new mutable {@code TimedTransitionProperty} representing the given value being set at
* start of time, constructed using the given {@code TimedTransition} subclass.
*
* <p>This method should only be used for initializing fields that are declared with the
* @Mapify annotation. The map for those fields must be mutable so that Objectify can load values
* from the datastore into the map, but clients should still never mutate the field's map
* directly.
* <p>This method should only be used for initializing fields that are declared with the @Mapify
* annotation. The map for those fields must be mutable so that Objectify can load values from
* Datastore into the map, but clients should still never mutate the field's map directly.
*/
public static <V, T extends TimedTransition<V>> TimedTransitionProperty<V, T> forMapify(
V valueAtStartOfTime, Class<T> timedTransitionSubclass) {