Package org.apache.openejb.core.cmp.cmp2

Examples of org.apache.openejb.core.cmp.cmp2.Cmp2Generator


            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here


            }
            bytes = cmp1Generator.generate();
        } else {

            // generte the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generte the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            final Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                beanClass,
                entityBeanInfo.primKeyField,
                primKeyClass,
                entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (final CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                final EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                final CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                    cmrFieldInfo.fieldType,
                    CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                    roleSource.local,
                    cmrFieldInfo.mappedBy.fieldName,
                    cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            final Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                beanClass,
                entityBeanInfo.primKeyField,
                primKeyClass,
                entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (final CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                final EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                final CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                    cmrFieldInfo.fieldType,
                    CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                    roleSource.local,
                    cmrFieldInfo.mappedBy.fieldName,
                    cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        return new Entry(cmpImplClass, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generte the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            final Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                                                                  beanClass,
                                                                  entityBeanInfo.primKeyField,
                                                                  primKeyClass,
                                                                  entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (final CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                final EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                final CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                                                       cmrFieldInfo.fieldType,
                                                       CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                                                       roleSource.local,
                                                       cmrFieldInfo.mappedBy.fieldName,
                                                       cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

            }
            bytes = cmp1Generator.generate();
        } else {

            // generate the implementation class
            Cmp2Generator cmp2Generator = new Cmp2Generator(cmpImplClass,
                    beanClass,
                    entityBeanInfo.primKeyField,
                    primKeyClass,
                    entityBeanInfo.cmpFieldNames.toArray(new String[entityBeanInfo.cmpFieldNames.size()]));

            // we need to have a complete set of the defined CMR fields available for the
            // generation process as well.
            for (CmrFieldInfo cmrFieldInfo : entityBeanInfo.cmrFields) {
                EntityBeanInfo roleSource = cmrFieldInfo.mappedBy.roleSource;
                CmrField cmrField = new CmrField(cmrFieldInfo.fieldName,
                        cmrFieldInfo.fieldType,
                        CmpUtil.getCmpImplClassName(roleSource.abstractSchemaName, roleSource.ejbClass),
                        roleSource.local,
                        cmrFieldInfo.mappedBy.fieldName,
                        cmrFieldInfo.synthetic);
                cmp2Generator.addCmrField(cmrField);
            }
            bytes = cmp2Generator.generate();
        }

        // add the generated class to the jar
        addJarEntry(jarOutputStream, entryName, bytes);
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.core.cmp.cmp2.Cmp2Generator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.