Package org.springframework.roo.classpath.itd

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


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


    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = "
        + simpleFieldTypeName + ".find" + simpleFieldTypeName
        + "(this." + entityIdName + ");");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("} else {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = null;");
    bodyBuilder.indentRemove();
View Full Code Here

        + simpleFieldTypeName + ".find" + simpleFieldTypeName
        + "(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

    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 + ";");

    return bodyBuilder;
View Full Code Here

    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("} else {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = null;");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("return this." + entityName + ";");

    return bodyBuilder;
  }
View Full Code Here

    bodyBuilder.appendFormalLine("} else {");
    bodyBuilder.indent();
    bodyBuilder.appendFormalLine("this." + entityName + " = null;");
    bodyBuilder.indentRemove();
    bodyBuilder.appendFormalLine("}");
    bodyBuilder.appendFormalLine("return this." + entityName + ";");

    return bodyBuilder;
  }

  private FieldMetadataBuilder getSingularEntityIdField(
View Full Code Here

    final String entityIdName = hiddenIdFieldName.getSymbolName();
    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();");
View Full Code Here

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

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

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