-
Notifications
You must be signed in to change notification settings - Fork 6
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
Luke Sikina
committed
Dec 24, 2023
1 parent
9dd6ef2
commit 7301781
Showing
4 changed files
with
56 additions
and
21 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
16 changes: 16 additions & 0 deletions
16
service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/util/QueryUUIDGen.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.service.util; | ||
|
||
import edu.harvard.dbmi.avillach.util.UUIDv5; | ||
import edu.harvard.hms.dbmi.avillach.hpds.data.query.Query; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class QueryUUIDGen { | ||
public void setId(Query query) { | ||
query.setId(""); // the id is included in the toString | ||
// I clear it here to keep the ID setting stable for any query | ||
// of identical structure and content | ||
String id = UUIDv5.UUIDFromString(query.toString()).toString(); | ||
query.setId(id); | ||
} | ||
} |