Class AssociationToPrimitivesConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,org.jmolecules.ddd.types.Identifier>>

java.lang.Object
org.jmolecules.spring.AssociationToPrimitivesConverter<T>
All Implemented Interfaces:
org.springframework.core.convert.converter.GenericConverter

public class AssociationToPrimitivesConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,org.jmolecules.ddd.types.Identifier>> extends Object implements org.springframework.core.convert.converter.GenericConverter
Converts Association instances into their backing Identifier or even to the wrapped value of those.
Author:
Oliver Drotbohm
See Also:
  • Constructor Details

  • Method Details

    • getConvertibleTypes

      @NonNull public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
      Specified by:
      getConvertibleTypes in interface org.springframework.core.convert.converter.GenericConverter
    • convert

      @Nullable public Object convert(@Nullable Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
      Specified by:
      convert in interface org.springframework.core.convert.converter.GenericConverter