Package org.springframework.roo.classpath.itd

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


                FACES_CONTEXT, UI_COMPONENT);

        final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
        bodyBuilder
                .appendFormalLine("if (value == null || value.length() == 0) {");
        bodyBuilder.indent();
        bodyBuilder.appendFormalLine("return null;");
        bodyBuilder.indentRemove();
        bodyBuilder.appendFormalLine("}");
        bodyBuilder.appendFormalLine(returnType.getSimpleTypeName() + " "
                + ID_FIELD_NAME + " = "
View Full Code Here


    final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
    bodyBuilder.appendFormalLine(collectionName + " " + localEnitiesName
        + " = new " + instantiableCollection + "();");
    bodyBuilder.appendFormalLine("for (Key key : " + entityIdsName + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine(simpleCollectionElementTypeName
        + " entity = " + simpleCollectionElementTypeName + ".find"
        + simpleCollectionElementTypeName + "(key.getId());");
    bodyBuilder.appendFormalLine("if (entity != null) {");
    bodyBuilder.indent();
View Full Code Here

    bodyBuilder.indent();
    bodyBuilder.appendFormalLine(simpleCollectionElementTypeName
        + " entity = " + simpleCollectionElementTypeName + ".find"
        + simpleCollectionElementTypeName + "(key.getId());");
    bodyBuilder.appendFormalLine("if (entity != null) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine(localEnitiesName + ".add(entity);");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
View Full Code Here

    bodyBuilder.appendFormalLine(collectionName + " " + localEnitiesName
        + " = new " + instantiableCollection + "();");
    bodyBuilder
        .appendFormalLine("List<Long> longIds = new ArrayList<Long>();");
    bodyBuilder.appendFormalLine("for (Key key : " + entityIdsName + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("if (!longIds.contains(key.getId())) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("longIds.add(key.getId());");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
View Full Code Here

    bodyBuilder
        .appendFormalLine("List<Long> longIds = new ArrayList<Long>();");
    bodyBuilder.appendFormalLine("for (Key key : " + entityIdsName + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("if (!longIds.contains(key.getId())) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("longIds.add(key.getId());");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
View Full Code Here

    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("for ("
        + collectionElementType.getSimpleTypeName() + " entity : "
        + entityCollectionName + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("if (!longIds.contains(entity."
        + identifierMethodName + "())) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("longIds.add(entity."
        + identifierMethodName + "());");
View Full Code Here

        + collectionElementType.getSimpleTypeName() + " entity : "
        + entityCollectionName + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("if (!longIds.contains(entity."
        + identifierMethodName + "())) {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("longIds.add(entity."
        + identifierMethodName + "());");
    bodyBuilder.appendFormalLine(entityIdsName
        + ".add(KeyFactory.createKey("
        + collectionElementType.getSimpleTypeName()
View Full Code Here

        .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 + ") {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = "
View Full Code Here

        .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
        + "(this." + entityIdName + ");");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
View Full Code Here

        + "(this." + entityIdName + ");");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("} else {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = null;");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("return this." + entityName + ";");
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.