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