Package org.jmolecules.spring.jpa
Class JpaAssociationAttributeConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier,S>
java.lang.Object
org.jmolecules.spring.jpa.JpaAssociationAttributeConverter<T,ID,S>
- All Implemented Interfaces:
javax.persistence.AttributeConverter<org.jmolecules.ddd.types.Association<T,ID>, S>
public class JpaAssociationAttributeConverter<T extends org.jmolecules.ddd.types.AggregateRoot<T,ID>,ID extends org.jmolecules.ddd.types.Identifier,S>
extends Object
implements javax.persistence.AttributeConverter<org.jmolecules.ddd.types.Association<T,ID>,S>
JPA flavor of
AssociationAttributeConverter.- Author:
- Oliver Drotbohm
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.core.convert.TypeDescriptorprotected static org.springframework.core.convert.TypeDescriptorprotected final PrimitivesToAssociationConverter<?>protected final AssociationToPrimitivesConverter<?> -
Constructor Summary
ConstructorsConstructorDescriptionJpaAssociationAttributeConverter(Class<ID> idType) Creates a newJpaAssociationAttributeConverterfor the given id type. -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn(org.jmolecules.ddd.types.Association<T, ID> attribute) convertToEntityAttribute(S dbData)
-
Field Details
-
OBJECT_TYPE_DESCRIPTOR
protected static org.springframework.core.convert.TypeDescriptor OBJECT_TYPE_DESCRIPTOR -
toAssociation
-
toPrimitive
-
idTypeDescriptor
protected final org.springframework.core.convert.TypeDescriptor idTypeDescriptor
-
-
Constructor Details
-
JpaAssociationAttributeConverter
Creates a newJpaAssociationAttributeConverterfor the given id type.- Parameters:
idType- must not be null.
-
-
Method Details
-
convertToDatabaseColumn
-
convertToEntityAttribute
-