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

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

public class PrimitivesToAssociationConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,org.jmolecules.ddd.types.Identifier>> extends Object implements org.springframework.core.convert.converter.GenericConverter
Converter to create Association instances from either Identifier primitives or Identifier instances themselves.
Author:
Oliver Drotbohm
  • 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 org.jmolecules.ddd.types.Association<?,?> convert(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