Interface ProjectRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Project,Long>, NotFoundRepository<Project,Long>, org.springframework.data.repository.Repository<Project,Long>, SoftDeleteRepository<Project,Long>

public interface ProjectRepository extends SoftDeleteRepository<Project,Long>
CRUD repository for project entity.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Project
    Finds active project by id and checks if user is member of project.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll

    Methods inherited from interface dev.vernite.vernite.utils.SoftDeleteRepository

    findByIdAndActiveNull, findByIdOrThrow
  • Method Details

    • findByIdAndMemberOrThrow

      default Project findByIdAndMemberOrThrow(long id, User user) throws EntityNotFoundException
      Finds active project by id and checks if user is member of project.
      Parameters:
      id - project id
      user - potential project member
      Returns:
      project with given id and user is its member
      Throws:
      EntityNotFoundException - thrown when project is not found or user is not member of found project