bodyBuilder.appendFormalLine("if (!longIds.contains(entity."
+ identifierMethodName + "())) {");
bodyBuilder.indent();
bodyBuilder.appendFormalLine("longIds.add(entity."
+ identifierMethodName + "());");
bodyBuilder.appendFormalLine(entityIdsName
+ ".add(KeyFactory.createKey("
+ collectionElementType.getSimpleTypeName()
+ ".class.getName(), entity." + identifierMethodName + "()));");
bodyBuilder.indentRemove();
bodyBuilder.appendFormalLine("}");