Package com.thoughtworks.qdox.model

Examples of com.thoughtworks.qdox.model.JavaClass.addMethod()


            }

            method = new JavaMethod(getDestinationClassname(metadata));
            method.setConstructor(true);
            method.setModifiers(new String[] { "public" });
            retVal.addMethod(method);

            if (metaVo.isGeneratePKConstructor() && metaVo.hasPk()) {
                if(!isEmpty(nonPkFields) || !metaVo.isSimplePkProperty()) {
                    method = new JavaMethod(getDestinationClassname(metadata));
                    method.setConstructor(true);
View Full Code Here


                if(!isEmpty(nonPkFields) || !metaVo.isSimplePkProperty()) {
                    method = new JavaMethod(getDestinationClassname(metadata));
                    method.setConstructor(true);
                    method.setModifiers(new String[] { "public" });
                    method.setParameters(new JavaParameter[]{new JavaParameter(pkProperty.getType(), pkProperty.getName())});
                    retVal.addMethod(method);
                }
                if(!isEmpty(nonPkFields) && !metaVo.isSimplePkProperty()) {
                    method = new JavaMethod(getDestinationClassname(metadata));
                    method.setConstructor(true);
                    method.setModifiers(new String[] { "public" });
View Full Code Here

                    for (int j = 0; j < nonPkFields.length; j++) {
                        ValueObjectFieldMetadata nonPkField = nonPkFields[j];
                        params[j+1] = new JavaParameter(nonPkField.getProperty().getType(), nonPkField.getProperty().getName());
                    }
                    method.setParameters(params);
                    retVal.addMethod(method);
                }
            }

            ValueObjectFieldMetadata[] fields = metaVo.getFields();
            if (!isEmpty(fields)) {
View Full Code Here

                for (int j = 0; j < fields.length; j++) {
                    ValueObjectFieldMetadata vField = fields[j];
                    params[j] = new JavaParameter(vField.getProperty().getType(), vField.getProperty().getName());
                }
                method.setParameters(params);
                retVal.addMethod(method);
            }

            if (metaVo.hasPk() && !metaVo.isSimplePkProperty()) {
                method = new JavaMethod(pkProperty.getType(), pkProperty.getAccessor().getName());
                modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
View Full Code Here

                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
                    modifiers[1] = "synchronized";
                }
                method.setModifiers(modifiers);
                retVal.addMethod(method);

                method = new JavaMethod(pkProperty.getMutator().getName());
                modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
View Full Code Here

                if (metaVo.isFullSynchronization()) {
                    modifiers[1] = "synchronized";
                }
                method.setModifiers(modifiers);
                method.setParameters(new JavaParameter[]{new JavaParameter(pkProperty.getType(), pkProperty.getName())});
                retVal.addMethod(method);
            }

            if (getEjbUtils().isUseSoftLocking(metadata)) {
                method = new JavaMethod(new Type("int"), "getVersion");
                modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
View Full Code Here

                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
                    modifiers[1] = "synchronized";
                }
                method.setModifiers(modifiers);
                retVal.addMethod(method);

                method = new JavaMethod("setVersion");
                modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
View Full Code Here

                if (metaVo.isFullSynchronization()) {
                    modifiers[1] = "synchronized";
                }
                method.setModifiers(modifiers);
                method.setParameters(new JavaParameter[]{new JavaParameter(new Type("int"), "version")});
                retVal.addMethod(method);
            }

            for (int j = 0; (fields != null) && (j < fields.length); j++) {
                ValueObjectFieldMetadata vField = fields[j];
                method = new JavaMethod(vField.getProperty().getType(), vField.getProperty().getAccessor().getName());
View Full Code Here

                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
                    modifiers[1] = "synchronized";
                }
                method.setModifiers(modifiers);
                retVal.addMethod(method);

                method = new JavaMethod(vField.getProperty().getMutator().getName());
                modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
View Full Code Here

                if (metaVo.isFullSynchronization()) {
                    modifiers[1] = "synchronized";
                }
                method.setModifiers(modifiers);
                method.setParameters(new JavaParameter[]{new JavaParameter(vField.getProperty().getType(), vField.getProperty().getName())});
                retVal.addMethod(method);

                method = new JavaMethod(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet");
                modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
                modifiers[0] = "public";
                if (metaVo.isFullSynchronization()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.