diff options
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java')
-rw-r--r-- | ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java index ecc76b3..f707369 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/main/java/org/onap/ransim/rest/api/services/RansimRepositoryService.java @@ -29,9 +29,11 @@ import org.onap.ransim.rest.api.models.CellDetails; import org.onap.ransim.rest.api.models.CellNeighbor; import org.onap.ransim.rest.api.models.NeighborDetails; import org.onap.ransim.rest.api.models.NetconfServers; +import org.onap.ransim.rest.api.models.NRCellCU; import org.onap.ransim.rest.api.models.OperationLog; import org.onap.ransim.rest.api.repository.CellDetailsRepo; import org.onap.ransim.rest.api.repository.CellNeighborRepo; +import org.onap.ransim.rest.api.repository.NRCellCURepository; import org.onap.ransim.rest.api.repository.NeighborDetailsRepo; import org.onap.ransim.rest.api.repository.NetconfServersRepo; import org.onap.ransim.rest.api.repository.OperationLogRepo; @@ -47,6 +49,9 @@ public class RansimRepositoryService { CellDetailsRepo cellDetailsRepo; @Autowired + NRCellCURepository nRCellCURepo; + + @Autowired NetconfServersRepo netconfServersRepo; @Autowired @@ -73,6 +78,36 @@ public class RansimRepositoryService { return cellDetails; } + /** + * Method to retrieve cellCU details + * + * @param cellLocalId + * @return + */ + public NRCellCU getNRCellCUDetail(Integer cellLocalId) { + Optional<NRCellCU> cd = nRCellCURepo.findById(cellLocalId); + NRCellCU nrCellCU = null; + if (cd.isPresent()) { + nrCellCU = cd.get(); + } + return nrCellCU; + } + + /** + * Method to retrieve cellCU neighbors + * + * @param cellLocalId + * @return + */ + public NRCellCU getCellRelation(Integer cellLocalId) { + Optional<NRCellCU> cellNeighborDetails = nRCellCURepo.findById(cellLocalId); + NRCellCU cellRelation = null; + if (cellNeighborDetails.isPresent()) { + cellRelation = cellNeighborDetails.get(); + } + return cellRelation; + } + /** * Method to retrieve netconf server details * |