db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r169816 - in /incubator/jdo/trunk/ri11/src/java/org/apache/jdo: impl/enhancer/meta/model/ impl/model/java/ impl/model/java/runtime/ impl/model/jdo/ impl/model/jdo/caching/ impl/model/jdo/xml/ model/jdo/
Date Thu, 12 May 2005 13:26:44 GMT
Author: mbo
Date: Thu May 12 06:26:44 2005
New Revision: 169816

URL: http://svn.apache.org/viewcvs?rev=169816&view=rev
Log:
Add JDOClass.getManagedFieldCount and support for setting the default value of the JDOModel flag loadXMLMetadata

Added:
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/Bundle.properties
Modified:
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/enhancer/meta/model/EnhancerMetaDataJDOModelImpl.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/AbstractJavaModelFactory.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/Bundle.properties
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/RuntimeJavaModelFactory.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOClassImplDynamic.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelFactoryImplDynamic.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelImplDynamic.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelFactoryImplCaching.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelImplCaching.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/JDOHandlerImpl.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/XMLExists.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOClass.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.java
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.jpg
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.mdl
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModelFactory.java

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/enhancer/meta/model/EnhancerMetaDataJDOModelImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/enhancer/meta/model/EnhancerMetaDataJDOModelImpl.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/enhancer/meta/model/EnhancerMetaDataJDOModelImpl.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/enhancer/meta/model/EnhancerMetaDataJDOModelImpl.java Thu May 12 06:26:44 2005
@@ -143,7 +143,7 @@
             javaModel = new EnhancerJavaModel(classLoader, locator);
             final JDOModelFactory factory = JDOModelFactoryImplCaching.getInstance();
             affirm(factory != null);
-            jdoModel = factory.createJDOModel(javaModel);
+            jdoModel = factory.getJDOModel(javaModel);
             affirm(jdoModel != null);
             javaModel.setJDOModel(jdoModel);
             serializableJavaType = javaModel.getJavaType("java.io.Serializable");

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/AbstractJavaModelFactory.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/AbstractJavaModelFactory.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/AbstractJavaModelFactory.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/AbstractJavaModelFactory.java Thu May 12 06:26:44 2005
@@ -104,11 +104,6 @@
                 try {
                     javaModel = createJavaModel(key);
                     modelCache.put(key, javaModel);
-                    // get the corresponding JDOModel
-                    JDOModel jdoModel = 
-                        getJDOModelFactory().getJDOModel(javaModel);
-                    // update the JDOModel property of the JavaModel
-                    javaModel.setJDOModel(jdoModel);
                 }
                 catch (ModelException ex) {
                     throw new ModelFatalException(
@@ -146,16 +141,5 @@
             "getJavaType")); //NOI18N
     }
     
-    //========= Internal helper methods ==========
-    
-    /**
-     * Returns the JDOModelFactory instance used to get/create JDOModel 
-     * instances.
-     * @return JDOModelFactory instance.
-     */
-    protected JDOModelFactory getJDOModelFactory()
-    {
-        return JDOModelFactoryImplDynamic.getInstance();
-    }
 }
 

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/Bundle.properties
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/Bundle.properties?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/Bundle.properties (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/Bundle.properties Thu May 12 06:26:44 2005
@@ -35,7 +35,7 @@
 ERR_InvalidNullClassInstance={0}: specified Class instance is null.
 
 #
-# ReflectionJavaField
+# BaseReflectionJavaField
 #
 # {0} - class name
 EXC_CannotGetDeclaredField=A SecurityException was thrown when trying to \
@@ -43,6 +43,9 @@
 java.lang.RuntimePermission("accessDeclaredMembers") to the codeBase \
 containing the JDO Reference Implementation (jdori.jar).
 
+#NOI18N
+ERR_MissingFieldInstance={0}: cannot find reflection field instance for field {1}.
+
 #
 # AbstractJavaModelFactory
 #
@@ -51,54 +54,3 @@
 # {1} - method name
 EXC_MethodNotSupported=Class {0} does not support method {1}.
 
-EXC_CannotCreateJavaModel=Problems during JavaModel creation.
-
-#
-# ReflectionJavaField
-#
-#NOI18N
-ERR_MissingFieldInstance={0}: cannot find reflection field instance for field {1}.
-
-
-#
-# RuntimeJavaModelFactory
-#
-
-EXC_CannotGetJDOImplHelper=A SecurityException was thrown when trying to get \
-the singleton JDOImplHelper instance. In order to get runtime metadata, you \
-must grant javax.jdo.spi.JDOPermission("getMetadata") to the codeBases \
-containing the JDO Reference Implementation (jdo.jar and jdori.jar).
-
-EXC_CannotGetRuntimeJavaModelFactory=A SecurityException was thrown when trying \
-to get the singleton RuntimeJavaModelFactory instance. In order to get runtime \
-metadata, you must grant javax.jdo.spi.JDOPermission("getMetadata") to the \
-codeBases containing the JDO Reference Implementation (jdo.jar and jdori.jar).
-
-# {0} - class instance
-EXC_CannotGetClassLoader=A SecurityException was thrown when trying to get the \
-class loader of class instance ''{0}''. In order to get runtime metadata, you \
-must grant ReflectPermission("getClassLoader") to the codeBase containing the \
-JDO Reference Implementation (jdori.jar).
-
-# {0} - key instance
-EXC_InvalidJavaModelKey=Invalid key for runtime JavaModel lookup: \
-expected ''java.lang.ClassLoader'' instance, found ''{0}'' instance.
-
-# {0} - type description instance
-EXC_InvalidTypeDesc=Invalid type description for runtime JavaType lookup: \
-expected ''java.lang.Class'' instance, found ''{0}'' instance.
-
-# {0} - JavaType instance
-EXC_InvalidJavaType=Invalid JavaType instance for getJavaClass method: \
-expected ''org.apache.jdo.impl.model.java.ReflectionJavaType'' instance, \
-found ''{0}'' instance.
-
-#
-# RuntimeJavaType
-#
-
-# {0} - error location (class.method)
-# {1} - implementation method name
-# {2} - field name
-#NOI18N
-ERR_MultipleJavaField={0}: multiple JavaField ''{1}'' for class '{2}''.

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/Bundle.properties
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/Bundle.properties?rev=169816&view=auto
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/Bundle.properties (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/Bundle.properties Thu May 12 06:26:44 2005
@@ -0,0 +1,73 @@
+#
+# Copyright 2005 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at 
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software 
+# distributed under the License is distributed on an "AS IS" BASIS, 
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+# See the License for the specific language governing permissions and 
+# limitations under the License.
+
+#
+# Generic messages
+#
+
+# {0} - location (class.method)
+#NOI18N
+ERR_InvalidNullFieldInstance={0}: specified Field instance is null.
+
+
+# {0} - class name
+# {1} - detailed message of the cause
+EXC_ClassLoadingError=Error during loading of class ''{0}'': {1}.
+
+#
+# RuntimeJavaModelFactory
+#
+
+EXC_CannotGetJDOImplHelper=A SecurityException was thrown when trying to get \
+the singleton JDOImplHelper instance. In order to get runtime metadata, you \
+must grant javax.jdo.spi.JDOPermission("getMetadata") to the codeBases \
+containing the JDO Reference Implementation (jdo.jar and jdori.jar).
+
+EXC_CannotGetRuntimeJavaModelFactory=A SecurityException was thrown when trying \
+to get the singleton RuntimeJavaModelFactory instance. In order to get runtime \
+metadata, you must grant javax.jdo.spi.JDOPermission("getMetadata") to the \
+codeBases containing the JDO Reference Implementation (jdo.jar and jdori.jar).
+
+# {0} - class instance
+EXC_CannotGetClassLoader=A SecurityException was thrown when trying to get the \
+class loader of class instance ''{0}''. In order to get runtime metadata, you \
+must grant ReflectPermission("getClassLoader") to the codeBase containing the \
+JDO Reference Implementation (jdori.jar).
+
+# {0} - key instance
+EXC_InvalidJavaModelKey=Invalid key for runtime JavaModel lookup: \
+expected ''java.lang.ClassLoader'' instance, found ''{0}'' instance.
+
+# {0} - type description instance
+EXC_InvalidTypeDesc=Invalid type description for runtime JavaType lookup: \
+expected ''java.lang.Class'' instance, found ''{0}'' instance.
+
+# {0} - JavaType instance
+EXC_InvalidJavaType=Invalid JavaType instance for getJavaClass method: \
+expected ''org.apache.jdo.impl.model.java.ReflectionJavaType'' instance, \
+found ''{0}'' instance.
+
+#NOI18N
+ERR_CannotSetJDOModel=Cannot set JDOModel for JavaModel instance.
+
+#
+# RuntimeJavaType
+#
+
+# {0} - error location (class.method)
+# {1} - implementation method name
+# {2} - field name
+#NOI18N
+ERR_MultipleJavaField={0}: multiple JavaField ''{1}'' for class '{2}''.

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/RuntimeJavaModelFactory.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/RuntimeJavaModelFactory.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/RuntimeJavaModelFactory.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/java/runtime/RuntimeJavaModelFactory.java Thu May 12 06:26:44 2005
@@ -29,6 +29,7 @@
 import org.apache.jdo.model.java.JavaModelFactory;
 import org.apache.jdo.model.java.JavaType;
 import org.apache.jdo.model.jdo.JDOModelFactory;
+import org.apache.jdo.model.jdo.JDOModel;
 import org.apache.jdo.impl.model.java.AbstractJavaModelFactory;
 import org.apache.jdo.impl.model.java.BaseReflectionJavaType;
 import org.apache.jdo.impl.model.jdo.caching.JDOModelFactoryImplCaching;
@@ -59,7 +60,7 @@
 
     /** I18N support */
     private final static I18NHelper msg =  
-        I18NHelper.getInstance("org.apache.jdo.impl.model.java.Bundle"); //NOI18N
+        I18NHelper.getInstance("org.apache.jdo.impl.model.java.runtime.Bundle"); //NOI18N
 
     /** */
     static
@@ -163,6 +164,10 @@
                 // ignore => parentClassLoader and parent JavaModel are null
             }
         }
+
+        // set the JDOModel property in JavaModel
+        setJDOModelInternal(javaModel);
+
         return javaModel;
     }
 
@@ -266,12 +271,20 @@
     //========= Internal helper methods ==========
     
     /**
-     * Returns the JDOModelFactory instance used to get/create JDOModel 
-     * instances.
-     * @return JDOModelFactory instance.
+     * Sets the JDOModel instance for the specified JavaModel.
+     * @param javaModel the JavaModel
      */
-    protected JDOModelFactory getJDOModelFactory()
+    protected void setJDOModelInternal(JavaModel javaModel)
     {
-        return JDOModelFactoryImplCaching.getInstance();
+        JDOModelFactory factory = JDOModelFactoryImplCaching.getInstance();
+        JDOModel jdoModel = factory.getJDOModel(javaModel);
+        // update the JDOModel property of the JavaModel
+        try {
+            javaModel.setJDOModel(jdoModel);
+        }
+        catch (ModelException ex) {
+            throw new ModelFatalException("ERR_CannotSetJDOModel", ex); //NOI18N
+        }
     }
 }
+

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOClassImplDynamic.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOClassImplDynamic.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOClassImplDynamic.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOClassImplDynamic.java Thu May 12 06:26:44 2005
@@ -96,7 +96,7 @@
     private JDOPackage jdoPackage;
 
     /** Flag indicating whether XML metadata is processed already. */
-    private boolean xmlProcessed = false;
+    private boolean xmlMetadataLoaded = false;
 
     /** I18N support */
     protected final static I18NHelper msg =  
@@ -305,6 +305,24 @@
     }
 
     /** 
+     * Determines whether the XML metadata for the class represented by this
+     * JDOClass has been loaded. 
+     * @return <code>true</code> if XML metadata is loaded;
+     * <code>false</code> otherwise
+     */
+    public boolean isXMLMetadataLoaded() {
+        return xmlMetadataLoaded;
+    }
+
+    /**
+     * Sets the flag indicating that the class XML metadata for this
+     * JDOClass is loaded to <code>true</code>.
+     */
+    public void setXMLMetadataLoaded() {
+        this.xmlMetadataLoaded = true;
+    }
+
+    /** 
      * Remove the supplied member from the collection of members maintained by
      * this JDOClass.
      * @param member the member to be removed
@@ -914,18 +932,18 @@
     }
 
     /**
-     * Returns the number of managed fields declared in this class.  
-     * This does not include inherited fields.
-     * @return number of declared fields in the Class represented by this 
-     * JDOClass
+     * Returns the number of managed fields declared in the class represented
+     * by this JDOClass. This does not include inherited fields.
+     * @return number of declared managed fields
      */
     public int getDeclaredManagedFieldCount() {
         return getDeclaredManagedFields().length;
     }
     
     /**
-     * Returns the number of inherited managed fields for this class.  
-     * @return number of inherited fields
+     * Returns the number of inherited managed fields for the class
+     * represented by this JDOClass.
+     * @return number of inherited managed fields
      */
     public int getInheritedManagedFieldCount() {
         int count = 0;
@@ -940,6 +958,17 @@
     }
     
     /**
+     * Returns the number of managed fields for the class represented by this
+     * JDOClass. The value returned by this method is equal to
+     * <code>getDeclaredManagedFieldCount() +
+     * getInheritedManagedFieldCount()</code>.
+     * @return number of managed fields
+     */
+    public int getManagedFieldCount() {
+        return getDeclaredManagedFieldCount() + getInheritedManagedFieldCount();
+    }
+    
+    /**
      * Returns the package name including a terminating dot if this class has a 
      * package. The method returns the empty string if this class is in the 
      * default package.
@@ -968,28 +997,6 @@
         }
     }
     
-    //========= Helper methods used by JDOModelImpl/XML reader only ==========
-
-    /** 
-     * Determines whether the class represented by this JDOClass is activated. 
-     * A class is activated, if the class XML metadata is processed for this 
-     * JDOClass. 
-     * @return <code>true</code> if XML metadata is processed;
-     * <code>false</code> otherwise
-     */
-    public boolean isXMLProcessed() {
-        return xmlProcessed;
-    }
-
-    /**
-     * Sets the flag indicating that the class XML metadata for this
-     * JDOClass is processed to <code>true</code>.
-     */
-    public void setXMLProcessed() {
-        this.xmlProcessed = true;
-    }
-
-
     //========= Internal helper methods ==========
     
     /**

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelFactoryImplDynamic.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelFactoryImplDynamic.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelFactoryImplDynamic.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelFactoryImplDynamic.java Thu May 12 06:26:44 2005
@@ -65,25 +65,47 @@
     
     /**
      * Creates a new empty JDOModel instance.
+     * The returned JDOModel instance uses the specified flag
+     * <code>loadXMLMetadataDefault</code> to set the default value for the
+     * flag <code>loadXMLMetadata</code> used by the JDOModel methods
+     * createJDOClass and setJDOClass. 
+     * @param loadXMLMetadataDefault the default setting for the flag
+     * loadXMLMetadata.
      */
-    public JDOModel createJDOModel(JavaModel javaModel) {
-        return new JDOModelImplDynamic(javaModel);
+    public JDOModel createJDOModel(JavaModel javaModel,
+                                   boolean loadXMLMetadataDefault) {
+        return new JDOModelImplDynamic(javaModel, loadXMLMetadataDefault);
     }
     
     /**
-     * Returns the JDOModel instance for the specified key.
-     * @param javaModel the javaModel used to cache the returned JDOModel instance
+     * Returns the JDOModel instance for the specified JavaModel.
+     * @param javaModel the javaModel used to cache the returned JDOModel
+     * instance.
      */
     public JDOModel getJDOModel(JavaModel javaModel) {
+        return getJDOModel(javaModel, true);
+    }
+
+    /**
+     * Returns the JDOModel instance for the specified JavaModel.  
+     * The returned JDOModel instance uses the specified flag
+     * <code>loadXMLMetadataDefault</code> to set the default value for the
+     * flag <code>loadXMLMetadata</code> used by the JDOModel methods
+     * createJDOClass and setJDOClass. 
+     * @param loadXMLMetadataDefault the default setting for the flag
+     * loadXMLMetadata.
+     */
+    public JDOModel getJDOModel(JavaModel javaModel,
+                                boolean loadXMLMetadataDefault) {
         synchronized (this.modelCache) {
             JDOModel jdoModel = (JDOModel)modelCache.get(javaModel);
             if (jdoModel == null) {
                 // create new model and store it using the specified javaModel
-                jdoModel = createJDOModel(javaModel);
+                jdoModel = createJDOModel(javaModel, loadXMLMetadataDefault);
                 modelCache.put(javaModel, jdoModel);
             }
             return jdoModel;
         }
     }
-    
+
 }

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelImplDynamic.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelImplDynamic.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelImplDynamic.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/JDOModelImplDynamic.java Thu May 12 06:26:44 2005
@@ -111,6 +111,9 @@
 
     /** The JavaModel used to get type info. */
     private JavaModel javaModel;
+
+    /** The default for loadXMLMetadata. */ 
+    private final boolean loadXMLMetadataDefault;
     
     /** I18N support */
     protected final static I18NHelper msg =
@@ -128,9 +131,11 @@
      * Constructor. 
      * JDOModel instances are created using the JDOModelFactory only.
      */
-    protected JDOModelImplDynamic(JavaModel javaModel) {
+    protected JDOModelImplDynamic(
+        JavaModel javaModel, boolean loadXMLMetadataDefault) {
         super();
         setJavaModel(javaModel);
+        this.loadXMLMetadataDefault = loadXMLMetadataDefault;
     }
 
     /** 
@@ -184,15 +189,19 @@
      * the existing instance is returned. Otherwise, it creates a new JDOClass 
      * instance, sets its declaringModel and returns the new instance.
      * <p>
-     * Invoking this method is method is equivalent to 
-     * <code>createJDOClass(className, true)</code>.
+     * This method delegates to the createJDOModel method taking the flag
+     * <code>loadXMLMetadata</code> and passes the default value as specified
+     * at JDOModel creation time (see flag <code>loadXMLMetadataDefault</code>
+     * in {@link JDOModelFactory#getJDOModel(JavaModel javaModel, boolean
+     * loadXMLMetadataDefault)}). Invoking this method is method is equivalent
+     * to <code>createJDOClass(className, loadXMLMetadataDefault)</code>.
      * @param className the fully qualified class name of the JDOClass instance 
      * to be returned
      * @return a JDOClass instance for the specified class name
      * @exception ModelException if impossible
      */
     public JDOClass createJDOClass(String className) throws ModelException {
-        return createJDOClass(className, true);
+        return createJDOClass(className, loadXMLMetadataDefault);
     }
 
     /**
@@ -232,15 +241,19 @@
      * qualified class name if present. The method returns <code>null</code> 
      * if it cannot find a JDOClass instance for the specified name. 
      * <p>
-     * Invoking this method is equivalent to 
-     * <code>getJDOClass(className, true)</code>.
+     * This method delegates to the getJDOModel method taking the flag
+     * <code>loadXMLMetadata</code> and passes the default value as specified
+     * at JDOModel creation time (see flag <code>loadXMLMetadataDefault</code>
+     * in {@link JDOModelFactory#getJDOModel(JavaModel javaModel, boolean
+     * loadXMLMetadataDefault)}). Invoking this method is method is equivalent
+     * to <code>createJDOClass(className, loadXMLMetadataDefault)</code>.
      * @param className the fully qualified class name of the JDOClass instance 
      * to be returned
      * @return a JDOClass instance for the specified class name 
      * or <code>null</code> if not present
      */
     public JDOClass getJDOClass(String className) {
-        return getJDOClass(className, true);
+        return getJDOClass(className, loadXMLMetadataDefault);
     }
     
     /**
@@ -278,7 +291,7 @@
         if (loadXMLMetadata) {
             if (jdoClass == null)
                 jdoClass = lookupXMLMetadata(className);
-            else if (!isXMLProcessed(jdoClass))
+            else if (!jdoClass.isXMLMetadataLoaded())
                 jdoClass = lookupXMLMetadata(jdoClass);
 
             if (jdoClass == null) {
@@ -356,7 +369,7 @@
             try {
                 for (Iterator i = jdoClasses.values().iterator(); i.hasNext();) {
                     JDOClass next = (JDOClass)i.next();
-                    if (isXMLProcessed(next)) {
+                    if (next.isXMLMetadataLoaded()) {
                         // XML metadata is loaded => check the objectIdClass
                         if (objectIdClassName.equals(
                                 next.getDeclaredObjectIdClassName())) {
@@ -430,19 +443,6 @@
      * @param className the name of the non-pc class
      */
     protected void knownNonPC(String className) {
-    }
-
-    /** 
-     * Return true if the specified JDOClass is activated. 
-     * A class is activated, if the class XML metadata is processed
-     * for this JDOClass. 
-     * @return <code>true</code> if XML metadata is processed;
-     * <code>false</code> otherwise
-     */
-    private boolean isXMLProcessed(JDOClass jdoClass) {
-        if (jdoClass instanceof JDOClassImplDynamic)
-            return ((JDOClassImplDynamic)jdoClass).isXMLProcessed();
-        return false;
     }
 
     /**

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelFactoryImplCaching.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelFactoryImplCaching.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelFactoryImplCaching.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelFactoryImplCaching.java Thu May 12 06:26:44 2005
@@ -52,9 +52,16 @@
     
     /**
      * Creates a new empty JDOModel instance.
+     * The returned JDOModel instance uses the specified flag
+     * <code>loadXMLMetadataDefault</code> to set the default value for the
+     * flag <code>loadXMLMetadata</code> used by the JDOModel methods
+     * createJDOClass and setJDOClass. 
+     * @param loadXMLMetadataDefault the default setting for the flag
+     * loadXMLMetadata.
      */
-    public JDOModel createJDOModel(JavaModel javaModel) {
-        return new JDOModelImplCaching(javaModel);
+    public JDOModel createJDOModel(JavaModel javaModel,
+                                   boolean loadXMLMetadataDefault) {
+        return new JDOModelImplCaching(javaModel, loadXMLMetadataDefault);
     }
-    
+
 }

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelImplCaching.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelImplCaching.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelImplCaching.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/caching/JDOModelImplCaching.java Thu May 12 06:26:44 2005
@@ -62,8 +62,9 @@
      * Constructor. 
      * JDOModel instances are created using the JDOModelFactory only.
      */
-    protected JDOModelImplCaching(JavaModel javaModel) {
-        super(javaModel);
+    protected JDOModelImplCaching(JavaModel javaModel, 
+                                  boolean loadXMLMetadataDefault) {
+        super(javaModel, loadXMLMetadataDefault);
     }
 
     /**

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/JDOHandlerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/JDOHandlerImpl.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/JDOHandlerImpl.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/JDOHandlerImpl.java Thu May 12 06:26:44 2005
@@ -74,8 +74,8 @@
 
     /** I18N support. */
     private static final I18NHelper msg = I18NHelper.getInstance(
-        "org.apache.jdo.impl.model.jdo.Bundle", 
-        JDOHandlerImpl.class.getClassLoader()); //NOI18N
+        "org.apache.jdo.impl.model.jdo.Bundle", //NOI18N
+        JDOHandlerImpl.class.getClassLoader());
 
     /** Logger */
     private static Log logger = LogFactory.getFactory().getInstance(
@@ -177,7 +177,7 @@
             if ((packageName != null) && (packageName.length() > 0))
                 className = packageName + "." + className; //NOI18N
             jdoClass = model.createJDOClass(className, false);
-            skipXMLElements = isXMLProcessed(jdoClass);
+            skipXMLElements = jdoClass.isXMLMetadataLoaded();
             if (skipXMLElements) {
                 if (trace)
                     logger.trace(
@@ -251,8 +251,8 @@
         else {
             // remove JDOClass fom context stack
             JDOClass jdoClass = (JDOClass)context.pop();
-            // set jdoClass' xmlProcessed flag
-            setXMLProcessed(jdoClass);
+            // set jdoClass' xmlMetadataLoaded flag
+            jdoClass.setXMLMetadataLoaded();
         }
     }
     
@@ -613,17 +613,4 @@
         return handledJDOClasses;
     }
 
-    /** */
-    private boolean isXMLProcessed(JDOClass jdoClass) {
-        if (jdoClass instanceof JDOClassImplDynamic)
-            return ((JDOClassImplDynamic)jdoClass).isXMLProcessed();
-        return false;
-    }
-
-    /** */
-    private void setXMLProcessed(JDOClass jdoClass) {
-        if (jdoClass instanceof JDOClassImplDynamic)
-            ((JDOClassImplDynamic)jdoClass).setXMLProcessed();
-    }
-    
 }

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/XMLExists.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/XMLExists.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/XMLExists.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/impl/model/jdo/xml/XMLExists.java Thu May 12 06:26:44 2005
@@ -23,6 +23,7 @@
 import org.apache.jdo.impl.model.jdo.caching.JDOModelFactoryImplCaching;
 import org.apache.jdo.impl.model.jdo.util.PrintSupport;
 import org.apache.jdo.model.ModelException;
+import org.apache.jdo.model.ModelFatalException;
 import org.apache.jdo.model.java.JavaModel;
 import org.apache.jdo.model.jdo.JDOClass;
 import org.apache.jdo.model.jdo.JDOModel;
@@ -278,12 +279,28 @@
                 throw new ModelException("Invalid key " + key + 
                                          " expected ClassLoader");
             ClassLoader classLoader = (ClassLoader)key;
-            return new RuntimeJavaModel(classLoader); 
+            JavaModel javaModel = new RuntimeJavaModel(classLoader); 
+
+            // set the JDOModel property in JavaModel
+            setJDOModelInternal(javaModel);
+
+            return javaModel;
         }
         
-        /** */
-        protected JDOModelFactory getJDOModelFactory() {
-            return JDOModelFactoryImplCaching.getInstance();
+        /**
+         * Sets the JDOModel instance for the specified JavaModel.
+         * @param javaModel the JavaModel
+         */
+        protected void setJDOModelInternal(JavaModel javaModel) {
+            JDOModelFactory factory = JDOModelFactoryImplCaching.getInstance();
+            JDOModel jdoModel = factory.getJDOModel(javaModel);
+            // update the JDOModel property of the JavaModel
+            try {
+                javaModel.setJDOModel(jdoModel);
+            }
+            catch (ModelException ex) {
+                throw new ModelFatalException("Cannot set JDOModel", ex); //NOI18N
+            }
         }
     }
     

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOClass.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOClass.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOClass.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOClass.java Thu May 12 06:26:44 2005
@@ -152,6 +152,20 @@
         throws ModelException;
 
     /** 
+     * Determines whether the XML metadata for the class represented by this
+     * JDOClass has been loaded. 
+     * @return <code>true</code> if XML metadata is loaded;
+     * <code>false</code> otherwise
+     */
+    public boolean isXMLMetadataLoaded();
+
+    /**
+     * Sets the flag indicating that the class XML metadata for this
+     * JDOClass is loaded to <code>true</code>.
+     */
+    public void setXMLMetadataLoaded();
+
+    /** 
      * Remove the supplied member from the collection of members maintained by
      * this JDOClass.
      * @param member the member to be removed
@@ -457,18 +471,27 @@
     public JDOField getDeclaredField(String fieldName);
 
     /**
-     * Returns the number of managed fields declared in this class.  
-     * This does not include inherited fields.
-     * @return number of declared fields in the Class represented by this 
-     * JDOClass
+     * Returns the number of managed fields declared in the class represented
+     * by this JDOClass. This does not include inherited fields.
+     * @return number of declared managed fields
      */
     public int getDeclaredManagedFieldCount();
 
     /**
-     * Returns the number of inherited fields for this class.  
-     * @return number of inherited fields
+     * Returns the number of inherited managed fields for the class
+     * represented by this JDOClass.
+     * @return number of inherited managed fields
      */
     public int getInheritedManagedFieldCount();
+
+    /**
+     * Returns the number of managed fields for the class represented by this
+     * JDOClass. The value returned by this method is equal to
+     * <code>getDeclaredManagedFieldCount() +
+     * getInheritedManagedFieldCount()</code>.
+     * @return number of managed fields
+     */
+    public int getManagedFieldCount();
 
     /**
      * Returns the package name including a terminating dot if this class has a 

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.java Thu May 12 06:26:44 2005
@@ -70,8 +70,12 @@
      * the existing instance is returned. Otherwise, it creates a new JDOClass 
      * instance, sets its declaringModel and returns the new instance.
      * <p>
-     * Invoking this method is method is equivalent to 
-     * <code>createJDOClass(className, true)</code>.
+     * This method delegates to the createJDOModel method taking the flag
+     * <code>loadXMLMetadata</code> and passes the default value as specified
+     * at JDOModel creation time (see flag <code>loadXMLMetadataDefault</code>
+     * in {@link JDOModelFactory#getJDOModel(JavaModel javaModel, boolean
+     * loadXMLMetadataDefault)}). Invoking this method is method is equivalent
+     * to <code>createJDOClass(className, loadXMLMetadataDefault)</code>.
      * @param className the fully qualified class name of the JDOClass instance 
      * to be returned
      * @return a JDOClass instance for the specified class name
@@ -90,7 +94,7 @@
      * instance.
      * @param className the fully qualified class name of the JDOClass instance 
      * to be returned
-     * @param loadXMLMetadata indicated whether to read XML metatdata or not
+     * @param loadXMLMetadata indicates whether to read XML metatdata or not
      * @return a JDOClass instance for the specified class name
      * @exception ModelException if impossible
      */
@@ -102,8 +106,12 @@
      * qualified class name if present. The method returns <code>null</code> 
      * if it cannot find a JDOClass instance for the specified name. 
      * <p>
-     * Invoking this method is equivalent to 
-     * <code>getJDOClass(className, true)</code>.
+     * This method delegates to the getJDOModel method taking the flag
+     * <code>loadXMLMetadata</code> and passes the default value as specified
+     * at JDOModel creation time (see flag <code>loadXMLMetadataDefault</code>
+     * in {@link JDOModelFactory#getJDOModel(JavaModel javaModel, boolean
+     * loadXMLMetadataDefault)}). Invoking this method is method is equivalent
+     * to <code>createJDOClass(className, loadXMLMetadataDefault)</code>.
      * @param className the fully qualified class name of the JDOClass instance 
      * to be returned
      * @return a JDOClass instance for the specified class name 
@@ -119,7 +127,7 @@
      * JDOClass instance for the specified name.
      * @param className the fully qualified class name of the JDOClass instance 
      * to be returned
-     * @param loadXMLMetadata indicate whether to read XML metatdata or not
+     * @param loadXMLMetadata indicates whether to read XML metatdata or not
      * @return a JDOClass instance for the specified class name
      * or <code>null</code> if not present
      */

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.jpg
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.jpg?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.mdl
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.mdl?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.mdl (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModel.mdl Thu May 12 06:26:44 2005
@@ -810,6 +810,12 @@
 								concurrency 	"Sequential"
 								opExportControl 	"Public"
 								uid        	0)
+							    (object Operation "getManagedFieldCount"
+								quid       	"42832BC4029F"
+								result     	"int"
+								concurrency 	"Sequential"
+								opExportControl 	"Public"
+								uid        	0)
 							    (object Operation "getPackagePrefix"
 								quid       	"3B54430D0294"
 								result     	"String"
@@ -838,7 +844,10 @@
 								type       	"boolean")
 							    (object ClassAttribute "persistenceCapableSuperclassName"
 								quid       	"3B123FE70065"
-								type       	"String"))
+								type       	"String")
+							    (object ClassAttribute "XMLMetadataLoaded"
+								quid       	"42832C130196"
+								type       	"boolean"))
 							module     	"::JDOClass"
 							quidu      	"3A3786B80138"
 							language   	"Java")
@@ -1085,7 +1094,9 @@
 								quid       	"3B136D780231"
 								parameters 	(list Parameters
 								    (object Parameter "javaModel"
-									type       	"JavaModel"))
+									type       	"JavaModel")
+								    (object Parameter "loadXMLMetadataDefault"
+									type       	"boolean"))
 								result     	"JDOModel"
 								concurrency 	"Sequential"
 								opExportControl 	"Public"
@@ -1098,6 +1109,17 @@
 								result     	"JDOModel"
 								concurrency 	"Sequential"
 								opExportControl 	"Public"
+								uid        	0)
+							    (object Operation "getJDOModel"
+								quid       	"42832B15032C"
+								parameters 	(list Parameters
+								    (object Parameter "javaModel"
+									type       	"JavaModel")
+								    (object Parameter "loadXMLMetadataDefault"
+									type       	"boolean"))
+								result     	"JDOModel"
+								concurrency 	"Sequential"
+								opExportControl 	"Public"
 								uid        	0))
 							language   	"Java")
 						    (object Class "JDOMember"
@@ -1401,10 +1423,10 @@
 			IncludeAttribute 	TRUE
 			IncludeOperation 	TRUE
 			ShowOperationSignature 	TRUE
-			location   	(2400, 784)
+			location   	(2400, 832)
 			label      	(object ItemLabel
 			    Parent_View 	@8
-			    location   	(1900, 646)
+			    location   	(1900, 688)
 			    fill_color 	13434879
 			    nlines     	1
 			    max_width  	1000
@@ -1412,7 +1434,7 @@
 			    label      	"JDOElement")
 			stereotype 	(object ItemLabel
 			    Parent_View 	@8
-			    location   	(1900, 596)
+			    location   	(1900, 643)
 			    fill_color 	13434879
 			    anchor     	10
 			    nlines     	1
@@ -1426,7 +1448,7 @@
 			quidu      	"3B0A8D7C02FA"
 			compartment 	(object Compartment
 			    Parent_View 	@8
-			    location   	(1900, 701)
+			    location   	(1900, 743)
 			    icon_style 	"Icon"
 			    fill_color 	13434879
 			    anchor     	2
@@ -1436,17 +1458,17 @@
 			height     	400
 			autoResize 	TRUE)
 		    (object AssociationViewNew "$UNNAMED$7" @9
-			location   	(2537, 1126)
+			location   	(2538, 1150)
 			stereotype 	TRUE
 			line_color 	3342489
 			quidu      	"3B0A8EBB0349"
 			roleview_list 	(list RoleViews
 			    (object RoleView "JDOExtensions" @10
 				Parent_View 	@9
-				location   	(745, 278)
+				location   	(746, 302)
 				label      	(object SegLabel @11
 				    Parent_View 	@10
-				    location   	(2721, 1188)
+				    location   	(2716, 1188)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -1464,7 +1486,7 @@
 				line_style 	0
 				label      	(object SegLabel @12
 				    Parent_View 	@10
-				    location   	(2667, 1235)
+				    location   	(2662, 1233)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1
@@ -1476,7 +1498,7 @@
 				    orientation 	0))
 			    (object RoleView "$UNNAMED$8" @13
 				Parent_View 	@9
-				location   	(745, 278)
+				location   	(746, 302)
 				stereotype 	TRUE
 				line_color 	3342489
 				quidu      	"3B0A8EBE01E5"
@@ -1517,22 +1539,22 @@
 			IncludeAttribute 	TRUE
 			IncludeOperation 	TRUE
 			ShowOperationSignature 	TRUE
-			location   	(2448, 320)
+			location   	(2208, 224)
 			label      	(object ItemLabel
 			    Parent_View 	@15
-			    location   	(2004, 250)
+			    location   	(1459, 126)
 			    fill_color 	13434879
 			    nlines     	1
-			    max_width  	888
+			    max_width  	1498
 			    justify    	0
 			    label      	"JDOModelFactory")
 			stereotype 	(object ItemLabel
 			    Parent_View 	@15
-			    location   	(2004, 200)
+			    location   	(1459, 81)
 			    fill_color 	13434879
 			    anchor     	10
 			    nlines     	1
-			    max_width  	888
+			    max_width  	1498
 			    justify    	0
 			    label      	"<<Interface>>")
 			icon       	"Interface"
@@ -1542,14 +1564,14 @@
 			quidu      	"3B136D2C003D"
 			compartment 	(object Compartment
 			    Parent_View 	@15
-			    location   	(2004, 305)
+			    location   	(1459, 181)
 			    icon_style 	"Icon"
 			    fill_color 	13434879
 			    anchor     	2
-			    nlines     	3
-			    max_width  	962)
-			width      	906
-			height     	264
+			    nlines     	4
+			    max_width  	1496)
+			width      	1516
+			height     	308
 			autoResize 	TRUE)
 		    (object ClassView "Class" "Logical View::com::sun::jdori::model::jdo::JDORelationship" @16
 			IncludeAttribute 	TRUE
@@ -1894,10 +1916,10 @@
 			IncludeAttribute 	TRUE
 			IncludeOperation 	TRUE
 			ShowOperationSignature 	TRUE
-			location   	(1824, 432)
+			location   	(1808, 512)
 			label      	(object ItemLabel
 			    Parent_View 	@42
-			    location   	(1710, 419)
+			    location   	(1694, 493)
 			    fill_color 	13434879
 			    nlines     	1
 			    max_width  	228
@@ -1905,7 +1927,7 @@
 			    label      	"JavaModel")
 			stereotype 	(object ItemLabel
 			    Parent_View 	@42
-			    location   	(1710, 369)
+			    location   	(1694, 448)
 			    fill_color 	13434879
 			    anchor     	10
 			    nlines     	1
@@ -2136,17 +2158,17 @@
 				    height     	158
 				    orientation 	0))))
 		    (object AssociationViewNew "$UNNAMED$22" @57
-			location   	(1484, 432)
+			location   	(1476, 488)
 			stereotype 	TRUE
 			line_color 	3342489
 			quidu      	"3DEB846000CB"
 			roleview_list 	(list RoleViews
 			    (object RoleView "javaModel" @58
 				Parent_View 	@57
-				location   	(812, 48)
+				location   	(804, 104)
 				label      	(object SegLabel @59
 				    Parent_View 	@58
-				    location   	(1595, 386)
+				    location   	(1586, 450)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -2164,7 +2186,7 @@
 				line_style 	0
 				label      	(object SegLabel @60
 				    Parent_View 	@58
-				    location   	(1643, 480)
+				    location   	(1627, 547)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1
@@ -2176,10 +2198,10 @@
 				    orientation 	1))
 			    (object RoleView "jdoModel" @61
 				Parent_View 	@57
-				location   	(812, 48)
+				location   	(804, 104)
 				label      	(object SegLabel @62
 				    Parent_View 	@61
-				    location   	(1365, 380)
+				    location   	(1365, 428)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -2197,7 +2219,7 @@
 				line_style 	0
 				label      	(object SegLabel @63
 				    Parent_View 	@61
-				    location   	(1319, 472)
+				    location   	(1314, 516)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1
@@ -2246,7 +2268,7 @@
 			location   	(480, 1952)
 			label      	(object ItemLabel
 			    Parent_View 	@65
-			    location   	(78, 1269)
+			    location   	(78, 1224)
 			    fill_color 	13434879
 			    nlines     	1
 			    max_width  	804
@@ -2254,7 +2276,7 @@
 			    label      	"JDOClass")
 			stereotype 	(object ItemLabel
 			    Parent_View 	@65
-			    location   	(78, 1224)
+			    location   	(78, 1179)
 			    fill_color 	13434879
 			    anchor     	10
 			    nlines     	1
@@ -2268,14 +2290,14 @@
 			quidu      	"3A264ECD0306"
 			compartment 	(object Compartment
 			    Parent_View 	@65
-			    location   	(78, 1324)
+			    location   	(78, 1279)
 			    icon_style 	"Icon"
 			    fill_color 	13434879
 			    anchor     	2
-			    nlines     	30
+			    nlines     	32
 			    max_width  	802)
 			width      	822
-			height     	1478
+			height     	1568
 			autoResize 	TRUE)
 		    (object AssociationViewNew "$UNNAMED$13" @66
 			location   	(404, 2816)
@@ -2306,7 +2328,7 @@
 				vertices   	(list Points
 				    (404, 2816)
 				    (191, 2816)
-				    (231, 2691))
+				    (217, 2736))
 				line_style 	0
 				label      	(object SegLabel @69
 				    Parent_View 	@67
@@ -2331,7 +2353,7 @@
 				vertices   	(list Points
 				    (404, 2816)
 				    (621, 2816)
-				    (599, 2691))
+				    (607, 2736))
 				line_style 	0)))
 		    (object InheritView "" @71
 			stereotype 	TRUE
@@ -2465,17 +2487,17 @@
 				supplier   	@65
 				line_style 	0)))
 		    (object AssociationViewNew "$UNNAMED$10" @84
-			location   	(605, 955)
+			location   	(608, 933)
 			stereotype 	TRUE
 			line_color 	3342489
 			quidu      	"3B1356DE0015"
 			roleview_list 	(list RoleViews
 			    (object RoleView "declaringModel" @85
 				Parent_View 	@84
-				location   	(29, -261)
+				location   	(32, -283)
 				label      	(object SegLabel @86
 				    Parent_View 	@85
-				    location   	(801, 758)
+				    location   	(802, 754)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -2493,7 +2515,7 @@
 				line_style 	0
 				label      	(object SegLabel @87
 				    Parent_View 	@85
-				    location   	(687, 816)
+				    location   	(688, 807)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1
@@ -2505,10 +2527,10 @@
 				    orientation 	1))
 			    (object RoleView "declaredClasses" @88
 				Parent_View 	@84
-				location   	(29, -261)
+				location   	(32, -283)
 				label      	(object SegLabel @89
 				    Parent_View 	@88
-				    location   	(777, 1173)
+				    location   	(782, 1136)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -2526,7 +2548,7 @@
 				line_style 	0
 				label      	(object SegLabel @90
 				    Parent_View 	@88
-				    location   	(658, 1112)
+				    location   	(662, 1077)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1
@@ -2537,17 +2559,17 @@
 				    height     	72
 				    orientation 	0))))
 		    (object AssociationViewNew "$UNNAMED$24" @91
-			location   	(377, 1059)
+			location   	(375, 1037)
 			stereotype 	TRUE
 			line_color 	3342489
 			quidu      	"3DFDA354037A"
 			roleview_list 	(list RoleViews
 			    (object RoleView "javaType" @92
 				Parent_View 	@91
-				location   	(-103, -893)
+				location   	(-105, -915)
 				label      	(object SegLabel @93
 				    Parent_View 	@92
-				    location   	(256, 947)
+				    location   	(256, 943)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -2565,7 +2587,7 @@
 				line_style 	0
 				label      	(object SegLabel @94
 				    Parent_View 	@92
-				    location   	(442, 946)
+				    location   	(441, 939)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1
@@ -2577,10 +2599,10 @@
 				    orientation 	1))
 			    (object RoleView "jdoClass" @95
 				Parent_View 	@91
-				location   	(-103, -893)
+				location   	(-105, -915)
 				label      	(object SegLabel @96
 				    Parent_View 	@95
-				    location   	(279, 1160)
+				    location   	(276, 1125)
 				    anchor     	1
 				    anchor_loc 	1
 				    nlines     	1
@@ -2598,7 +2620,7 @@
 				line_style 	0
 				label      	(object SegLabel @97
 				    Parent_View 	@95
-				    location   	(440, 1153)
+				    location   	(436, 1116)
 				    anchor     	2
 				    anchor_loc 	1
 				    nlines     	1

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModelFactory.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModelFactory.java?rev=169816&r1=169815&r2=169816&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModelFactory.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/jdo/JDOModelFactory.java Thu May 12 06:26:44 2005
@@ -30,15 +30,35 @@
 {
     /**
      * Creates a new empty JDOModel instance.
+     * The returned JDOModel instance uses the specified flag
+     * <code>loadXMLMetadataDefault</code> to set the default value for the
+     * flag <code>loadXMLMetadata</code> used by the JDOModel methods
+     * createJDOClass and setJDOClass. 
+     * @param loadXMLMetadataDefault the default setting for the flag
+     * loadXMLMetadata.
      * @exception ModelException if impossible
      */
-    public JDOModel createJDOModel(JavaModel javaModel)
+    public JDOModel createJDOModel(JavaModel javaModel,
+                                   boolean loadXMLMetadataDefault)
         throws ModelException;
     
     /**
      * Returns the JDOModel instance for the specified JavaModel.
-     * @param javaModel the javaModel used to cache the returned JDOModel instance
+     * @param javaModel the javaModel used to cache the returned JDOModel
+     * instance.
      */
     public JDOModel getJDOModel(JavaModel javaModel);
     
+    /**
+     * Returns the JDOModel instance for the specified JavaModel.  
+     * The returned JDOModel instance uses the specified flag
+     * <code>loadXMLMetadataDefault</code> to set the default value for the
+     * flag <code>loadXMLMetadata</code> used by the JDOModel methods
+     * createJDOClass and setJDOClass. 
+     * @param loadXMLMetadataDefault the default setting for the flag
+     * loadXMLMetadata.
+     */
+    public JDOModel getJDOModel(JavaModel javaModel, 
+                                boolean loadXMLMetadataDefault);
+
 }



Mime
View raw message