protected NonreflectiveMethodDefinition buildConstructor() { NonreflectiveMethodDefinition methodDefinition = new NonreflectiveMethodDefinition(); methodDefinition.setName(getClassName()); methodDefinition.setIsConstructor(true); methodDefinition.addLine("setName(\"" + getTableCreator().getName() + "\");"); methodDefinition.addLine(""); for (Enumeration tablesEnum = getTableCreator().getTableDefinitions().elements(); tablesEnum.hasMoreElements();) { TableDefinition table = (TableDefinition)tablesEnum.nextElement(); methodDefinition.addLine("addTableDefinition(build" + table.getName() + "Table());"); } return methodDefinition; }
protected NonreflectiveMethodDefinition buildTableMethod(TableDefinition table) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition(); method.setName("build" + table.getName() + "Table"); method.setReturnType("TableDefinition"); // Table method.addLine("TableDefinition table = new TableDefinition();"); method.addLine("table.setName(\"" + table.getName() + "\");"); // Fields for (Enumeration fieldsEnum = table.getFields().elements(); fieldsEnum.hasMoreElements();) { method.addLine(""); FieldDefinition field = (FieldDefinition)fieldsEnum.nextElement(); addFieldLines(field, method); } // Constraints for (Enumeration constraintsEnum = table.getForeignKeys().elements(); constraintsEnum.hasMoreElements();) { method.addLine(""); ForeignKeyConstraint foreignKey = (ForeignKeyConstraint)constraintsEnum.nextElement(); addForeignKeyLines(foreignKey, method); } method.addLine(""); method.addLine("return table;"); return method; }
protected NonreflectiveMethodDefinition buildConstructor() { NonreflectiveMethodDefinition methodDefinition = new NonreflectiveMethodDefinition(); methodDefinition.setName(getClassName()); methodDefinition.setIsConstructor(true); methodDefinition.addLine("setName(\"" + getProject().getName() + "\");"); methodDefinition.addLine("applyLogin();"); if (!getProject().getDefaultReadOnlyClasses().isEmpty()) { methodDefinition.addLine("setDefaultReadOnlyClasses(buildDefaultReadOnlyClasses());"); } methodDefinition.addLine(""); // Sort by name. Vector descriptors = buildSortedVectorOfDescriptors(getProject().getOrderedDescriptors()); for (Enumeration descriptorsEnum = descriptors.elements(); descriptorsEnum.hasMoreElements();) { ClassDescriptor descriptor = (ClassDescriptor)descriptorsEnum.nextElement(); // Singleton interface descriptors should not exist. if (!(descriptor.isDescriptorForInterface() && (descriptor.getInterfacePolicy().getImplementorDescriptor() != null))) { methodDefinition.addLine("addDescriptor(build" + getDescriptorMethodNames().get(descriptor) + "ClassDescriptor());"); } } return methodDefinition; }
NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
protected NonreflectiveMethodDefinition buildConstructor() { NonreflectiveMethodDefinition methodDefinition = new NonreflectiveMethodDefinition(); methodDefinition.setName(getClassName()); methodDefinition.setIsConstructor(true); methodDefinition.addLine("setName(\"" + getTableCreator().getName() + "\");"); methodDefinition.addLine(""); for (TableDefinition table : getTableCreator().getTableDefinitions()) { methodDefinition.addLine("addTableDefinition(build" + table.getName() + "Table());"); } return methodDefinition; }
protected NonreflectiveMethodDefinition buildConstructor() { NonreflectiveMethodDefinition methodDefinition = new NonreflectiveMethodDefinition(); methodDefinition.setName(getClassName()); methodDefinition.setIsConstructor(true); methodDefinition.addLine("setName(\"" + getTableCreator().getName() + "\");"); methodDefinition.addLine(""); for (TableDefinition table : getTableCreator().getTableDefinitions()) { methodDefinition.addLine("addTableDefinition(build" + table.getName() + "Table());"); } return methodDefinition; }
protected NonreflectiveMethodDefinition buildConstructor() { NonreflectiveMethodDefinition methodDefinition = new NonreflectiveMethodDefinition(); methodDefinition.setName(getClassName()); methodDefinition.setIsConstructor(true); methodDefinition.addLine("setName(\"" + getProject().getName() + "\");"); methodDefinition.addLine("applyLogin();"); if (!getProject().getDefaultReadOnlyClasses().isEmpty()) { methodDefinition.addLine("setDefaultReadOnlyClasses(buildDefaultReadOnlyClasses());"); } methodDefinition.addLine(""); // Sort by name. List<ClassDescriptor> descriptors = buildSortedListOfDescriptors(getProject().getOrderedDescriptors()); for (ClassDescriptor descriptor : descriptors) { // Singleton interface descriptors should not exist. if (!(descriptor.isDescriptorForInterface() && (descriptor.getInterfacePolicy().getImplementorDescriptor() != null))) { methodDefinition.addLine("addDescriptor(build" + getDescriptorMethodNames().get(descriptor) + "ClassDescriptor());"); } } return methodDefinition; }
protected NonreflectiveMethodDefinition buildConstructor() { NonreflectiveMethodDefinition methodDefinition = new NonreflectiveMethodDefinition(); methodDefinition.setName(getClassName()); methodDefinition.setIsConstructor(true); methodDefinition.addLine("setName(\"" + getProject().getName() + "\");"); methodDefinition.addLine("applyLogin();"); if (!getProject().getDefaultReadOnlyClasses().isEmpty()) { methodDefinition.addLine("setDefaultReadOnlyClasses(buildDefaultReadOnlyClasses());"); } methodDefinition.addLine(""); // Sort by name. List<ClassDescriptor> descriptors = buildSortedListOfDescriptors(getProject().getOrderedDescriptors()); for (ClassDescriptor descriptor : descriptors) { // Singleton interface descriptors should not exist. if (!(descriptor.isDescriptorForInterface() && (descriptor.getInterfacePolicy().getImplementorDescriptor() != null))) { methodDefinition.addLine("addDescriptor(build" + getDescriptorMethodNames().get(descriptor) + "ClassDescriptor());"); } } return methodDefinition; }
protected NonreflectiveMethodDefinition buildTableMethod(TableDefinition table) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition(); method.setName("build" + table.getName() + "Table"); method.setReturnType("TableDefinition"); // Table method.addLine("TableDefinition table = new TableDefinition();"); method.addLine("table.setName(\"" + table.getName() + "\");"); // Fields for (FieldDefinition field : table.getFields()) { method.addLine(""); addFieldLines(field, method); } // Constraints for (ForeignKeyConstraint foreignKey : table.getForeignKeys()) { method.addLine(""); addForeignKeyLines(foreignKey, method); } method.addLine(""); method.addLine("return table;"); return method; }
protected NonreflectiveMethodDefinition buildTableMethod(TableDefinition table) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition(); method.setName("build" + table.getName() + "Table"); method.setReturnType("TableDefinition"); // Table method.addLine("TableDefinition table = new TableDefinition();"); method.addLine("table.setName(\"" + table.getName() + "\");"); // Fields for (FieldDefinition field : table.getFields()) { method.addLine(""); addFieldLines(field, method); } // Constraints for (ForeignKeyConstraint foreignKey : table.getForeignKeys()) { method.addLine(""); addForeignKeyLines(foreignKey, method); } method.addLine(""); method.addLine("return table;"); return method; }
protected NonreflectiveMethodDefinition buildLoginMethod(Login datasourceLogin) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
protected NonreflectiveMethodDefinition buildLoginMethod(Login datasourceLogin) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
protected NonreflectiveMethodDefinition buildLoginMethod(Login datasourceLogin) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
protected NonreflectiveMethodDefinition buildLoginMethod(DatabaseLogin login) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
protected NonreflectiveMethodDefinition buildLoginMethod(DatabaseLogin login) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();
protected NonreflectiveMethodDefinition buildLoginMethod(DatabaseLogin login) { NonreflectiveMethodDefinition method = new NonreflectiveMethodDefinition();