class RepositoryServiceImpl implements RepositoryService {

	@Override
	public Optional<Repository> find(String userName, String repositoryName) {
		return userService.findByLoginName(userName).flatMap(user -> {
			return repositoryDao.findByCreateUserIdAndName(user.getId(), repositoryName);
		}).map(project -> {
			project.setCreateUserName(userName);
			return project;
		});
	}

}