Package org.springframework.roo.classpath.itd

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


                .appendFormalLine("msg.append(\"[\").append(cv.getRootBean().getClass().getName()).append(\".\").append(cv.getPropertyPath()).append(\": \").append(cv.getMessage()).append(\" (invalid value = \").append(cv.getInvalidValue()).append(\")\").append(\"]\");");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder
                .appendFormalLine("throw new IllegalStateException(msg.toString(), e);");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        if (flushMethod != null) {
            bodyBuilder.appendFormalLine(flushMethod.getMethodCall() + ";");
            flushMethod.copyAdditionsTo(builder, governorTypeDetails);
        }
View Full Code Here


        .appendFormalLine("String enc = httpServletRequest.getCharacterEncoding();");
    bodyBuilder.appendFormalLine("if (enc == null) {");
    bodyBuilder.indent();
    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);");
View Full Code Here

        if (flushMethod != null) {
            bodyBuilder.appendFormalLine(flushMethod.getMethodCall() + ";");
            flushMethod.copyAdditionsTo(builder, governorTypeDetails);
        }
        bodyBuilder.appendFormalLine(dataField + ".add(" + OBJ_VAR + ");");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");

        // Create the method
        return new MethodMetadataBuilder(getId(), Modifier.PUBLIC, methodName,
                returnType,
View Full Code Here

        bodyBuilder.appendFormalLine("solrServer.deleteById(\""
                + destination.getSimpleTypeName().toLowerCase() + "_\" + "
                + javaBeanFieldName + "."
                + identifierAccessor.getMethodName().getSymbolName() + "());");
        bodyBuilder.appendFormalLine("solrServer.commit();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("} catch (Exception e) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("e.printStackTrace();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
View Full Code Here

        bodyBuilder.appendFormalLine("solrServer.commit();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("} catch (Exception e) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("e.printStackTrace();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");

        final MethodMetadataBuilder methodBuilder = new MethodMetadataBuilder(
                getId(), Modifier.PUBLIC | Modifier.STATIC, methodName,
                JavaType.VOID_PRIMITIVE,
View Full Code Here

                .appendFormalLine("// Add summary field to allow searching documents for objects of this type");
        bodyBuilder.appendFormalLine("sid.addField(\""
                + destination.getSimpleTypeName().toLowerCase()
                + "_solrsummary_t\", " + textField.toString() + ");");
        bodyBuilder.appendFormalLine(listVar + ".add(sid);");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.appendFormalLine("try {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine(getSimpleName(SOLR_SERVER)
                + " solrServer = solrServer();");
View Full Code Here

        bodyBuilder.indent();
        bodyBuilder.appendFormalLine(getSimpleName(SOLR_SERVER)
                + " solrServer = solrServer();");
        bodyBuilder.appendFormalLine("solrServer.add(" + listVar + ");");
        bodyBuilder.appendFormalLine("solrServer.commit();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("} catch (Exception e) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("e.printStackTrace();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
View Full Code Here

        bodyBuilder.appendFormalLine("solrServer.commit();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("} catch (Exception e) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("e.printStackTrace();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");

        final MethodMetadataBuilder methodBuilder = new MethodMetadataBuilder(
                getId(), Modifier.PUBLIC | Modifier.STATIC, methodName,
                JavaType.VOID_PRIMITIVE,
View Full Code Here

        final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
        bodyBuilder.appendFormalLine("try {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("return solrServer().query(query);");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("} catch (Exception e) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("e.printStackTrace();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
View Full Code Here

        bodyBuilder.appendFormalLine("return solrServer().query(query);");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("} catch (Exception e) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("e.printStackTrace();");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.appendFormalLine("return new "
                + getSimpleName(queryResponse) + "();");

        return new MethodMetadataBuilder(getId(), Modifier.PUBLIC
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.