Class JDOCodeGenerator
java.lang.Object
com.sun.jdo.spi.persistence.support.ejb.ejbc.JDOCodeGenerator
- All Implemented Interfaces:
CMPGenerator,org.glassfish.persistence.common.DatabaseConstants
public class JDOCodeGenerator
extends Object
implements CMPGenerator, org.glassfish.persistence.common.DatabaseConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSignature with CVS keyword substitution for identifying the generated codeFields inherited from interface org.glassfish.persistence.common.DatabaseConstants
CREATE, CREATE_DDL_JDBC_FILE_SUFFIX, CREATE_SQL_FILE_SUFFIX, DDL, DROP, DROP_DDL_JDBC_FILE_SUFFIX, DROP_SQL_FILE_SUFFIX, JAVA_TO_DB_FLAG, JDBC_FILE_EXTENSION, JTA_DATASOURCE_JNDI_NAME_OVERRIDE, NAME_SEPARATOR, SQL_FILE_EXTENSION -
Constructor Summary
Constructors -
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 ejbcmp, 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 bundle, ClassLoader loader, String bundlePathName) Deprecated.voidinit(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, ClassLoader loader, String bundlePathName, boolean ignoreSunDeploymentDescriptors) Called by static verifier to bypass mapping validation or internally by other init() methods.voidinit(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, 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.
-
Field Details
-
SIGNATURE
Signature with CVS keyword substitution for identifying the generated code- See Also:
-
-
Constructor Details
-
JDOCodeGenerator
public JDOCodeGenerator()
-
-
Method Details
-
init
public void init(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, org.glassfish.api.deployment.DeploymentContext ctx, String bundlePathName, String generatedXmlsPathName) throws GeneratorException Description copied from interface:CMPGeneratorThis method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.- Specified by:
initin interfaceCMPGenerator- Parameters:
bundle- 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.- See Also:
-
init
public void init(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, ClassLoader loader, String bundlePathName) throws GeneratorException Deprecated.Description copied from interface:CMPGeneratorThis method is called once for each ejb module in the application that contains CMP beans. Only one #init() method can be called.- Specified by:
initin interfaceCMPGenerator- Parameters:
bundle- the EjbBundleDescriptor associated with this ejb module.loader- 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.- See Also:
-
init
public void init(org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl bundle, ClassLoader loader, String bundlePathName, boolean ignoreSunDeploymentDescriptors) throws GeneratorException Called by static verifier to bypass mapping validation or internally by other init() methods. Will force java2db generation ifignoreSunDeploymentDescriptorsistrue.- Throws:
GeneratorException- See Also:
-
validate
Description copied from interface:CMPGeneratorThis method may be called once for each CMP bean of the corresponding ejb module to perform the validation.- Specified by:
validatein interfaceCMPGenerator- 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.
- See Also:
-
generate
public void generate(org.glassfish.ejb.deployment.descriptor.IASEjbCMPEntityDescriptor ejbcmp, File srcout, File classout) throws GeneratorException Description copied from interface:CMPGeneratorThis method is called once for each CMP bean of the corresponding ejb module.- Specified by:
generatein interfaceCMPGenerator- Parameters:
ejbcmp- 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.- See Also:
-
cleanup
Description copied from interface:CMPGeneratorThis 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.- Specified by:
cleanupin interfaceCMPGenerator- Returns:
- a Collection of files to be compiled by the deployment process.
- Throws:
GeneratorException- if there is any problem.
-