Class PropertyBasedObjectIdGenerator

java.lang.Object
com.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator
com.fasterxml.jackson.databind.ser.impl.PropertyBasedObjectIdGenerator
All Implemented Interfaces:
Serializable

public class PropertyBasedObjectIdGenerator extends com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • canUseFor

      public boolean canUseFor(com.fasterxml.jackson.annotation.ObjectIdGenerator<?> gen)
      We must override this method, to prevent errors when scopes are the same, but underlying class (on which to access property) is different.
    • generateId

      public Object generateId(Object forPojo)
    • forScope

      public com.fasterxml.jackson.annotation.ObjectIdGenerator<Object> forScope(Class<?> scope)
      Specified by:
      forScope in class com.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
    • newForSerialization

      public com.fasterxml.jackson.annotation.ObjectIdGenerator<Object> newForSerialization(Object context)
      Specified by:
      newForSerialization in class com.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
    • key

      public com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey key(Object key)
      Specified by:
      key in class com.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
    • getScope

      public final Class<?> getScope()
      Specified by:
      getScope in class com.fasterxml.jackson.annotation.ObjectIdGenerator<T>