Interface CatalogRepository

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

public interface CatalogRepository extends org.springframework.data.jpa.repository.JpaRepository<Catalog,String>, org.springframework.data.repository.history.RevisionRepository<Catalog,String,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
    Find a catalog by id with a pessimistic write lock.

    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

    Methods inherited from interface org.springframework.data.repository.history.RevisionRepository

    findLastChangeRevision, findRevision, findRevisions, findRevisions
  • Method Details

    • findByIdWithLock

      @Query("SELECT c FROM Catalog c WHERE c.id = :id") @Lock(PESSIMISTIC_WRITE) Optional<Catalog> findByIdWithLock(@Param("id") String id)
      Find a catalog by id with a pessimistic write lock. This will prevent other transactions from modifying the catalog until the current transaction is complete.
      Parameters:
      id - the id of the catalog
      Returns:
      an Optional containing the catalog if found, or empty if not found