Package de.bild.codec

Interface InstanceAwareIdGenerator<T,P>

Type Parameters:
T - type of the id class
P - type of the entity instance class
All Known Subinterfaces:
IdGenerator<T>
All Known Implementing Classes:
Id.DefaultIdGenerator, ObjectIdGenerator

public interface InstanceAwareIdGenerator<T,P>
Introducing this super-interface of IdGenerator allows for staying backward compatible with existing code.
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.bson.BsonValue
    asBsonValue(T id, TypeCodecRegistry typeCodecRegistry)
     
    generate(P instance)
     
  • Method Details

    • generate

      T generate(P instance)
    • asBsonValue

      default org.bson.BsonValue asBsonValue(T id, TypeCodecRegistry typeCodecRegistry)