Merge branch 'master' of https://gitlab.hexaquo.at/sks/movies
This commit is contained in:
commit
9927038407
@ -81,9 +81,10 @@ public class MoviesService {
|
|||||||
.setParameter("postcode", movieStudio.getPostcode())
|
.setParameter("postcode", movieStudio.getPostcode())
|
||||||
.getResultList();
|
.getResultList();
|
||||||
|
|
||||||
if (!studioListResult.isEmpty() && studioListResult.size() > 0) {
|
if (!studioListResult.isEmpty()) {
|
||||||
Long actorId = studioListResult.get(0).getId();
|
// Take the first element in the list
|
||||||
movieStudio.setId(actorId);
|
Long studioId = studioListResult.get(0).getId();
|
||||||
|
movieStudio.setId(studioId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -92,7 +93,6 @@ public class MoviesService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO use also birthday
|
|
||||||
// Get actor for the movie from the database
|
// Get actor for the movie from the database
|
||||||
for (Actors movieActor : movie.getActors()) {
|
for (Actors movieActor : movie.getActors()) {
|
||||||
LOGGER.info("Get an actor " + movieActor);
|
LOGGER.info("Get an actor " + movieActor);
|
||||||
@ -103,7 +103,8 @@ public class MoviesService {
|
|||||||
.setParameter("birthdate", movieActor.getBirthdate())
|
.setParameter("birthdate", movieActor.getBirthdate())
|
||||||
.getResultList();
|
.getResultList();
|
||||||
|
|
||||||
if (!actorListResult.isEmpty() && actorListResult.size() > 0) {
|
if (!actorListResult.isEmpty()) {
|
||||||
|
// Take the first element in the list
|
||||||
Long actorId = actorListResult.get(0).getId();
|
Long actorId = actorListResult.get(0).getId();
|
||||||
movieActor.setId(actorId);
|
movieActor.setId(actorId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user