jakarta.persistence style
annotations to the DefaultRecordMapper.
Starting with jOOQ 3.20 and https://github.com/jOOQ/jOOQ/issues/16500,
the
invalid reference
jakarta.persistence.ColumnjOOQ-jpa-extensions
module, to allow for:
- Removal of the dependency on the
jakarta.persistencemodule from the core library - Maintenance of backwards compatibility for those users using the annotation
Implementations can be provided to
Configuration.annotatedPojoMemberProvider().
This SPI is internal and should not be implemented, as it might change
incompatibly in the future. Instead, use the default implementation provided
by the jOOQ-jpa-extensions module.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescriptiongetGetters(Class<?> type, String name) Get a POJO's annotated getters for a given column name.getMembers(Class<?> type, String name) Get a POJO's annotated members for a given column name.getSetters(Class<?> type, String name) Get a POJO's annotated setters for a given column name.booleanhasAnnotations(Class<?> type) Check whether a type has any annotated members.
-
Method Details
-
hasAnnotations
Check whether a type has any annotated members.- Parameters:
type- The POJO type.- Returns:
- Whether it has annotated members.
-
getMembers
Get a POJO's annotated members for a given column name.If multiple members match for a given type and column name, then:
- The
DefaultRecordMapperwill project the column value onto all members and allgetSetters(Class, String). - The
DefaultRecordUnmapperwill read the column value from the first member, giving preference togetGetters(Class, String).
- Parameters:
type- The POJO type.name- The column name.- Returns:
- The list of members that match.
- The
-
getGetters
Get a POJO's annotated getters for a given column name.If multiple getters match for a given type and column name, then the
DefaultRecordUnmapperwill read the column value from the first getter.- Parameters:
type- The POJO type.name- The column name.- Returns:
- The list of getters that match.
-
getSetters
Get a POJO's annotated setters for a given column name.If multiple setters match for a given type and column name, then the
DefaultRecordMapperwill write the column value to all the setters.- Parameters:
type- The POJO type.name- The column name.- Returns:
- The list of setters that match.
-