use of io.crnk.core.mock.models.ProjectEager in project crnk-framework by crnk-project.
the class ProjectToProjectEagerRepository method findOneTarget.
@Override
public ProjectEager findOneTarget(Long sourceId, String fieldName, QueryParams queryParams) {
Map<Relation<Project>, Integer> repo = getRepo();
for (Relation<Project> relation : repo.keySet()) {
if (relation.getSource().getId().equals(sourceId) && relation.getFieldName().equals(fieldName)) {
ProjectEager task = new ProjectEager();
task.setId((Long) relation.getTargetId());
return task;
}
}
return null;
}
Aggregations