summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java17
-rw-r--r--models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java17
2 files changed, 30 insertions, 4 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java
index dacde8e79..00eab8f69 100644
--- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java
+++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ClElementStatisticsProvider.java
@@ -30,6 +30,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementSt
import org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaClElementStatistics;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfReferenceTimestampKey;
+import org.onap.policy.models.dao.PfFilterParameters;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.provider.impl.AbstractModelsProvider;
@@ -130,7 +131,19 @@ public class ClElementStatisticsProvider extends AbstractModelsProvider {
public List<ClElementStatistics> getFilteredClElementStatistics(final String name, final String version,
final Instant startTimeStamp, final Instant endTimeStamp, Map<String, Object> filterMap,
final String sortOrder, final int getRecordNum) {
- return asClElementStatisticsList(getPfDao().getFiltered(JpaClElementStatistics.class, name, version,
- startTimeStamp, endTimeStamp, filterMap, sortOrder, getRecordNum));
+
+ // @formatter:off
+ PfFilterParameters filterParams = PfFilterParameters
+ .builder()
+ .name(name)
+ .version(version)
+ .startTime(startTimeStamp)
+ .endTime(endTimeStamp)
+ .filterMap(filterMap)
+ .sortOrder(sortOrder)
+ .recordNum(getRecordNum)
+ .build();
+ // @formatter:on
+ return asClElementStatisticsList(getPfDao().getFiltered(JpaClElementStatistics.class, filterParams));
}
}
diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java
index 4ea76ff4b..137af3a5e 100644
--- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java
+++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ParticipantStatisticsProvider.java
@@ -30,6 +30,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant
import org.onap.policy.clamp.controlloop.models.controlloop.persistence.concepts.JpaParticipantStatistics;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfTimestampKey;
+import org.onap.policy.models.dao.PfFilterParameters;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.provider.impl.AbstractModelsProvider;
@@ -87,8 +88,20 @@ public class ParticipantStatisticsProvider extends AbstractModelsProvider {
final Instant startTimeStamp, final Instant endTimeStamp, Map<String, Object> filterMap,
final String sortOrder, final int getRecordNum) {
- return asParticipantStatisticsList(getPfDao().getFiltered(JpaParticipantStatistics.class, name, version,
- startTimeStamp, endTimeStamp, filterMap, sortOrder, getRecordNum));
+ // @formatter:off
+ PfFilterParameters filterParams = PfFilterParameters
+ .builder()
+ .name(name)
+ .version(version)
+ .startTime(startTimeStamp)
+ .endTime(endTimeStamp)
+ .filterMap(filterMap)
+ .sortOrder(sortOrder)
+ .recordNum(getRecordNum)
+ .build();
+ // @formatter:on
+
+ return asParticipantStatisticsList(getPfDao().getFiltered(JpaParticipantStatistics.class, filterParams));
}