コード例 #1
0
  public List<Terran> getTerran() {
    List<Terran> allTerranArmies = new ArrayList<>();
    Iterable<Terran> values = repository.findAll();

    for (Terran terran : values) allTerranArmies.add(terran);
    return allTerranArmies;
  }
コード例 #2
0
  public List<Terran> getSingleTerran(String email) {
    List<Terran> allTerranArmies = new ArrayList<>();
    Iterable<Terran> values = repository.findAll();

    for (Terran terran : values) {
      String user = terran.getUser();
      if (user.equals(email)) {
        allTerranArmies.add(terran);
      }
    }
    return allTerranArmies;
  }