[
https://issues.apache.org/jira/browse/JDO-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653699#action_12653699
]
Andy Jefferson commented on JDO-615:
------------------------------------
> InterfaceMetadata extends both Metadata and ComponentMetadata. But
Good catch.
> ComponentMetadata might include get/setPersistenceModifier since presumably
> this applies to interfaces as well.
Not in the DTD it doesn't. Not sure what a "persistence-aware" persistent
interface would be :-S
> There are several cases of setXXX that take [...] Then there's no need for
> setParent either.
setParent was a hangover from before adding the newXXX, and can go.
setXXX used to distinguish the single-valued child components from
multiple-valued child components (newXXX); naming issue. Since some are
single-valued I used setXXX since more like a bean property.
> SequenceMetaData
Yes, inconsistent.
Re: priority order.
My use-case that originated this is for classes where there is no file-based
metadata. Consequently I've no problem with the wording being around that, so a
user can define metadata for a class that has no existing metadata. As a
result, a call to pmf.registerMetadata() with something that tries to redefine
a class that already has registered metadata would result in a JDOUserException.
> MetaData specification API
> --------------------------
>
> Key: JDO-615
> URL: https://issues.apache.org/jira/browse/JDO-615
> Project: JDO
> Issue Type: New Feature
> Reporter: Andy Jefferson
> Fix For: JDO 2 maintenance release 3
>
> Attachments: jdometadata-5.patch
>
>
> We can specify MetaData via XML or annotations. The only way missing is via
> an API. I propose mirroring the XML structure with interfaces of the form
> public interface MetaData
> {
> addExtension(String key, String value);
> removeExtension(String key, String value);
> ...
> }
> public interface FileMetaData
> {
> addPackage(PackageMetaData pmd);
> ...
> }
> public interface PackageMetaData
> {
> addClass(ClassMetaData cmd)
> ...
> }
> public interface ClassMetaData
> {
> addField(FieldMetaData fmd)
> ...
> }
> public interface FieldMetaData
> {
> setInheritance(InheritanceMetaData inhmd)
> ...
> }
> and so on.
> We would then require a method on the PMF to register the metadata.
> If there are no objections to such a feature I'll propose a patch to try to
> provide all current JDO2 capabilities.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.