diff options
author | Liam Fallon <liam.fallon@est.tech> | 2021-06-17 07:31:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-06-17 07:31:03 +0000 |
commit | 17f5d3c97e47064407452122bc6cb801e43df5f9 (patch) | |
tree | 4aec9e21298dc9a59f1b15595146900cbfc62dbc /models | |
parent | 27d19f181f215624d6f5a2ba27a84e787eb68225 (diff) | |
parent | 43fb6c9a683efb014c40d5736419cb0085556642 (diff) |
Merge "Fix CLAMP build failure and kub-participant module startup issue."
Diffstat (limited to 'models')
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)); } |