Package org.springframework.roo.classpath.itd

Examples of org.springframework.roo.classpath.itd.InvocableMemberBodyBuilder.appendFormalLine()


    bodyBuilder.appendFormalLine(entityIdsName
        + ".add(KeyFactory.createKey("
        + collectionElementType.getSimpleTypeName()
        + ".class.getName(), entity." + identifierMethodName + "()));");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine(localEnitiesName + ".add(entity);");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("this." + entityCollectionName + " = "
        + localEnitiesName + ";");
View Full Code Here


        + ".add(KeyFactory.createKey("
        + collectionElementType.getSimpleTypeName()
        + ".class.getName(), entity." + identifierMethodName + "()));");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine(localEnitiesName + ".add(entity);");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("this." + entityCollectionName + " = "
        + localEnitiesName + ";");
View Full Code Here

        }

        // We declared the field in this ITD, so produce a public accessor for
        // it
        final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
        bodyBuilder.appendFormalLine("return this."
                + idField.getFieldName().getSymbolName() + ";");

        return new MethodMetadataBuilder(getId(), Modifier.PUBLIC,
                requiredAccessorName, idField.getFieldType(), bodyBuilder);
    }
View Full Code Here

        + ".class.getName(), entity." + identifierMethodName + "()));");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine(localEnitiesName + ".add(entity);");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("this." + entityCollectionName + " = "
        + localEnitiesName + ";");

    return bodyBuilder;
  }
View Full Code Here

    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine(localEnitiesName + ".add(entity);");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("this." + entityCollectionName + " = "
        + localEnitiesName + ";");

    return bodyBuilder;
  }
View Full Code Here

            }
        }

        // We declared the field in this ITD, so produce a public mutator for it
        final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
        bodyBuilder.appendFormalLine("this."
                + idField.getFieldName().getSymbolName() + " = id;");

        return new MethodMetadataBuilder(getId(), Modifier.PUBLIC,
                requiredMutatorName, JavaType.VOID_PRIMITIVE,
                AnnotatedJavaType.convertFromJavaTypes(parameterTypes),
View Full Code Here

  }

  private InvocableMemberBodyBuilder getInterfaceMethodBody(
      JavaType returnType) {
    final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
    bodyBuilder.appendFormalLine("// Interface Implementation");
    bodyBuilder.appendFormalLine("return 0;");
    return bodyBuilder;
  }

  private JavaSymbolName getIdentifierMethodName(final FieldMetadata field) {
View Full Code Here

  private InvocableMemberBodyBuilder getInterfaceMethodBody(
      JavaType returnType) {
    final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
    bodyBuilder.appendFormalLine("// Interface Implementation");
    bodyBuilder.appendFormalLine("return 0;");
    return bodyBuilder;
  }

  private JavaSymbolName getIdentifierMethodName(final FieldMetadata field) {
    final JavaSymbolName identifierAccessorMethodName = declaredFields
View Full Code Here

    final String identifierMethodName = getIdentifierMethodName(field)
        .getSymbolName();

    final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
    bodyBuilder
        .appendFormalLine("if (this." + entityIdName + " != null) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("if (this." + entityName
        + " == null || this." + entityName + "." + identifierMethodName
        + "() != this." + entityIdName + ") {");
View Full Code Here

    final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
    bodyBuilder
        .appendFormalLine("if (this." + entityIdName + " != null) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("if (this." + entityName
        + " == null || this." + entityName + "." + identifierMethodName
        + "() != this." + entityIdName + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = "
        + simpleFieldTypeName + ".find" + simpleFieldTypeName
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.