@Override protected void generateStaticRoleSlotsMultOneSetterBody(Role role, Role otherRole, PrintWriter out) { printWords(out, "((" + otherRole.getType().getBaseName() + ")o1)." + role.getName() + ".put(o2);"); }
@Override protected void generateStaticRoleSlotsMultOneGetterBody(Role role, Role otherRole, PrintWriter out) { printWords(out, "return", "((" + otherRole.getType().getBaseName() + ")o1)." + role.getName() + ".get();"); }
protected void generateStaticRoleSlotsMultOneGetterBody(Role role, Role otherRole, PrintWriter out) { printWords(out, "return", "((" + otherRole.getType().getBaseName() + ")o1)." + role.getName() + ";"); }
protected void generateStaticRoleSlotsMultOneSetterBody(Role role, Role otherRole, PrintWriter out) { printWords(out, "((" + otherRole.getType().getBaseName() + ")o1)." + role.getName() + " = o2;"); }
@Override protected void generateStaticRoleSlotsMultOne(Role role, Role otherRole, PrintWriter out) { String rType = getTypeFullName(role.getType()); String oType = getTypeFullName(otherRole.getType()); printWords(out, "@Override"); newline(out); printMethod(out, "public", rType, "getValue", makeArg(oType, "o1")); startMethodBody(out); print(out, "return "); print(out, getReadExpression(otherRole.getType().getBaseName(), "o1", role.getName())); print(out, ";"); endMethodBody(out); printWords(out, "@Override"); newline(out); printMethod(out, "public", "void", "setValue", makeArg(oType, "o1"), makeArg(rType, "o2")); startMethodBody(out); print(out, getLValueExpression(otherRole.getType().getBaseName(), "o1", role.getName())); print(out, " = o2;"); endMethodBody(out); }
@Override protected void generateStaticRoleSlotsMultStar(Role role, Role otherRole, PrintWriter out) { String rType = getTypeFullName(role.getType()); String oType = getTypeFullName(otherRole.getType()); printMethod(out, "public", makeGenericType("pt.ist.fenixframework.dml.runtime.RelationBaseSet", rType), "getSet", makeArg(oType, "o1")); startMethodBody(out); print(out, "return (("); print(out, otherRole.getType().getBaseName()); print(out, ")o1)."); print(out, makeRelationListGetterName(role.getName()) + "()"); print(out, ";"); endMethodBody(out); }
protected void generateStaticRoleSlotsMultStar(Role role, Role otherRole, PrintWriter out) { print(out, "public "); print(out, makeGenericType("pt.ist.fenixframework.dml.runtime.RelationBaseSet", getTypeFullName(role.getType()))); print(out, " "); print(out, "getSet("); print(out, getTypeFullName(otherRole.getType())); print(out, " o1)"); startMethodBody(out); print(out, "return (" + getConcreteSetTypeDeclarationFor(role) + ") (("); print(out, otherRole.getType().getBaseName()); print(out, ") o1)."); print(out, role.getName()); print(out, ";"); endMethodBody(out); }