use of io.crnk.core.mock.models.User in project crnk-framework by crnk-project.
the class UserToTaskRepository method findOneTarget.
@Override
public Task findOneTarget(Long sourceId, String fieldName, QuerySpec querySpec) {
for (Relation<User> relation : THREAD_LOCAL_REPOSITORY.keySet()) {
if (relation.getSource().getId().equals(sourceId) && relation.getFieldName().equals(fieldName)) {
Task project = new Task();
project.setId((Long) relation.getTargetId());
return project;
}
}
return null;
}
Aggregations