lab3
This commit is contained in:
parent
0a7bff0c28
commit
d9545d99d9
@ -33,24 +33,15 @@ public class FindByNameService {
|
||||
.setParameter("name", name).getResultList();
|
||||
|
||||
// добавляем результаты поиска песен в resultMap
|
||||
List<Object> songsResult = new ArrayList<>();
|
||||
for (Song song : songs) {
|
||||
songsResult.add(song);
|
||||
}
|
||||
List<Object> songsResult = new ArrayList<>(songs);
|
||||
resultMap.put("songs", songsResult);
|
||||
|
||||
// добавляем результаты поиска альбомов в resultMap
|
||||
List<Object> albumsResult = new ArrayList<>();
|
||||
for (Album album : albums) {
|
||||
albumsResult.add(album);
|
||||
}
|
||||
List<Object> albumsResult = new ArrayList<>(albums);
|
||||
resultMap.put("albums", albumsResult);
|
||||
|
||||
// добавляем результаты поиска артистов в resultMap
|
||||
List<Object> artistsResult = new ArrayList<>();
|
||||
for (Artist artist : artists) {
|
||||
artistsResult.add(artist);
|
||||
}
|
||||
List<Object> artistsResult = new ArrayList<>(artists);
|
||||
resultMap.put("artists", artistsResult);
|
||||
return resultMap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user