-
Notifications
You must be signed in to change notification settings - Fork 10
Srushti gangireddy/advanced concept search fix #939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SrushtiGangireddy
merged 32 commits into
master
from
SrushtiGangireddy/advancedConceptSearchFix
Jun 22, 2018
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
810854b
Advanced concept search dialect fix
b8165df
search codes
e1a7505
added match type and standard concept
5c85085
added match type and standard concept
d57596b
Working predicate change
b3a978a
Changed predicate
6f54c58
Codacy fix
de53aa8
Codacy fix
53719c6
Tests to test the order of match
e1794a2
standard concept fetch fix
d28e1b1
standard concept fetch fix
a4c5084
standard concept fetch fix
6d1ef38
multiple standard concept fix
c0c5154
changed match type to enum
ed756f7
added c to standard concept check
14cef89
Test added to fetch concepts from concept relationship
ab1b99b
concept relationship test
441c2b6
Codacy fix
c2cf5d4
Controller Test
8097210
Data Browser Controller Test
4f80067
Removing unused imports
5d2173c
data browser controller tests
afbf889
empty search
4d1c3d7
test
8c95534
Got rid of conceptsSearch and changed the findAllConceptsOrderedBy to…
1dc4188
commented ref to getConceptsSearch
bbe8c1e
Codacy fix
99c637c
query update
302a8be
query update
0d767d8
Added standardcode or id match enum
050bf9d
tweaks to the predicate addition
e61573c
indentation tweaks
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
10 changes: 10 additions & 0 deletions
10
common-api/src/main/java/org/pmiops/workbench/cdr/dao/ConceptRelationshipDao.java
This file contains hidden or 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,10 @@ | ||
package org.pmiops.workbench.cdr.dao; | ||
|
||
import java.util.List; | ||
import org.pmiops.workbench.cdr.model.ConceptRelationship; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface ConceptRelationshipDao extends CrudRepository<ConceptRelationship, Long> { | ||
|
||
List<ConceptRelationship> findAll(); | ||
} |
This file contains hidden or 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
51 changes: 51 additions & 0 deletions
51
common-api/src/main/java/org/pmiops/workbench/cdr/model/ConceptRelationship.java
This file contains hidden or 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,51 @@ | ||
package org.pmiops.workbench.cdr.model; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EmbeddedId; | ||
import javax.persistence.Table; | ||
import javax.persistence.AttributeOverride; | ||
import javax.persistence.AttributeOverrides; | ||
|
||
import org.pmiops.workbench.cdr.model.ConceptRelationshipId; | ||
|
||
|
||
@Entity | ||
//TODO need to add a way to dynamically switch between database versions | ||
//this dynamic connection will eliminate the need for the catalog attribute | ||
@Table(name = "concept_relationship") | ||
public class ConceptRelationship { | ||
|
||
private ConceptRelationshipId conceptRelationshipId; | ||
|
||
@EmbeddedId | ||
@AttributeOverrides({ | ||
@AttributeOverride(name="conceptId1", | ||
column=@Column(name="concept_id_1")), | ||
@AttributeOverride(name="conceptId2", | ||
column=@Column(name="concept_id_2")), | ||
@AttributeOverride(name="relationshipId", | ||
column=@Column(name="relationship_id")) | ||
}) | ||
public ConceptRelationshipId getConceptRelationshipId() { | ||
return conceptRelationshipId; | ||
} | ||
|
||
public void setConceptRelationshipId(ConceptRelationshipId conceptRelationshipId) { | ||
this.conceptRelationshipId = conceptRelationshipId; | ||
} | ||
|
||
public ConceptRelationship conceptRelationshipId(ConceptRelationshipId conceptRelationshipId) { | ||
this.conceptRelationshipId = conceptRelationshipId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this) | ||
.append("conceptRelationshipId", conceptRelationshipId) | ||
.toString(); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we may want to make this filter be the default behavior if no filter is specified in the request. If we don't, you should have an else block after this that adds the logic that used to be on lines 125-129... we should always apply a filter on name / ID. (And you should make sure DataBrowserController passes this filter in.)