Package com.sun.enterprise.deployment
Class PersistenceUnitsDescriptor
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- org.glassfish.deployment.common.RootDeploymentDescriptor
-
- com.sun.enterprise.deployment.PersistenceUnitsDescriptor
-
- All Implemented Interfaces:
Serializable
public class PersistenceUnitsDescriptor extends RootDeploymentDescriptor
This descriptor represents contents for one persistence.xml file.- Author:
- Sanjeeb.Sahoo@Sun.COM
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.glassfish.deployment.common.RootDeploymentDescriptor
classLoader, deplLogger, extensions, moduleDescriptor, moduleID
-
Fields inherited from class org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
-
Constructor Summary
Constructors Constructor Description PersistenceUnitsDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPersistenceUnitDescriptor(PersistenceUnitDescriptor pud)This method does not do any validation like checking for unique names of PersistenceUnits.StringgetAbsolutePuRoot()This is a utility method which calculates the absolute path of the root of a PU.ClassLoadergetClassLoader()StringgetDefaultSpecVersion()StringgetModuleID()ArchiveTypegetModuleType()RootDeploymentDescriptorgetParent()List<PersistenceUnitDescriptor>getPersistenceUnitDescriptors()StringgetPuRoot()booleanisApplication()booleanisEmpty()Return true if this root deployment descriptor does not describe anythingvoidsetParent(RootDeploymentDescriptor parent)voidsetPuRoot(String puRoot)-
Methods inherited from class org.glassfish.deployment.common.RootDeploymentDescriptor
addExtensionDescriptor, getDisplayName, getExtensionsDescriptors, getExtensionsDescriptors, getExtensionsDescriptors, getMainDescriptor, getModuleDescriptor, getName, getSchemaLocation, getSpecVersion, getTracerVisitor, isExtensionDescriptor, print, setClassLoader, setDisplayName, setModuleDescriptor, setModuleID, setName, setSchemaLocation, setSpecVersion
-
Methods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setSmallIconUri, visit
-
Methods inherited from class org.glassfish.deployment.common.DynamicAttributesDescriptor
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
-
-
-
Method Detail
-
getParent
public RootDeploymentDescriptor getParent()
-
setParent
public void setParent(RootDeploymentDescriptor parent)
-
getPuRoot
public String getPuRoot()
-
setPuRoot
public void setPuRoot(String puRoot)
-
getDefaultSpecVersion
public String getDefaultSpecVersion()
- Specified by:
getDefaultSpecVersionin classRootDeploymentDescriptor- Returns:
- the default version of the deployment descriptor loaded by this descriptor
-
getModuleID
public String getModuleID()
- Specified by:
getModuleIDin classRootDeploymentDescriptor- Returns:
- the module ID for this module descriptor
-
getModuleType
public ArchiveType getModuleType()
- Specified by:
getModuleTypein classRootDeploymentDescriptor- Returns:
- the module type for this bundle descriptor
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin classRootDeploymentDescriptor- Returns:
- the class loader associated with this module
-
isApplication
public boolean isApplication()
- Specified by:
isApplicationin classRootDeploymentDescriptor- Returns:
- true if this module is an application object
-
addPersistenceUnitDescriptor
public void addPersistenceUnitDescriptor(PersistenceUnitDescriptor pud)
This method does not do any validation like checking for unique names of PersistenceUnits.- Parameters:
pud- the PersistenceUnitDescriptor to be added.
-
getPersistenceUnitDescriptors
public List<PersistenceUnitDescriptor> getPersistenceUnitDescriptors()
- Returns:
- an unmodifiable list.
-
getAbsolutePuRoot
public String getAbsolutePuRoot()
This is a utility method which calculates the absolute path of the root of a PU. Absolute path is not the path with regards to root of file system. It is the path from the root of the Java EE application this persistence unit belongs to. LikegetPuRoot()returned path always uses '/' as path separator.- Returns:
- the absolute path of the root of this persistence unit
- See Also:
getPuRoot()
-
isEmpty
public boolean isEmpty()
Description copied from class:RootDeploymentDescriptorReturn true if this root deployment descriptor does not describe anything- Specified by:
isEmptyin classRootDeploymentDescriptor- Returns:
- true if this root descriptor is empty
-
-