|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.model.jdo.JDOModelFactoryImplDynamic
Factory for dynamic JDOModel instances. The factory provides a mechanism to cache JDOModel instances per JavaModel instances.
TBD:
Field Summary | |
private static JDOModelFactory |
jdoModelFactory
The singleton JDOModelFactory instance. |
private java.util.Map |
modelCache
Map of JDOModel instances, key is the JavaModel getJDOModel(JavaModel javaModel) |
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. |
void |
removeJDOModel(JavaModel javaModel)
Removes the JDOModel for the specified javaModel from the JDOModel cache. |
void |
removeJDOModel(JDOModel jdoModel)
Removes the specified jdoModel from the JDOModel cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map modelCache
getJDOModel(JavaModel javaModel)
private static JDOModelFactory jdoModelFactory
Constructor Detail |
protected JDOModelFactoryImplDynamic()
getInstance()
should be used.
Method Detail |
public static JDOModelFactory getInstance()
public JDOModel createJDOModel(JavaModel javaModel, boolean loadXMLMetadataDefault)
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.
createJDOModel
in interface JDOModelFactory
loadXMLMetadataDefault
- the default setting for whether to
read XML metatdata in JDOModel's methods for JDOClass creation.public JDOModel getJDOModel(JavaModel javaModel)
getJDOModel
in interface JDOModelFactory
javaModel
- the javaModel used to cache the returned JDOModel
instance.public JDOModel getJDOModel(JavaModel javaModel, boolean loadXMLMetadataDefault)
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.
getJDOModel
in interface JDOModelFactory
loadXMLMetadataDefault
- the default setting for whether to
read XML metatdata in JDOModel's methods for JDOClass creation.public void removeJDOModel(JDOModel jdoModel)
removeJDOModel
in interface JDOModelFactory
jdoModel
- the JDOModel to be removed.public void removeJDOModel(JavaModel javaModel)
removeJDOModel
in interface JDOModelFactory
javaModel
- the javaModel used to find the JDOModel instance to be
removed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |