mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-17 02:58:48 +00:00
30 lines
657 B
Java
30 lines
657 B
Java
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
import java.util.ArrayList;
|
|
|
|
public class ItemSearch {
|
|
ArrayList<Item> results;
|
|
|
|
ItemSearch(ResultSet searchResults) throws SQLException {
|
|
results = new ArrayList<>();
|
|
while (searchResults.next()) {
|
|
results.add(new Item(searchResults));
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "ItemSearch{" +
|
|
"results=" + results +
|
|
'}';
|
|
}
|
|
|
|
public ArrayList<Item> getResults() {
|
|
return results;
|
|
}
|
|
|
|
public void setResults(ArrayList<Item> results) {
|
|
this.results = results;
|
|
}
|
|
}
|