Interface CMPGenerator
- All Known Implementing Classes:
JDOCodeGenerator
public interface CMPGenerator
This interface must be implemented by all CMP code generators.
-
Method Summary
Modifier and TypeMethodDescriptioncleanup()This method is called once for each ejb module in the application that contains CMP beans.voidgenerate(org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor descr, File srcout, File classout) This method is called once for each CMP bean of the corresponding ejb module.voidinit(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl ejbBundleDescriptor, ClassLoader cl, String bundlePathName) Deprecated.This method is not used by the deployment back end, and should be removed as soon as the TestFramework is fixed.voidinit(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl ejbBundleDescriptor, org.glassfish.api.deployment.DeploymentContext ctx, String bundlePathName, String generatedXmlsPathName) This method is called once for each ejb module in the application that contains CMP beans.validate(org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor descr) This method may be called once for each CMP bean of the corresponding ejb module to perform the validation.
-
Method Details
-
init
void init(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl ejbBundleDescriptor, ClassLoader cl, String bundlePathName) throws GeneratorException Deprecated.This method is not used by the deployment back end, and should be removed as soon as the TestFramework is fixed.This method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.- Parameters:
ejbBundleDescriptor- the EjbBundleDescriptor associated with this ejb module.cl- the ClassLoader that loaded user defined classes.bundlePathName- full path to the directory where this bundle's files are located.- Throws:
GeneratorException- if there is a problem initializing bean processing.
-
init
void init(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl ejbBundleDescriptor, org.glassfish.api.deployment.DeploymentContext ctx, String bundlePathName, String generatedXmlsPathName) throws GeneratorException This method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.- Parameters:
ejbBundleDescriptor- the EjbBundleDescriptor associated with this ejb module.ctx- the DeploymentContext associated with the deployment request.bundlePathName- full path to the directory where this bundle's files are located.generatedXmlsPathName- full path to the directory where the generated files are located.- Throws:
GeneratorException- if there is a problem initializing bean processing.
-
generate
void generate(org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor descr, File srcout, File classout) throws GeneratorException This method is called once for each CMP bean of the corresponding ejb module.- Parameters:
descr- the IASEjbCMPEntityDescriptor associated with this CMP bean.srcout- the location of the source files to be generated.classout- the location of the class files to be generated.- Throws:
GeneratorException- if there is a problem processing the bean.
-
cleanup
This method is called once for each ejb module in the application that contains CMP beans. It is called at the end of the module processing.- Returns:
- a Collection of files to be compiled by the deployment process.
- Throws:
GeneratorException- if there is any problem.
-
validate
This method may be called once for each CMP bean of the corresponding ejb module to perform the validation.- Parameters:
descr- the IASEjbCMPEntityDescriptor associated with this CMP bean.- Returns:
- a Collection of Exceptions if there are any problems processing the bean. Returns an empty Collection if validation succeeds.
-