Package com.lpvs.repository
Interface LPVSLicenseRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<LPVSLicense,
,Long> org.springframework.data.jpa.repository.JpaRepository<LPVSLicense,
,Long> org.springframework.data.repository.ListCrudRepository<LPVSLicense,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<LPVSLicense,
,Long> org.springframework.data.repository.PagingAndSortingRepository<LPVSLicense,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<LPVSLicense>
,org.springframework.data.repository.Repository<LPVSLicense,
Long>
@Repository
public interface LPVSLicenseRepository
extends org.springframework.data.jpa.repository.JpaRepository<LPVSLicense,Long>
Repository interface for managing
LPVSLicense
entities.
Extends JpaRepository
for basic CRUD operations.-
Method Summary
Modifier and TypeMethodDescriptionRetrieve all SPDX identifiers of licenses from the database.Search for a license by SPDX identifier.searchByAlternativeLicenseNames
(String licenseName) Search for a license by alternative license names.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
-
findFirstBySpdxIdOrderByLicenseIdDesc
Search for a license by SPDX identifier.- Parameters:
spdxId
- The SPDX identifier of the license.- Returns:
- The latest
LPVSLicense
entity with the specified SPDX identifier.
-
searchByAlternativeLicenseNames
@Query("SELECT l FROM LPVSLicense l WHERE (CONCAT(\',\', l.alternativeNames, \',\') LIKE CONCAT(\'%,\', :licenseName, \',%\')) ORDER BY l.licenseId DESC LIMIT 1") LPVSLicense searchByAlternativeLicenseNames(@Param("licenseName") String licenseName) Search for a license by alternative license names.- Parameters:
licenseName
- The alternative license name to search for.- Returns:
- The latest
LPVSLicense
entity with the specified alternative license name.
-
findAllSpdxId
Retrieve all SPDX identifiers of licenses from the database.- Returns:
- List of SPDX identifiers as Strings.
-