|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | |
JDOClass |
createJDOClass(java.lang.String className)
The method returns a JDOClass instance for the specified fully qualified class name. |
JDOClass |
createJDOClass(java.lang.String className,
boolean loadXMLMetadata)
The method returns a JDOClass instance for the specified fully qualified class name. |
JDOPackage |
createJDOPackage(java.lang.String packageName)
The method returns a JDOClass instance for the specified package name. |
JDOClass[] |
getDeclaredClasses()
Returns the collection of JDOClass instances declared by this JDOModel in the format of an array. |
JDOPackage[] |
getDeclaredPackages()
Returns the collection of JDOPackage instances declared by this JDOModel in the format of an array. |
JavaModel |
getJavaModel()
Returns the JavaModel bound to this JDOModel instance. |
JDOClass |
getJDOClass(java.lang.String className)
The method returns the JDOClass instance for the specified fully qualified class name if present. |
JDOClass |
getJDOClass(java.lang.String className,
boolean loadXMLMetadata)
The method returns the JDOClass instance for the specified fully qualified class name if present. |
JDOClass |
getJDOClassForObjectIdClass(JavaType objectIdClass)
This method returns the JDOClass instance that defines the specified type as its objectId class. |
JDOPackage |
getJDOPackage(java.lang.String packageName)
The method returns the JDOPackage instance for the specified package name, if present. |
JDOModel |
getParent()
Returns the parent JDOModel instance of this JDOModel. |
void |
setJavaModel(JavaModel javaModel)
Sets the JavaModel for this JDOModel instance. |
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement |
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener |
Method Detail |
public JDOPackage createJDOPackage(java.lang.String packageName) throws ModelException
packageName
- the name of the JDOPackage instance
to be returned
ModelException
- if impossiblepublic JDOPackage getJDOPackage(java.lang.String packageName)
null
if it cannot
find a JDOPackage instance for the specified name.
packageName
- the name of the JDOPackage instance
to be returned
null
if not presentpublic JDOPackage[] getDeclaredPackages()
public JDOClass createJDOClass(java.lang.String className) throws ModelException
Whether this method reads XML metatdata or not is deteremined at
JDOModel creation time (see flag loadXMLMetadataDefault
in JDOModelFactory.getJDOModel(JavaModel javaModel, boolean
loadXMLMetadataDefault)
). Invoking this method is method is equivalent
to createJDOClass(className, loadXMLMetadataDefault)
.
className
- the fully qualified class name of the JDOClass
instance to be returned
ModelException
- if impossiblepublic JDOClass createJDOClass(java.lang.String className, boolean loadXMLMetadata) throws ModelException
true
the method tries to find the JDOClass
instance by reading the XML metadata. If it could not be found the method
creates a new JDOClass instance, sets its declaringModel and returns the
instance.
className
- the fully qualified class name of the JDOClass instance
to be returnedloadXMLMetadata
- indicates whether to read XML metatdata or not
ModelException
- if impossiblepublic JDOClass getJDOClass(java.lang.String className)
null
if it cannot find a JDOClass instance for the specified name.
Whether this method reads XML metatdata or not is deteremined at
JDOModel creation time (see flag loadXMLMetadataDefault
in JDOModelFactory.getJDOModel(JavaModel javaModel, boolean
loadXMLMetadataDefault)
). Invoking this method is method is equivalent
to createJDOClass(className, loadXMLMetadataDefault)
.
className
- the fully qualified class name of the JDOClass
instance to be returned
null
if not presentpublic JDOClass getJDOClass(java.lang.String className, boolean loadXMLMetadata)
true
the method tries to find the JDOClass instance by
reading the XML metadata. The method returns null if it cannot find a
JDOClass instance for the specified name.
className
- the fully qualified class name of the JDOClass instance
to be returnedloadXMLMetadata
- indicates whether to read XML metatdata or not
null
if not presentpublic JDOClass[] getDeclaredClasses()
public JavaModel getJavaModel()
public void setJavaModel(JavaModel javaModel)
javaModel
- the JavaModelpublic JDOModel getParent()
public JDOClass getJDOClassForObjectIdClass(JavaType objectIdClass)
JDOClass.getPersistenceCapableSuperclass()
).
objectIdClass
- the type representation of the ObjectId class
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |