[ 
https://issues.apache.org/jira/browse/JDO-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652840#action_12652840
 ] 

Craig Russell commented on JDO-615:
-----------------------------------

> If you create JDOMetaData via JDOHelper then how is JDOHelper to know what 
> the implementation of JDOMetaData is that it should create? (Could be done 
> via META-INF/services entry). 

Right. So maybe the JDOMetadata factory method belongs on 
PersistenceManagerFactory.

> 6. Updated MetaDataManager to fit above (still has creator for JDOMetaData 
> currently but this could move to JDOHelper at some stage)

If you have newXXX methods you don't need a MetadataManager at all.

One more "big" thing. Metadata shouldn't be camel case. It's a real word, not 
two words that need a camel in the middle. See 
http://en.wikipedia.org/wiki/Metadata. So I'd really prefer lower-casing the 
"d". (Note how hard it is to remember the capital "s" in DataStore?)

> 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-4.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.

Reply via email to