Package org.springframework.roo.classpath.itd

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


    bodyBuilder.indent();
    bodyBuilder
        .appendFormalLine("public String convert("
            + targetType.getSimpleTypeName() + " " + targetTypeName
            + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine(getTypeToStringLine(targetType,
        targetTypeName, toStringMethods));
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.indentRemove();
View Full Code Here


    bodyBuilder.appendFormalLine("enc = " + getShortName(WEB_UTILS)
        + ".DEFAULT_CHARACTER_ENCODING;");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("try {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("pathSegment = " + getShortName(URI_UTILS)
        + ".encodePathSegment(pathSegment, enc);");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("} catch ("
        + getShortName(UNSUPPORTED_ENCODING_EXCEPTION) + " uee) {}");
View Full Code Here

            if (fieldType.equals(BIG_INTEGER)) {
                bodyBuilder.appendFormalLine("if (" + fieldName
                        + ".compareTo(new " + BIG_INTEGER.getSimpleTypeName()
                        + "(\"" + minValue + "\")) == -1) {");
                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = new "
                        + BIG_INTEGER.getSimpleTypeName() + "(\"" + minValue
                        + "\");");
            }
            else {
View Full Code Here

                        + "\");");
            }
            else {
                bodyBuilder.appendFormalLine("if (" + fieldName + " < "
                        + minValue + suffix + ") {");
                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = " + minValue
                        + suffix + ";");
            }

            bodyBuilder.indentRemove();
View Full Code Here

    final String plural = javaTypeMetadataHolder.getPlural().toLowerCase();

    final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
    bodyBuilder.appendFormalLine("if (page != null || size != null) {");
    bodyBuilder.indent();
    bodyBuilder
        .appendFormalLine("int sizeNo = size == null ? 10 : size.intValue();");
    bodyBuilder
        .appendFormalLine("final int firstResult = page == null ? 0 : (page.intValue() - 1) * sizeNo;");
    bodyBuilder.appendFormalLine("uiModel.addAttribute(\"" + plural
View Full Code Here

            if (fieldType.equals(BIG_INTEGER)) {
                bodyBuilder.appendFormalLine("if (" + fieldName
                        + ".compareTo(new " + BIG_INTEGER.getSimpleTypeName()
                        + "(\"" + maxValue + "\")) == 1) {");
                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = new "
                        + BIG_INTEGER.getSimpleTypeName() + "(\"" + maxValue
                        + "\");");
            }
            else {
View Full Code Here

        + countAllAdditions.getMethodCall() + " / sizeNo;");
    bodyBuilder
        .appendFormalLine("uiModel.addAttribute(\"maxPages\", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("} else {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("uiModel.addAttribute(\"" + plural
        + "\", " + findAllAdditions.getMethodCall() + ");");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    if (!dateTypes.isEmpty()) {
View Full Code Here

                        + "\");");
            }
            else {
                bodyBuilder.appendFormalLine("if (" + fieldName + " > "
                        + maxValue + suffix + ") {");
                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = " + maxValue
                        + suffix + ";");
            }

            bodyBuilder.indentRemove();
View Full Code Here

                bodyBuilder.appendFormalLine("if (" + fieldName
                        + ".compareTo(new " + BIG_INTEGER.getSimpleTypeName()
                        + "(\"" + minValue + "\")) == -1 || " + fieldName
                        + ".compareTo(new " + BIG_INTEGER.getSimpleTypeName()
                        + "(\"" + maxValue + "\")) == 1) {");
                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = new "
                        + BIG_INTEGER.getSimpleTypeName() + "(\"" + maxValue
                        + "\");");
            }
            else {
View Full Code Here

            }
            else {
                bodyBuilder.appendFormalLine("if (" + fieldName + " < "
                        + minValue + suffix + " || " + fieldName + " > "
                        + maxValue + suffix + ") {");
                bodyBuilder.indent();
                bodyBuilder.appendFormalLine(fieldName + " = " + maxValue
                        + suffix + ";");
            }

            bodyBuilder.indentRemove();
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.