Class ExtendableEntityUtil (2.0.0)

public final class ExtendableEntityUtil

Internal class that provides utility methods for extendable entity objects.

Inheritance

Object > ExtendableEntityUtil

Static Methods

areKeysEqual(Key key1, Key key2)

public static boolean areKeysEqual(Key key1, Key key2)

Check if the input Key objects are equal (including keys that are incomplete).

Parameters
NameDescription
key1Key

the first input key

key2Key

the second input key

Returns
TypeDescription
boolean

true if the keys are equal. false otherwise.

checkSupportedValue(String propertyName, Object value, boolean valuePreChecked, Set<Class<?>> supportedTypes)

public static void checkSupportedValue(String propertyName, Object value, boolean valuePreChecked, Set<Class<?>> supportedTypes)

If the specified object cannot be used as the value for a Entity property, throw an exception with the appropriate explanation.

Parameters
NameDescription
propertyNameString

the name of the property.

valueObject

value in question

valuePreCheckedboolean

true if the value without the name has already been checked. false otherwise.

supportedTypesSet<Class<?>>

the types considered to be valid types for the value.

createKey(Key parent, String kind)

public static Key createKey(Key parent, String kind)

Creates a new Key with the provided parent and kind. The instantiated Key will be incomplete.

Parameters
NameDescription
parentKey

the parent of the key to create, can be null

kindString

the kind of the key to create

Returns
TypeDescription
Key