Class ObjectIdGenerators.Base<T>

java.lang.Object
com.fasterxml.jackson.annotation.ObjectIdGenerator<T>
com.fasterxml.jackson.annotation.ObjectIdGenerators.Base<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ObjectIdGenerators.IntSequenceGenerator, ObjectIdGenerators.PropertyGenerator, ObjectIdGenerators.StringIdGenerator, ObjectIdGenerators.UUIDGenerator
Enclosing class:
ObjectIdGenerators

private abstract static class ObjectIdGenerators.Base<T> extends ObjectIdGenerator<T>
Shared base class for concrete implementations.
  • Field Details

    • _scope

      protected final Class<?> _scope
  • Constructor Details

    • Base

      protected Base(Class<?> scope)
  • Method Details

    • getScope

      public final Class<?> getScope()
      Specified by:
      getScope in class ObjectIdGenerator<T>
    • canUseFor

      public boolean canUseFor(ObjectIdGenerator<?> gen)
      Description copied from class: ObjectIdGenerator
      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 ObjectIdGenerator.newForSerialization(Object)).
      Specified by:
      canUseFor in class ObjectIdGenerator<T>
      Returns:
      True if this instance can be used as-is; false if not
    • generateId

      public abstract T generateId(Object forPojo)
      Description copied from class: ObjectIdGenerator
      Method used for generating a new Object Identifier to serialize for given POJO.
      Specified by:
      generateId in class ObjectIdGenerator<T>
      Parameters:
      forPojo - POJO for which identifier is needed
      Returns:
      Object Identifier to use.