Package google.registry.persistence
Class VKey<T>
java.lang.Object
google.registry.model.ImmutableObject
google.registry.persistence.VKey<T>
- All Implemented Interfaces:
Serializable
,Cloneable
VKey is an abstraction that encapsulates the key concept.
A VKey instance must contain the JPA primary key for the referenced entity class.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> VKey
<T> create
(Class<T> kind, Serializable key) Creates aVKey
with supplied the SQL primary key.static <T extends EppResource>
VKey<T> createEppVKeyFromString
(String keyString) Constructs aVKey
for anEppResource
from the string representation.getKey()
Returns the primary key.getKind()
Returns the type of the entity.Constructs the string representation of aVKey
.toString()
Constructs the readable string representation of aVKey
.Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toStringHelper
-
Method Details
-
create
Creates aVKey
with supplied the SQL primary key. -
createEppVKeyFromString
Constructs aVKey
for anEppResource
from the string representation.The string representation is obtained from the
stringify()
function and like this:kind:SomeEntity@sql:rO0ABXQAA2Zvbw
-
getKind
Returns the type of the entity. -
getKey
Returns the primary key. -
stringify
Constructs the string representation of aVKey
.The string representation contains its kind and Base64 SQL key, in the following format:
kind:class_name@sql:encoded_sqlKey
. -
toString
Constructs the readable string representation of aVKey
.- Overrides:
toString
in classImmutableObject
-