|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.model.jdo.JDOElementImpl
org.apache.jdo.impl.model.jdo.JDOModelImplDynamic
org.apache.jdo.impl.model.jdo.caching.JDOModelImplCaching
A JDOModel instance bundles a number of JDOClass instances used by an application. It provides factory methods to create and retrieve JDOClass instances. A fully qualified class name must be unique within a JDOModel instance. The model supports multiple classes having the same fully qualified name by different JDOModel instances.
The caching JDOModel implementation caches any caclulated value to avoid re-calculating it if it is requested again. It is intended to be used in an environment where JDO metadata does NOT change (e.g. at runtime).
Nested Class Summary |
Nested classes inherited from class org.apache.jdo.impl.model.jdo.JDOModelImplDynamic |
|
Field Summary | |
private java.util.Map |
jdoClassesForObjectIdClasses
This is a mapping from ObjectId classes to its JDOClass instances. |
private java.util.Map |
jdoClassesForShortNames
This is a mapping from short names to JDOClass instances. |
private java.util.Set |
nonPCClasses
Set of fully qualified names of classes known to be non persistence-capable. |
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOModelImplDynamic |
logger, msg, xmlLogger |
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl |
|
Constructor Summary | |
protected |
JDOModelImplCaching(JavaModel javaModel,
boolean loadXMLMetadataDefault)
Constructor. |
Method Summary | |
JDOClass |
getJDOClassForObjectIdClass(JavaType objectIdClass)
This method returns the JDOClass instance that defines the specified type as its objectId class. |
JDOClass |
getJDOClassForShortName(java.lang.String shortName)
The method returns the JDOClass instance for the specified short name (see JDOClass.getShortName() ) or null if it cannot
find a JDOClass instance with the specified short name. |
protected boolean |
isKnownNonPC(java.lang.String typeName)
Checks whether the type with the specified name does NOT denote a persistence-capable class. |
protected void |
knownNonPC(java.lang.String className)
Hook called when a class is known to be non persistence capable. |
protected JDOClass |
newJDOClassInstance(java.lang.String name)
Returns a new instance of the JDOClass implementation class. |
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOModelImplDynamic |
createJDOClass, createJDOClass, createJDOPackage, getDeclaredClasses, getDeclaredPackages, getJavaModel, getJDOClass, getJDOClass, getJDOPackage, getParent, setJavaModel |
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl |
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement |
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener |
Field Detail |
private java.util.Map jdoClassesForShortNames
private java.util.Map jdoClassesForObjectIdClasses
private java.util.Set nonPCClasses
Constructor Detail |
protected JDOModelImplCaching(JavaModel javaModel, boolean loadXMLMetadataDefault)
Method Detail |
public JDOClass getJDOClassForShortName(java.lang.String shortName)
JDOClass.getShortName()
) or null
if it cannot
find a JDOClass instance with the specified short name.
The method searches the list of JDOClasses currently managed by this
JDOModel instance. It does not attempt to load any metadata if it
cannot find a JDOClass instance with the specified short name. The
metadata for a JDOClass returned by this method must have been loaded
before by any of the methods
JDOModelImplDynamic.createJDOClass(String className)
,
JDOModelImplDynamic.createJDOClass(String className, boolean loadXMLMetadataDefault)
,
JDOModelImplDynamic.getJDOClass(String className)
, or
JDOModelImplDynamic.getJDOClass(String className, boolean loadXMLMetadataDefault)
.
getJDOClassForShortName
in interface JDOModel
getJDOClassForShortName
in class JDOModelImplDynamic
shortName
- the short name of the JDOClass instance to be returned
null
if not presentpublic JDOClass getJDOClassForObjectIdClass(JavaType objectIdClass)
JDOClass.getPersistenceCapableSuperclass()
).
getJDOClassForObjectIdClass
in interface JDOModel
getJDOClassForObjectIdClass
in class JDOModelImplDynamic
objectIdClass
- the type representation of the ObjectId class
protected JDOClass newJDOClassInstance(java.lang.String name)
newJDOClassInstance
in class JDOModelImplDynamic
protected boolean isKnownNonPC(java.lang.String typeName)
isKnownNonPC
in class JDOModelImplDynamic
typeName
- name of the type to be checked
true
if types is a name of a primitive type;
false
otherwiseprotected void knownNonPC(java.lang.String className)
knownNonPC
in class JDOModelImplDynamic
className
- the name of the non-pc class
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |