-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c5b8ed
commit f811fdc
Showing
14 changed files
with
308 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 17 additions & 6 deletions
23
src/main/java/eu/europeana/metis/sandbox/repository/debias/DetectRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
package eu.europeana.metis.sandbox.repository.debias; | ||
|
||
import eu.europeana.metis.sandbox.entity.debias.DetectionEntity; | ||
import java.util.List; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
/** | ||
* The interface Detect repository. | ||
*/ | ||
public interface DetectRepository extends JpaRepository<DetectionEntity, Long> { | ||
|
||
@Query("SELECT dec.datasetId, dec.state, dec.createdDate FROM DetectionEntity dec") | ||
List<DetectionEntity> listDbEntries(); | ||
|
||
DetectionEntity findDetectionEntityByDatasetId_DatasetId(Long datasetId); | ||
/** | ||
* Find detection entity by dataset id detection entity. | ||
* | ||
* @param datasetId the dataset id | ||
* @return the detection entity | ||
*/ | ||
DetectionEntity findDetectionEntityByDatasetId_DatasetId(Integer datasetId); | ||
|
||
/** | ||
* Update state. | ||
* | ||
* @param datasetId the dataset id | ||
* @param state the state | ||
*/ | ||
@Modifying | ||
@Query("UPDATE DetectionEntity dec SET dec.state = '?2' WHERE dec.datasetId = ?1") | ||
void updateState(Long datasetId, String state); | ||
void updateState(Integer datasetId, String state); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.