fix lambda

This commit is contained in:
Anton Romanov 2019-04-26 09:47:41 +04:00
parent 9393fbe326
commit 4d2d7fa113

View File

@ -3,6 +3,7 @@ package ru.ulstu.conference.model;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.deadline.model.Deadline; import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.paper.model.Paper; import ru.ulstu.paper.model.Paper;
@ -88,8 +89,8 @@ public class ConferenceDto {
this.beginDate = conference.getBeginDate(); this.beginDate = conference.getBeginDate();
this.endDate = conference.getEndDate(); this.endDate = conference.getEndDate();
this.deadlines = conference.getDeadlines(); this.deadlines = conference.getDeadlines();
this.userIds = convert(conference.getUsers(), user -> user.getId()); this.userIds = convert(conference.getUsers(), BaseEntity::getId);
this.paperIds = convert(conference.getPapers(), paper -> paper.getId()); this.paperIds = convert(conference.getPapers(), BaseEntity::getId);
this.users = conference.getUsers(); this.users = conference.getUsers();
this.papers = conference.getPapers(); this.papers = conference.getPapers();
} }