FileDocCategorySizeDatePackage
CMPGenerator.javaAPI DocGlassfish v2 API5104Fri May 04 22:32:56 BST 2007com.sun.ejb.codegen

CMPGenerator

public interface CMPGenerator
This interface must be implemented by all CMP code generators.

Fields Summary
Constructors Summary
Methods Summary
public java.util.Collectioncleanup()
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.

return
a Collection of files to be compiled by the deployment process.
throws
GeneratorException if there is any problem.

public voidgenerate(IASEjbCMPEntityDescriptor descr, java.io.File srcout, java.io.File classout)
This method is called once for each CMP bean of the corresponding ejb module.

param
descr the IASEjbCMPEntityDescriptor associated with this CMP bean.
param
srcout the location of the source files to be generated.
param
classout the location of the class files to be generated.
throws
GeneratorException if there is a problem processing the bean.

public voidinit(EjbBundleDescriptor ejbBundleDescriptor, java.lang.ClassLoader cl, java.lang.String bundlePathName)
This method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.

deprecated
This method is not used by the deployment back end, and should be removed as soon as the TestFramework is fixed.
param
ejbBundleDescriptor the EjbBundleDescriptor associated with this ejb module.
param
cl the ClassLoader that loaded user defined classes.
param
bundlePathName full path to the directory where this bundle's files are located.
throws
GeneratorException if there is a problem initializing bean processing.

public voidinit(EjbBundleDescriptor ejbBundleDescriptor, EjbcContext ctx, java.lang.String bundlePathName, java.lang.String generatedXmlsPathName)
This method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.

param
ejbBundleDescriptor the EjbBundleDescriptor associated with this ejb module.
param
ctx the EjbcContext associated with the deployment request.
param
bundlePathName full path to the directory where this bundle's files are located.
param
generatedXmlsPathName full path to the directory where the generated files are located.
throws
GeneratorException if there is a problem initializing bean processing.

public java.util.Collectionvalidate(IASEjbCMPEntityDescriptor descr)
This method may be called once for each CMP bean of the corresponding ejb module to perform the validation.

param
descr the IASEjbCMPEntityDescriptor associated with this CMP bean.
return
a Collection of Exceptions if there are any problems processing the bean. Returns an empty Collection if validation succeeds.