Class ExtendableEntityUtil
java.lang.Object
com.google.appengine.api.datastore.ExtendableEntityUtil
Internal class that provides utility methods for extendable entity objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareKeysEqual(Key key1, Key key2) Check if the inputKeyobjects are equal (including keys that are incomplete).static voidcheckSupportedValue(String propertyName, Object value, boolean valuePreChecked, Set<Class<?>> supportedTypes) If the specified object cannot be used as the value for aEntityproperty, throw an exception with the appropriate explanation.static KeyCreates a newKeywith the provided parent and kind.
-
Method Details
-
createKey
Creates a newKeywith the provided parent and kind. The instantiatedKeywill be incomplete.- Parameters:
parent- the parent of the key to create, can benullkind- the kind of the key to create
-
areKeysEqual
Check if the inputKeyobjects are equal (including keys that are incomplete).- Parameters:
key1- the first input keykey2- the second input key- Returns:
trueif the keys are equal.falseotherwise.
-
checkSupportedValue
public static void checkSupportedValue(String propertyName, Object value, boolean valuePreChecked, Set<Class<?>> supportedTypes) If the specified object cannot be used as the value for aEntityproperty, throw an exception with the appropriate explanation.- Parameters:
propertyName- the name of the property.value- value in questionvaluePreChecked-trueif the value without the name has already been checked.falseotherwise.supportedTypes- the types considered to be valid types for the value.- Throws:
IllegalArgumentException- if the type is not supported, or if the object is in some other way invalid.
-