Interface EventRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<EventEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<EventEntity,Long>, org.springframework.data.repository.ListCrudRepository<EventEntity,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<EventEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<EventEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<EventEntity>, org.springframework.data.repository.Repository<EventEntity,Long>

public interface EventRepository extends org.springframework.data.jpa.repository.JpaRepository<EventEntity,Long>
The Interface EventRepository provides generic CRUD operations for the EventEntity.
Author:
Infosys Equinox
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    existsByIdAndCollectionId(long id, long collectionId)
    existsByIdAndCollectionId - To check if a event exists for the given id and collectionId.
    org.springframework.data.domain.Page<EventEntity>
    findAll(org.springframework.data.jpa.domain.Specification<EventEntity> specification, org.springframework.data.domain.Pageable pageRequest)
    findAll - To find all the events according to the given specification.
    findByIdAndCollectionId(long id, long collectionId)
    findByIdAndCollectionId - To find an event for the given id and collectionId.
    findByNameAndCollectionId(String name, long collectionId)
    findByNameAndCollectionId - To find an event for the given name and collectionId.

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

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    findAll, findAllById, saveAll

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

    findAll

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

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByNameAndCollectionId

      Optional<EventEntity> findByNameAndCollectionId(String name, long collectionId)
      findByNameAndCollectionId - To find an event for the given name and collectionId.
      Parameters:
      name - Indicates the name of the event.
      collectionId - Indicates the collection id.
      Returns:
      the Optional of EventEntity object.
    • findByIdAndCollectionId

      EventEntity findByIdAndCollectionId(long id, long collectionId)
      findByIdAndCollectionId - To find an event for the given id and collectionId.
      Parameters:
      id - the id
      collectionId - the collectionId
      Returns:
      the optional
    • findAll

      org.springframework.data.domain.Page<EventEntity> findAll(org.springframework.data.jpa.domain.Specification<EventEntity> specification, org.springframework.data.domain.Pageable pageRequest)
      findAll - To find all the events according to the given specification.
      Parameters:
      specification - the specification
      pageRequest - the pageRequest
      Returns:
      page of EventEntity
    • existsByIdAndCollectionId

      boolean existsByIdAndCollectionId(long id, long collectionId)
      existsByIdAndCollectionId - To check if a event exists for the given id and collectionId.
      Parameters:
      id - the id
      collectionId - the collectionId
      Returns:
      boolean value to tell if the event exists or not.