MoviePersistenceServiceImpl.java 文件源码

java
阅读 90 收藏 0 点赞 0 评论 0

项目:REST-Web-Services 作者:
/**
 * {@inheritDoc}
 */
@Override
public void updateBoxOffice(
        @NotNull @Valid final BoxOffice boxOffice,
        @Min(1) final Long boxOfficeId,
        @NotNull final MovieEntity movie
) throws ResourceConflictException {
    log.info("Called with boxOffice {}, boxOfficeId {}, movie {}", boxOffice, boxOfficeId, movie);

    this.existsBoxOffice(movie.getBoxOffices()
            .stream()
            .filter(bo -> bo.getStatus() == DataStatus.ACCEPTED)
            .collect(Collectors.toList()), boxOffice);

    final MovieBoxOfficeEntity movieBoxOffice = this.entityManager.find(MovieBoxOfficeEntity.class, boxOfficeId);
    movieBoxOffice.setBoxOffice(boxOffice.getBoxOffice());
    movieBoxOffice.setCountry(boxOffice.getCountry());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号