org.apache.jdo.impl.model.jdo.xml
Class XMLExists.XMLExistsJDOModelFactory
java.lang.Object
org.apache.jdo.impl.model.java.AbstractJavaModelFactory
org.apache.jdo.impl.model.java.reflection.ReflectionJavaModelFactory
org.apache.jdo.impl.model.jdo.xml.XMLExists.XMLExistsJDOModelFactory
- All Implemented Interfaces:
- JavaModelFactory
- Enclosing class:
- XMLExists
- private static class XMLExists.XMLExistsJDOModelFactory
- extends ReflectionJavaModelFactory
JavaModelFactory implementation.
We cannot use the RuntimeJavaModelFactory, because it registers
a JDOImplHelper event listener to populate enhancer generated
metadata into the model. Since XMLExists checks whether JDO
metadata is present from a .jdo we do not want to the enhancer
generated metadata.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLExists.XMLExistsJDOModelFactory
protected XMLExists.XMLExistsJDOModelFactory()
createJavaModel
public JavaModel createJavaModel(java.lang.Object key)
throws ModelException
- Description copied from class:
AbstractJavaModelFactory
- Creates a new empty JavaModel instance. A factory implementation may
use the specified key when caching the new JavaModel instance.
Each JavaModelFactory imposes its own restrictions for the keys to
cache JavaModel instances. Some implementation will allow only keys
of a certain type. Some implementations will prohibit
null
keys. Attempting to use an ineligible key will
result in a ModelException
. This means
the specified key is of an inappropriate type for this
JavaModelFactory or if the key is null
and this
JavaModelFactory does not support null
keys.
- Specified by:
createJavaModel
in interface JavaModelFactory
- Specified by:
createJavaModel
in class AbstractJavaModelFactory
- Parameters:
key
- the key that may be used to cache the returned JavaModel instance.
- Returns:
- a new JavaModel instance.
- Throws:
ModelException
- if impossible; the key is of an
inappropriate type or the key is null
and this
JavaModelFactory does not support null
keys.
setJDOModelInternal
protected void setJDOModelInternal(JavaModel javaModel)
- Sets the JDOModel instance for the specified JavaModel.
- Parameters:
javaModel
- the JavaModel