org.apache.jdo.impl.model.jdo
Class JDOModelFactoryImplDynamic

java.lang.Object
  extended by org.apache.jdo.impl.model.jdo.JDOModelFactoryImplDynamic
All Implemented Interfaces:
JDOModelFactory
Direct Known Subclasses:
JDOModelFactoryImplCaching

public class JDOModelFactoryImplDynamic
extends java.lang.Object
implements JDOModelFactory

Factory for dynamic JDOModel instances. The factory provides a mechanism to cache JDOModel instances per JavaModel instances.

TBD:

Since:
1.1
Version:
1.1
Author:
Michael Bouschen

Constructor Summary
protected JDOModelFactoryImplDynamic()
          Creates new JDOModelFactory.
 
Method Summary
 JDOModel createJDOModel(JavaModel javaModel, boolean loadXMLMetadataDefault)
          Creates a new empty JDOModel instance.
static JDOModelFactory getInstance()
          Get an instance of JDOModelFactory.
 JDOModel getJDOModel(JavaModel javaModel)
          Returns the JDOModel instance for the specified JavaModel.
 JDOModel getJDOModel(JavaModel javaModel, boolean loadXMLMetadataDefault)
          Returns the JDOModel instance for the specified JavaModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOModelFactoryImplDynamic

protected JDOModelFactoryImplDynamic()
Creates new JDOModelFactory. This constructor should not be called directly; instead, the singleton access method getInstance() should be used.

Method Detail

getInstance

public static JDOModelFactory getInstance()
Get an instance of JDOModelFactory.

Returns:
an instance of JDOModelFactory

createJDOModel

public JDOModel createJDOModel(JavaModel javaModel,
                               boolean loadXMLMetadataDefault)
Creates a new empty JDOModel instance. The returned JDOModel instance uses the specified flag loadXMLMetadataDefault to set the default behavior for the creation of new JDOClass instances using methods JDOModel.createJDOClass(String) and JDOModel.getJDOClass(String) for which the caller doesn't explicitly specify whether to read XML metatdata or not.

Specified by:
createJDOModel in interface JDOModelFactory
Parameters:
loadXMLMetadataDefault - the default setting for whether to read XML metatdata in JDOModel's methods for JDOClass creation.

getJDOModel

public JDOModel getJDOModel(JavaModel javaModel)
Returns the JDOModel instance for the specified JavaModel.

Specified by:
getJDOModel in interface JDOModelFactory
Parameters:
javaModel - the javaModel used to cache the returned JDOModel instance.

getJDOModel

public JDOModel getJDOModel(JavaModel javaModel,
                            boolean loadXMLMetadataDefault)
Returns the JDOModel instance for the specified JavaModel. The returned JDOModel instance uses the specified flag loadXMLMetadataDefault to set the default behavior for the creation of new JDOClass instances using methods JDOModel.createJDOClass(String) and JDOModel.getJDOClass(String) for which the caller doesn't explicitly specify whether to read XML metatdata or not.

Specified by:
getJDOModel in interface JDOModelFactory
Parameters:
loadXMLMetadataDefault - the default setting for whether to read XML metatdata in JDOModel's methods for JDOClass creation.


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.