[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[dali-dev] API changes for derived id work
|
Hello all,
With respect to the changes I'm making to core functionality to support
the new JPA 2.0 derived id functionality, I have made some API changes
to core code.
I have removed the distinction between "mapping" and "supporting"
annotations in the resource model. All context model type/attribute
mappings still know what annotations are "supporting" the main mapping
annotation, but the resource model is blissfully ignorant.
API changed:
org.eclipse.jpt.core.JpaAnnotationDefinitionProvider
typeMapping/SupportingAnnotationDefinitions() ->
typeAnnotationDefinitions()
attributeMapping/SupportingAnnotationDefinitions() ->
attributeAnnotationDefinitions()
org.eclipse.jpt.core.JpaAnnotationProvider
typeMapping/SupportingAnnotationNames() -> typeAnnotationNames()
buildTypeMapping/SupportingAnnotation(..) -> buildTypeAnnotation(..)
buildNullTypeSupportingAnnotation(..) -> buildNullTypeAnnotation(..)
attributeMapping/SupportingAnnotationNames() ->
attributeAnnotationNames()
buildAttributeMapping/SupportingAnnotation(..) ->
buildAttributeAnnotation(..)
buildNullAttributeMapping/SupportingAnnotation(..) ->
buildNullAttributeAnnotation(..)
org.eclipse.jpt.core.JpaPlatform
In JpaPlatform, I changed the API to return type (and attribute,
previously) mapping providers rather than having the platform build them
itself.
buildJavaTypeMappingFromAnnotation/MappingKey(..) ->
getJavaTypeMappingProvider(JavaPersistentType persistentType -or- String
mappingKey)
org.eclipse.jpt.core.context.java.JavaAttributeMappingProvider
defaultApplies(..) -> testDefault(..)
specifiedApplies(..) -> testSpecified(..)
org.eclipse.jpt.core.context.java.JavaTypeMappingProvider
added boolean test(..) for determining if a type mapping provider
applies to a JavaPersistentType
org.eclipse.jpt.core.context.java.JavaPersistentType
hasAnyAttributePersistenceAnnotations() -> hasAnyAnnotatedAttributes()
org.eclipse.jpt.core.context.java.JavaTypeMapping
correspondingAnnotationNames() -> supportingAnnotationNames()
org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember
Most of the changes are here, collapsing "mapping" annotations and
"supporting" annotations into just annotations.
MAPPING/SUPPORTING_ANNOTATIONS_COLLECTION -> ANNOTATIONS_COLLECTION
mapping/supportingAnnotations() -> annotations()
mapping/supportingAnnotatinsSize() -> annotationsSize()
addMapping/SupportingAnnotation(..) -> addAnnotation(..)
getMapping/SupportingAnnotation(..) -> getAnnotation(..)
moveSupportingAnnotation(..) -> moveAnnotation(..)
removeMapping/SupportingAnnotation(..) -> removeAnnotation(..)
removed getMappingAnnotation() as determining what annotation
takes precedence is now done by the mapping providers
isPersisted() -> isAnnotated() (as there is no "mapping" annotation
at this level, we can just determine whether or not a member is
annotated with something we recognize)
setMappingAnnotation(String annotationName) ->
setPrimaryAnnotation(String primaryAnnotation, String[]
supportingAnnotations) This new method is used when changing mapping
types (or something similar). The supporting annotations, if any, are
retained on the member, and all other recognized annotations are removed.
org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute
getNullMappingAnnotation(..) -> getNullAnnotation(..)
removed boolean hasAnyPersistenceAnnotations() (use
JavaResourcePersistentMember.isAnnotated() instead)
org.eclipse.jpt.core.resource.java.JavaResourcePersistentType
hasAnyAttributePersistenceAnnotations() -> hasAnyAnnotatedAttributes()
The rest of the associated changes are to implementations/extensions of
these interfaces/classes or to internal classes. If there are any
questions or problems, please feel free to let me know.
Thanks,
Paul
--
Paul Fullbright
Eclipse Java Persistence Tools (Dali) Development
Oracle