Package org.springframework.roo.classpath.itd

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


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

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


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

                final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
                bodyBuilder.appendFormalLine("if ("
                        + entityName.getSymbolName() + " != null && "
                        + entityName.getSymbolName() + ".get"
                        + StringUtils.capitalize(fieldName) + "() != null) {");
                bodyBuilder.indent();
                bodyBuilder
                        .appendFormalLine("return new DefaultStreamedContent(new ByteArrayInputStream("
                                + entityName.getSymbolName()
                                + ".get"
                                + StringUtils.capitalize(fieldName)
View Full Code Here

        bodyBuilder.appendFormalLine("List<" + simpleTypeName
                + "> suggestions = new ArrayList<" + simpleTypeName + ">();");
        bodyBuilder.appendFormalLine("for (" + simpleTypeName + " "
                + StringUtils.uncapitalize(simpleTypeName) + " : "
                + findAllMethod.getMethodCall() + ") {");
        bodyBuilder.indent();

        final StringBuilder sb = new StringBuilder();
        @SuppressWarnings("unchecked")
        final List<FieldMetadata> applicationTypeFields = (List<FieldMetadata>) field
                .getCustomData().get(APPLICATION_TYPE_FIELDS_KEY);
View Full Code Here

                + "Str = String.valueOf(" + sb.toString().trim() + ");");

        bodyBuilder.appendFormalLine("if ("
                + StringUtils.uncapitalize(simpleTypeName)
                + "Str.toLowerCase().startsWith(query.toLowerCase())) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("suggestions.add("
                + StringUtils.uncapitalize(simpleTypeName) + ");");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.indentRemove();
View Full Code Here

        bodyBuilder.appendFormalLine("List<" + simpleTypeName
                + "> suggestions = new ArrayList<" + simpleTypeName + ">();");
        bodyBuilder.appendFormalLine("for (" + simpleTypeName + " "
                + StringUtils.uncapitalize(simpleTypeName) + " : "
                + simpleTypeName + ".values()) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("if ("
                + StringUtils.uncapitalize(simpleTypeName)
                + ".name().toLowerCase().startsWith(query.toLowerCase())) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("suggestions.add("
View Full Code Here

                + simpleTypeName + ".values()) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("if ("
                + StringUtils.uncapitalize(simpleTypeName)
                + ".name().toLowerCase().startsWith(query.toLowerCase())) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("suggestions.add("
                + StringUtils.uncapitalize(simpleTypeName) + ");");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.indentRemove();
View Full Code Here

    private MethodMetadataBuilder getEntityAccessorMethod() {
        final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
        bodyBuilder.appendFormalLine("if (" + entityName.getSymbolName()
                + " == null) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine(entityName.getSymbolName() + " = new "
                + entity.getSimpleTypeName() + "();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.appendFormalLine("return " + entityName.getSymbolName()
View Full Code Here

            bodyBuilder
                    .appendFormalLine("if (" + entityName.getSymbolName()
                            + " != null && " + entityAccessorMethodCall
                            + " != null) {");
            bodyBuilder.indent();
            bodyBuilder.appendFormalLine(getSelectedFieldName(fieldName)
                    + " = new ArrayList<" + parameterType.getSimpleTypeName()
                    + ">(" + entityAccessorMethodCall + ");");
            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("}");
View Full Code Here

        final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
        switch (action) {
        case CREATE:
            bodyBuilder.appendFormalLine("if (" + fieldName + " == null) {");
            bodyBuilder.indent();
            bodyBuilder.appendFormalLine(fieldName
                    + " = populateCreatePanel();");
            bodyBuilder.indentRemove();
            bodyBuilder.appendFormalLine("}");
            bodyBuilder.appendFormalLine("return " + fieldName + ";");
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.