-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Open-MBEE/feature/elasticRefactor
refactor elastic impl into module, use optional for single returns, w…
- Loading branch information
Showing
48 changed files
with
774 additions
and
691 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
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
5 changes: 3 additions & 2 deletions
5
core/src/main/java/org/openmbee/sdvc/core/repositories/OrganizationRepository.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,14 +1,15 @@ | ||
package org.openmbee.sdvc.core.repositories; | ||
|
||
import java.util.Optional; | ||
import org.openmbee.sdvc.core.domains.Organization; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface OrganizationRepository extends JpaRepository<Organization, String> { | ||
|
||
Organization findByOrganizationId(String id); | ||
Optional<Organization> findByOrganizationId(String id); | ||
|
||
Organization findByOrganizationName(String name); | ||
Optional<Organization> findByOrganizationName(String name); | ||
|
||
} |
5 changes: 3 additions & 2 deletions
5
core/src/main/java/org/openmbee/sdvc/core/repositories/ProjectRepository.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,14 +1,15 @@ | ||
package org.openmbee.sdvc.core.repositories; | ||
|
||
import java.util.Optional; | ||
import org.openmbee.sdvc.core.domains.Project; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ProjectRepository extends JpaRepository<Project, String> { | ||
|
||
Project findByProjectId(String id); | ||
Optional<Project> findByProjectId(String id); | ||
|
||
Project findByProjectName(String name); | ||
Optional<Project> findByProjectName(String name); | ||
|
||
} |
3 changes: 2 additions & 1 deletion
3
core/src/main/java/org/openmbee/sdvc/core/repositories/RoleRepository.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,12 +1,13 @@ | ||
package org.openmbee.sdvc.core.repositories; | ||
|
||
import java.util.Optional; | ||
import org.openmbee.sdvc.core.domains.Role; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface RoleRepository extends JpaRepository<Role, String> { | ||
|
||
Role findByName(String name); | ||
Optional<Role> findByName(String name); | ||
|
||
} |
5 changes: 3 additions & 2 deletions
5
core/src/main/java/org/openmbee/sdvc/core/repositories/UserRepository.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,14 +1,15 @@ | ||
package org.openmbee.sdvc.core.repositories; | ||
|
||
import java.util.Optional; | ||
import org.openmbee.sdvc.core.domains.User; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface UserRepository extends JpaRepository<User, String> { | ||
|
||
User findByEmail(String email); | ||
Optional<User> findByEmail(String email); | ||
|
||
User findByUsername(String username); | ||
Optional<User> findByUsername(String username); | ||
|
||
} |
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
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
Oops, something went wrong.