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

Michael Bouschen updated JDO-615:
---------------------------------

    Attachment: BooleanProperties.patch

I agree to add the PMF changes later.

About the boolean properties: 
I think the rule is, the getter method returns a Boolean for a property that 
does not have a default. The method returns null if the property has not been 
set. The getter method returns a boolean (primitive type) if the property has a 
default, then the property always has a value. I found two cases where I 
propose to change the return type (as part of the exercise :-): 
- FetchGroupMetadata: Boolean getPostLoad();
- IndexMetadata: boolean getUnique();
The attached patch BooleanProperties.patch changes the above signatures.

About the newXXX method w/o arguments:
I agree to not add these methods, because it would bloat the interfaces. 
However, I think it should be legal to pass null when constructing the 
instances as along as the required values are defined when the metadata is 
registered (using method registerMetadata).

> 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: BooleanProperties.patch, 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.

Reply via email to