Class JakartaPersistenceAssociationAttributeConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier,S>

java.lang.Object
org.jmolecules.spring.jpa.JakartaPersistenceAssociationAttributeConverter<T,ID,S>
All Implemented Interfaces:
jakarta.persistence.AttributeConverter<org.jmolecules.ddd.types.Association<T,ID>,S>

public class JakartaPersistenceAssociationAttributeConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier,S> extends Object implements jakarta.persistence.AttributeConverter<org.jmolecules.ddd.types.Association<T,ID>,S>
Jakarta Persistence 3.0 flavor of the AssociationAttributeConverter.
Author:
Oliver Drotbohm
  • Field Details

    • OBJECT_TYPE_DESCRIPTOR

      protected static org.springframework.core.convert.TypeDescriptor OBJECT_TYPE_DESCRIPTOR
    • toAssociation

      protected final PrimitivesToAssociationConverter<?> toAssociation
    • toPrimitive

      protected final AssociationToPrimitivesConverter<?> toPrimitive
    • idTypeDescriptor

      protected final org.springframework.core.convert.TypeDescriptor idTypeDescriptor
  • Constructor Details

  • Method Details

    • convertToDatabaseColumn

      public S convertToDatabaseColumn(org.jmolecules.ddd.types.Association<T,ID> attribute)
      Specified by:
      convertToDatabaseColumn in interface jakarta.persistence.AttributeConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier>
    • convertToEntityAttribute

      public org.jmolecules.ddd.types.Association<T,ID> convertToEntityAttribute(S dbData)
      Specified by:
      convertToEntityAttribute in interface jakarta.persistence.AttributeConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier>