Methods Summary |
---|
public void | addPersistenceUnitDescriptor(PersistenceUnitDescriptor pud)This method does not do any validation like checking for unique names
of PersistenceUnits.
persistenceUnitDescriptors.add(pud);
pud.setParent(this);
|
public java.lang.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.
Like {@link #getPuRoot()} returned path always uses '/' as path separator.
RootDeploymentDescriptor rootDD = getParent();
if(rootDD.isApplication()){
return getPuRoot();
} else {
ModuleDescriptor module = BundleDescriptor.class.cast(rootDD).
getModuleDescriptor();
if(module.isStandalone()) {
return getPuRoot();
} else {
final String moduleLocation = module.getArchiveUri();
return moduleLocation + '/" + getPuRoot(); // see we always '/'
}
}
|
public java.lang.ClassLoader | getClassLoader()
return parent.getClassLoader();
|
public java.lang.String | getDefaultSpecVersion()
return JPA_1_0;
|
public java.lang.String | getModuleID()
throw new RuntimeException();
|
public javax.enterprise.deploy.shared.ModuleType | getModuleType()
throw new RuntimeException();
|
public RootDeploymentDescriptor | getParent()
return parent;
|
public java.util.List | getPersistenceUnitDescriptors()
return Collections.unmodifiableList(persistenceUnitDescriptors);
|
public java.lang.String | getPuRoot()
return puRoot;
|
public boolean | isApplication()
return false;
|
public void | setParent(RootDeploymentDescriptor parent)
this.parent = parent;
|
public void | setPuRoot(java.lang.String puRoot)
this.puRoot = puRoot;
|