getOrCreateFunction(i).addPermission(permission); permission.addLimit(getOrCreateLimit(i));
getOrCreateFunction(permissionNum).addPermission(permission);  for (int limitNum = 0; limitNum <= permissionNum; limitNum++) { permission.addLimit(getOrCreateLimit(limitNum)); }
  public Fixtures(Signet signet)  throws  	OperationNotSupportedException,  	TreeNotFoundException,  	SignetAuthorityException,  	ObjectNotFoundException  {    super();    this.signet = signet;        for (int i = 0; i < Constants.MAX_SUBJECTS; i++)    {      Subject subject = getOrCreateSubject(i);      signet.save(subject);    }        this.subsystem = getOrCreateSubsystem();        this.tree = getOrCreateTree();    this.subsystem.setTree(this.tree);        for (int i = 0; i < Constants.MAX_CATEGORIES; i++)    {      Category category = getOrCreateCategory(i);     }        for (int i = 0; i < Constants.MAX_CHOICE_SETS; i++)    {      ChoiceSet choiceSet = getOrCreateChoiceSet(i);     }        for (int i = 0; i < Constants.MAX_LIMITS; i++)    {      Limit limit = getOrCreateLimit(i);    }        for (int i = 0; i < Constants.MAX_FUNCTIONS; i++)    {      Function function = getOrCreateFunction(i);    }        for (int i = 0; i < Constants.MAX_PERMISSIONS; i++)    {      Permission permission = getOrCreatePermission(i);            // Permission 0 is associated with Limit 0 and Function 0,      // Permission 1 is associated with Limit 1 and Function 1, and so on.      getOrCreateFunction(i).addPermission(permission);      permission.addLimit(getOrCreateLimit(i));    }        signet.save(this.subsystem);        for (int i = 0; i < Constants.MAX_SUBJECTS; i++)    {      Assignment assignment = createAssignment(i);      this.signet.save(assignment);    }      }