protected void generateRoleSlotMethodsMultStarIndexed(Role role, PrintWriter out, String methodModifiers,
String capitalizedSlotName, String slotAccessExpression, String typeName, String slotName) {
Slot indexedSlot = getIndexedSlot(role);
String keyField = role.getIndexProperty();
String retType = role.getType().getFullName();
String methodNameSufix = "";
boolean haveMany = role.getIndexCardinality() == Role.MULTIPLICITY_MANY;
if (haveMany) {
retType = makeGenericType("java.util.Set", retType);
}
onNewline(out);
printMethod(out, "public", retType, "get" + capitalize(role.getName()) + "By" + capitalize(keyField) + methodNameSufix,
indexedSlot.getSlotType().getFullname() + " key");
startMethodBody(out);
printWords(out, "return", getSearchForKey(role, haveMany ? getCollectionToUse() : retType));
print(out, ";");
endMethodBody(out);
}