Add for repcatalog repositories methods
MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/replicacatalog/DataProductRepository.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/replicacatalog/DataProductRepository.java
@@ -85,23 +85,28 @@ public class DataProductRepository extends RepCatAbstractRepository<DataProductM
}
+ @Override
public String registerDataProduct(DataProductModel dataProductModel) throws ReplicaCatalogException {
return saveDataProductModelData(dataProductModel);
}
+ @Override
public boolean updateDataProduct(DataProductModel updatedDataProductModel) throws ReplicaCatalogException {
return (saveDataProductModelData(updatedDataProductModel) != null);
}
+ @Override
public DataProductModel getDataProduct(String productUri) throws ReplicaCatalogException {
return get(productUri);
}
+ @Override
public DataProductModel getParentDataProduct(String productUri) throws ReplicaCatalogException {
DataProductModel dataProductModel = getDataProduct(productUri);
return get(dataProductModel.getParentProductUri());
}
+ @Override
public List<DataProductModel> getChildDataProducts(String parentProductUri) throws ReplicaCatalogException {
Map<String, Object> queryParameters = new HashMap<>();
queryParameters.put(DBConstants.DataProduct.PARENT_PRODUCT_URI, parentProductUri);
@@ -109,6 +114,7 @@ public class DataProductRepository extends RepCatAbstractRepository<DataProductM
return dataProductModelList;
}
+ @Override
public List<DataProductModel> searchDataProductsByName(String gatewayId, String userId, String productName,
int limit, int offset) throws ReplicaCatalogException {
Map<String, Object> queryParameters = new HashMap<>();
@@ -119,10 +125,12 @@ public class DataProductRepository extends RepCatAbstractRepository<DataProductM
return dataProductModelList;
}
+ @Override
public boolean isDataProductExists(String productUri) throws ReplicaCatalogException {
return isExists(productUri);
}
+ @Override
public boolean removeDataProduct(String productUri) throws ReplicaCatalogException {
return delete(productUri);
}

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/replicacatalog/DataReplicaLocationRepository.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/replicacatalog/DataReplicaLocationRepository.java
@@ -66,18 +66,22 @@ public class DataReplicaLocationRepository extends RepCatAbstractRepository<Data
return execute(entityManager -> entityManager.merge(dataReplicaLocationEntity));
}
+ @Override
public String registerReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws ReplicaCatalogException {
return saveDataReplicaLocationModelData(dataReplicaLocationModel);
}
+ @Override
public boolean updateReplicaLocation(DataReplicaLocationModel dataReplicaLocationModel) throws ReplicaCatalogException {
return (saveDataReplicaLocationModelData(dataReplicaLocationModel) != null);
}
+ @Override
public DataReplicaLocationModel getReplicaLocation(String replicaId) throws ReplicaCatalogException {
return get(replicaId);
}
+ @Override
public List<DataReplicaLocationModel> getAllReplicaLocations(String productUri) throws ReplicaCatalogException {
DataProductRepository dataProductRepository = new DataProductRepository();
DataProductModel dataProductModel = dataProductRepository.getDataProduct(productUri);
@@ -85,6 +89,7 @@ public class DataReplicaLocationRepository extends RepCatAbstractRepository<Data
return dataReplicaLocationModelList;
}
+ @Override
public boolean removeReplicaLocation(String replicaId) throws ReplicaCatalogException {
return delete(replicaId);
}

Add @Override for repcatalog repositories methods