private BeanPropertyAssocMany<?>[] getMany(Mode mode) {
    ArrayList<BeanPropertyAssocMany<?>> list = new ArrayList<BeanPropertyAssocMany<?>>();
    for (int i = 0; i < manys.size(); i++) {
      BeanPropertyAssocMany<?> prop = manys.get(i);

      switch (mode) {
        case Save:
          if (prop.getCascadeInfo().isSave()
              || prop.isManyToMany()
              || ModifyListenMode.REMOVALS.equals(prop.getModifyListenMode())) {
            // Note ManyToMany always included as we always 'save'
            // the relationship via insert/delete of intersection table
            // REMOVALS means including PrivateOwned relationships
            list.add(prop);
          }
          break;
        case Delete:
          if (prop.getCascadeInfo().isDelete()
              || ModifyListenMode.REMOVALS.equals(prop.getModifyListenMode())) {
            // REMOVALS means including PrivateOwned relationships
            list.add(prop);
          }
          break;
        default:
          break;
      }
    }

    return (BeanPropertyAssocMany[]) list.toArray(new BeanPropertyAssocMany[list.size()]);
  }
  private BeanPropertyAssocMany<?>[] getMany2Many() {
    ArrayList<BeanPropertyAssocMany<?>> list = new ArrayList<BeanPropertyAssocMany<?>>();
    for (int i = 0; i < manys.size(); i++) {
      BeanPropertyAssocMany<?> prop = manys.get(i);
      if (prop.isManyToMany()) {
        list.add(prop);
      }
    }

    return (BeanPropertyAssocMany[]) list.toArray(new BeanPropertyAssocMany[list.size()]);
  }