-
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.
Replace @entitygraph use with casting for springBoot migration
- Loading branch information
Seddik Yengui
committed
Aug 27, 2024
1 parent
4d9293c
commit 7511211
Showing
3 changed files
with
60 additions
and
19 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...main/java/org/gridsuite/modification/server/repositories/GeneratorCreationRepository.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,29 @@ | ||
/* | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package org.gridsuite.modification.server.repositories; | ||
|
||
import com.powsybl.iidm.network.Generator; | ||
import org.gridsuite.modification.server.entities.equipment.creation.GeneratorCreationEntity; | ||
import org.gridsuite.modification.server.entities.equipment.modification.GeneratorModificationEntity; | ||
import org.springframework.data.jpa.repository.EntityGraph; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
/** | ||
* @author Seddik Yengui <seddik.yengui_externe at rte-france.com> | ||
*/ | ||
|
||
public interface GeneratorCreationRepository extends JpaRepository<GeneratorCreationEntity, UUID> { | ||
@EntityGraph(attributePaths = {"reactiveCapabilityCurvePoints"}, type = EntityGraph.EntityGraphType.LOAD) | ||
List<GeneratorCreationEntity> findAllReactiveCapabilityCurvePointsByIdIn(List<UUID> ids); | ||
|
||
@EntityGraph(attributePaths = {"properties"}, type = EntityGraph.EntityGraphType.LOAD) | ||
List<GeneratorCreationEntity> findAllPropertiesByIdIn(List<UUID> ids); | ||
} |
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