Class DatastoreIdImplXcalia
java.lang.Object
org.datanucleus.identity.DatastoreIdImplXcalia
- All Implemented Interfaces:
Serializable, Comparable, DatastoreId
Object identifier, typically used for datastore identity.
The behaviour of this class is governed by JDO spec 5.4.3.
Utilises a String form of the style "mydomain.MyClass:3258"; this is a form similar to Xcalia. Note : Xcalia also allows "{alias}:3258" but this isn't catered for here
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a DatastoreId from its string representation that is consistent with the output of toString().DatastoreIdImplXcalia(String pcClass, Object key) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanProvides the identity in a form that can be used by the database as a key.Accessor for the target class name for the persistable object this represents.inthashCode()toString()Creates a String representation of the datastore identity, formed from the target class name and the key value.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
STRING_DELIMITER
- See Also:
-
keyAsObject
-
targetClassName
-
toString
-
hashCode
public final int hashCode
-
-
Constructor Details
-
DatastoreIdImplXcalia
-
DatastoreIdImplXcalia
Constructs a DatastoreId from its string representation that is consistent with the output of toString().- Parameters:
str- the string representation of a DatastoreId- Throws:
IllegalArgumentException- if the given string representation is not valid.- See Also:
-
-
Method Details
-
getKeyAsObject
Description copied from interface:DatastoreIdProvides the identity in a form that can be used by the database as a key.- Specified by:
getKeyAsObjectin interfaceDatastoreId- Returns:
- The key value
-
getTargetClassName
Description copied from interface:DatastoreIdAccessor for the target class name for the persistable object this represents.- Specified by:
getTargetClassNamein interfaceDatastoreId- Returns:
- the class name of the persistable
-
equals
- Specified by:
equalsin interfaceDatastoreId- Overrides:
equalsin classObject
-
compareTo
- Specified by:
compareToin interfaceComparable
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceDatastoreId- Overrides:
hashCodein classObject
-
toString
Creates a String representation of the datastore identity, formed from the target class name and the key value. This will be something likemydomain.MyClass:3254
- Specified by:
toStringin interfaceDatastoreId- Overrides:
toStringin classObject- Returns:
- The String form of the identity
-