Interface CouchbaseConverter

All Superinterfaces:
CouchbaseWriter<Object,CouchbaseDocument>, EntityConverter<CouchbasePersistentEntity<?>,CouchbasePersistentProperty,Object,CouchbaseDocument>, EntityReader<Object,CouchbaseDocument>, EntityWriter<Object,CouchbaseDocument>
All Known Implementing Classes:
AbstractCouchbaseConverter, MappingCouchbaseConverter

Marker interface for the converter, identifying the types to and from that can be converted.
Author:
Michael Nitschinger, Simon Baslé, Michael Reiche
  • Method Details

    • convertForWriteIfNeeded

      Object convertForWriteIfNeeded(Object value)
      Convert the value if necessary to the class that would actually be stored, or leave it as is if no conversion needed. This method cannot access the annotations of the field.
      Parameters:
      value - the value to be converted to the class that would actually be stored.
      Returns:
      the converted value (or the same value if no conversion necessary).
    • convertForWriteIfNeeded

      Object convertForWriteIfNeeded(CouchbasePersistentProperty source, ConvertingPropertyAccessor<Object> accessor, boolean processValueConverter)
      Convert the value if necessary to the class that would actually be stored, or leave it as is if no conversion needed. This method can access the annotations of the field.
      Parameters:
      source - the property to be converted to the class that would actually be stored.
      accessor - the property accessor
      Returns:
      the converted value (or the same value if no conversion necessary).
    • getWriteClassFor

      Class<?> getWriteClassFor(Class<?> clazz)
      Return the Class that would actually be stored for a given Class.
      Parameters:
      clazz - the source class.
      Returns:
      the target class that would actually be stored.
      See Also:
    • getTypeKey

      String getTypeKey()
      Returns:
      the name of the field that will hold type information.
    • getTypeAlias

      Alias getTypeAlias(TypeInformation<?> info)
      Returns:
      the alias value for the type
    • getConversions

      CustomConversions getConversions()
      return the conversions
      Returns:
      conversions