Class OverridableUuidRepresentationUuidCodec

  • All Implemented Interfaces:
    >, >, >, >

    public class OverridableUuidRepresentationUuidCodec
    extends UuidCodec
    implements >
    An extension of UuidCodec that allows its configured UuidRepresentation to be overridden by an externally configured UuidRepresentation, most likely configured on MongoClientSettings or MongoClientOptions.
    Since:
    3.12
    • Constructor Detail

      • OverridableUuidRepresentationUuidCodec

        public OverridableUuidRepresentationUuidCodec()
        Construct an instance with the default UUID representation.
      • OverridableUuidRepresentationUuidCodec

        public OverridableUuidRepresentationUuidCodec​(UuidRepresentation uuidRepresentation)
        Construct an instance with the given UUID representation.
        Parameters:
        uuidRepresentation - the UUID representation
    • Method Detail

      • withUuidRepresentation

        public > withUuidRepresentation​(UuidRepresentation uuidRepresentation)
        Description copied from interface: OverridableUuidRepresentationCodec
        Implementations must return a new instance with the UuidRepresentation overridden with the given value.
        Specified by:
        >
        Parameters:
        uuidRepresentation - the UuidRepresentation
        Returns:
        a new instance equivalent to this but with the given UuidRepresentation