Class ObjectIdConverter

java.lang.Object
org.eclipse.jnosql.databases.mongodb.mapping.ObjectIdConverter
All Implemented Interfaces:
jakarta.nosql.AttributeConverter<String,org.bson.types.ObjectId>

public class ObjectIdConverter extends Object implements jakarta.nosql.AttributeConverter<String,org.bson.types.ObjectId>
An implementation of AttributeConverter where it converts the ObjectId from/to String
  • Constructor Details

    • ObjectIdConverter

      public ObjectIdConverter()
  • Method Details

    • convertToDatabaseColumn

      public org.bson.types.ObjectId convertToDatabaseColumn(String attribute)
      Specified by:
      convertToDatabaseColumn in interface jakarta.nosql.AttributeConverter<String,org.bson.types.ObjectId>
    • convertToEntityAttribute

      public String convertToEntityAttribute(org.bson.types.ObjectId dbData)
      Specified by:
      convertToEntityAttribute in interface jakarta.nosql.AttributeConverter<String,org.bson.types.ObjectId>