JsonIdentityInfo).
Also defines factory methods used for creating instances
for serialization, deserialization.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ObjectIdGenerator.
Simple key class that can be used as a key for ObjectId-to-POJO mappings, when multiple ObjectId types and scopes are used. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: True if this instance can be used as-is; false if notMethod called to check whether this generator instance can
be used for Object Ids of specific generator type and
scope; determination is based by passing a configured
"blueprint" (prototype) instance; from which the actual
instances are created (using |
| public abstract ObjectIdGenerator | |
| public abstract T | Returns: Object Identifier to use.POJO for which identifier is needed forPojo)Method used for generating a new Object Identifier to serialize for given POJO. |
| public abstract Class | |
| public boolean | isValidReferencePropertyName(String
Name of property to check name, Object Parser that points to property name, in case generator needs
further verification (note: untyped, because parser)JsonParser is defined
in `jackson-core`, and this package does not depend on it).Accessor that may be called (after verifying (via |
| public abstract ObjectIdGenerator. | |
| public boolean | maySerializeAsObject()
Accessor that needs to be overridden to return |
| public abstract ObjectIdGenerator | newForSerialization(Object
Serialization context object used (of type
context)com.fasterxml.jackson.databind.SerializerProvider);
may be needed by more complex generators to access contextual
information such as configuration.Factory method called to create a new instance to use for serialization: needed since generators may have state (next id to produce). |
| ObjectIdGenerator | back to summary |
|---|---|
| public ObjectIdGenerator() | |
| canUseFor | back to summary |
|---|---|
| public abstract boolean canUseFor(ObjectIdGenerator<?> gen) Method called to check whether this generator instance can
be used for Object Ids of specific generator type and
scope; determination is based by passing a configured
"blueprint" (prototype) instance; from which the actual
instances are created (using
| |
| forScope | back to summary |
|---|---|
| public abstract ObjectIdGenerator Factory method to create a blueprint instance for specified scope. Generators that do not use scope may return 'this'. | |
| generateId | back to summary |
|---|---|
| public abstract T generateId(Object forPojo) Method used for generating a new Object Identifier to serialize for given POJO.
| |
| getScope | back to summary |
|---|---|
| public abstract Class | |
| isValidReferencePropertyName | back to summary |
|---|---|
| public boolean isValidReferencePropertyName(String name, Object parser) Accessor that may be called (after verifying (via | |
| key | back to summary |
|---|---|
| public abstract ObjectIdGenerator. Method for constructing key to use for ObjectId-to-POJO maps. | |
| maySerializeAsObject | back to summary |
|---|---|
| public boolean maySerializeAsObject() Accessor that needs to be overridden to return
Default implementation returns
| |
| newForSerialization | back to summary |
|---|---|
| public abstract ObjectIdGenerator Factory method called to create a new instance to use for serialization: needed since generators may have state (next id to produce).
Note that actual type of 'context' is
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public final Object | key
Object for which Object Id was generated: can NOT be null. |
| public final Class | scope
Scope of the Object Id (may be null, to denote global) |
| private static final long | |
| public final Class | type
Type of |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public String |
| hashCode | back to summary |
|---|---|
| private final int hashCode | |
| key | back to summary |
|---|---|
| public final Object key Object for which Object Id was generated: can NOT be null. | |
| scope | back to summary |
|---|---|
| public final Class<?> scope Scope of the Object Id (may be null, to denote global) | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| type | back to summary |
|---|---|
| public final Class<?> type Type of | |
| IdKey | back to summary |
|---|---|
| public IdKey(Class<?> type, Class<?> scope, Object key) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |