public class DeploymentDescriptorModel
extends com.sun.jdo.api.persistence.model.RuntimeModel
| Modifier and Type | Field and Description |
|---|---|
static String |
SIGNATURE
Signature with CVS keyword substitution for identifying the generated code
|
| Constructor and Description |
|---|
DeploymentDescriptorModel(NameMapper nameMapper,
ClassLoader classLoader)
Creates a new instance of DeploymentDescriptorModel
|
| Modifier and Type | Method and Description |
|---|---|
protected BufferedOutputStream |
createFile(String className,
String baseFileName,
String extension)
Creates a file with the given base file name and extension
parallel to the supplied class (if it does not yet exist).
|
protected void |
deleteFile(String className,
String fileName)
Deletes the file with the given file name which is parallel
to the supplied class.
|
protected ClassLoader |
findClassLoader(String className,
ClassLoader classLoader)
This method returns the class loader used to find mapping information
for the specified className.
|
protected String |
findPenultimateSuperclass(String className)
Returns the name of the second to top (top excluding java.lang.Object)
superclass for the given class name.
|
List |
getAllFields(String className)
Returns a list of names of all the field elements in the
class with the specified name.
|
Object |
getClass(String className,
ClassLoader classLoader)
Returns the class element with the specified className.
|
Object |
getConstructor(String className,
String[] argTypeNames)
Returns a wrapped constructor element for the specified argument types
in the class with the specified name.
|
String |
getDeclaringClass(Object memberElement)
Returns the string representation of declaring class of
the specified member element.
|
Object |
getField(String className,
String fieldName)
Returns a wrapped field element for the specified fieldName in the
class with the specified className.
|
List |
getFields(String className)
Returns a list of names of all the declared field elements in the
class with the specified name.
|
String |
getFieldType(String className,
String fieldName)
Returns the field type for the specified fieldName in the class
with the specified className.
|
Object |
getInheritedMethod(String className,
String methodName,
String[] argTypeNames)
Returns the inherited method element for the specified method
name and argument types in the class with the specified name.
|
protected BufferedInputStream |
getInputStreamForResource(String className,
ClassLoader classLoader,
String resourceName)
Returns the input stream with the supplied resource name found with
the supplied class name.
|
Object |
getMethod(String className,
String methodName,
String[] argTypeNames)
Returns a wrapped method element for the specified method name and
argument types in the class with the specified name.
|
int |
getModifiers(Object memberElement)
Returns the modifier mask for the specified member element.
|
int |
getModifiersForClass(String className)
Returns the modifier mask for the specified className.
|
protected String |
getSuperclass(String className)
Returns the name of the superclass for the given class name.
|
protected Class |
getTypeObject(Object element)
Returns the Class type of the specified element.
|
boolean |
isValidKeyType(String className,
String fieldName)
Determines if the specified className and fieldName pair represent a
field which has a type which is valid for key fields.
|
getClassLoaderCache, getFile, getMappingClass, getType, hasConstructor, implementsInterface, isArray, isInterface, isSerializable, removeResourcesFromCachesaddFieldElement, convertDefaultFields, convertFields, convertToPersistenceCapable, convertToPersistenceCapable, getClass, getDefaultCollectionClass, getEqualsArgs, getFileName, getFileNameWithExtension, getInheritedField, getMappingCache, getMappingClass, getMessages, getModifiers, getPersistenceClass, getPersistenceClass, getPersistenceClass, getPersistenceField, getPersistenceFieldInternal, getReadObjectArgs, getRelatedClass, getResourceName, getResourceNameWithExtension, getSupportedCollectionClasses, getWriteObjectArgs, hasClass, hasClass, hasField, hasPersistentSuperclass, isByteArray, isByteArray, isCollection, isDefaultFetchGroup, isKey, isMutableSecondClassObject, isPersistenceCapableAllowed, isPersistent, isPersistent, isPersistent, isPersistentAllowed, isPersistentAllowed, isPersistentTypeAllowed, isPrimitive, isPrimitive, isSecondClassObject, lockFile, NewModel, parse, removeFieldElement, removeFromCache, removeResourcesFromCaches, shouldBePersistent, storeMappingClass, storeMappingClass, storeMappingClass, unlockFile, unlockFile, updateKeyForClass, validate, validatepublic static final String SIGNATURE
public DeploymentDescriptorModel(NameMapper nameMapper, ClassLoader classLoader)
nameMapper - the name mapper to be used as a helper for
translation between persistence class and ejb names.classLoader - the class loader object which is used for the
application.protected BufferedInputStream getInputStreamForResource(String className, ClassLoader classLoader, String resourceName)
getInputStreamForResource in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class which will be
used as a base to find the resourceclassLoader - the class loader used to find mapping information
This parameter is ignored in this implementation - instead the
class loader supplied at construction time is used.resourceName - the name of the resource to be foundnull
if an error occurs or none existsprotected String findPenultimateSuperclass(String className)
findPenultimateSuperclass in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class to be checkedclassName if an error occurs or none existsprotected String getSuperclass(String className)
getSuperclass in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class to be checkednull if an error
occurs or none existsprotected BufferedOutputStream createFile(String className, String baseFileName, String extension) throws IOException
createFile in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the classbaseFileName - the name of the base fileextension - the file extensionnull
if an error occurs or none existsIOException - if there is some error creating the fileprotected void deleteFile(String className, String fileName) throws IOException
deleteFile in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the classfileName - the name of the fileIOException - if there is some error deleting the filepublic Object getClass(String className, ClassLoader classLoader)
getClass in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class to be checkedclassLoader - the class loader used to find mapping informationpublic Object getConstructor(String className, String[] argTypeNames)
getConstructor in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the name of the class which contains the constructor
to be checkedargTypeNames - the fully qualified names of the argument typesgetClass(java.lang.String, java.lang.ClassLoader)public Object getMethod(String className, String methodName, String[] argTypeNames)
getMethod in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the name of the class which contains the method
to be checkedmethodName - the name of the method to be checkedargTypeNames - the fully qualified names of the argument typesgetClass(java.lang.String, java.lang.ClassLoader)public Object getInheritedMethod(String className, String methodName, String[] argTypeNames)
getInheritedMethod in class com.sun.jdo.api.persistence.model.ModelclassName - the name of the class which contains the method
to be checkedmethodName - the name of the method to be checkedargTypeNames - the fully qualified names of the argument typesgetClass(java.lang.String, java.lang.ClassLoader)public List getFields(String className)
getFields in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class to be checkedpublic List getAllFields(String className)
getAllFields in class com.sun.jdo.api.persistence.model.ModelclassName - the fully qualified name of the class to be checkedpublic Object getField(String className, String fieldName)
getField in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class which contains
the field to be checkedfieldName - the name of the field to be checkedpublic String getFieldType(String className, String fieldName)
getFieldType in class com.sun.jdo.api.persistence.model.ModelclassName - the fully qualified name of the class which contains
the field to be checkedfieldName - the name of the field to be checkedpublic String getDeclaringClass(Object memberElement)
getDeclaringClass in class com.sun.jdo.api.persistence.model.RuntimeModelmemberElement - the member element to be checkedgetClass(java.lang.String, java.lang.ClassLoader),
getField(java.lang.String, java.lang.String),
getConstructor(java.lang.String, java.lang.String[]),
getMethod(java.lang.String, java.lang.String, java.lang.String[])public int getModifiers(Object memberElement)
getModifiers in class com.sun.jdo.api.persistence.model.RuntimeModelmemberElement - the member element to be checkedModifier,
getClass(java.lang.String, java.lang.ClassLoader),
getField(java.lang.String, java.lang.String),
getConstructor(java.lang.String, java.lang.String[]),
getMethod(java.lang.String, java.lang.String, java.lang.String[])public int getModifiersForClass(String className)
getModifiersForClass in class com.sun.jdo.api.persistence.model.ModelclassName - the fully qualified name of the class to be checkedModifierpublic boolean isValidKeyType(String className, String fieldName)
isValidKeyType in class com.sun.jdo.api.persistence.model.ModelclassName - the fully qualified name of the class which contains
the field to be checkedfieldName - the name of the field to be checkedtrue if this field name represents a field
with a valid type for a key field; false otherwise.protected Class getTypeObject(Object element)
getTypeObject in class com.sun.jdo.api.persistence.model.RuntimeModelelement - the element to be checkedgetField(java.lang.String, java.lang.String),
RuntimeModel.getMethod(java.lang.String, java.lang.String, java.lang.String[])protected ClassLoader findClassLoader(String className, ClassLoader classLoader)
findClassLoader in class com.sun.jdo.api.persistence.model.RuntimeModelclassName - the fully qualified name of the class to be checkedclassLoader - the class loader used to find mapping informationCopyright © 2017–2019 Eclipse Foundation. All rights reserved.