db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Jefferson (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JDO-615) MetaData specification API
Date Sun, 07 Dec 2008 18:59:44 GMT

     [ https://issues.apache.org/jira/browse/JDO-615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andy Jefferson updated JDO-615:
-------------------------------

    Attachment: jdometadata-6.patch

javax.jdo.metadata package has been commited to SVN (trunk). 
This patch is for the PMF methods - not committed since that will break compilation where
the implementation doesn't yet have these methods. Uses newXXX instead of setXXX for single-valued
props. Have followed java beans pattern for most, with the exception of boolean fields that
have a default, so cannot be "unset". Maybe some attributes have been missed off - left as
an exercise to the reader :-)

I don't see much point in methods like newField() - nothing in our use-cases require a FieldMetadata
when we don't have the name of the field.

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


Mime
View raw message