summaryrefslogtreecommitdiffstats
path: root/models-provider/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-provider/src/main')
-rw-r--r--models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java8
-rw-r--r--models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java11
-rw-r--r--models-provider/src/main/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java8
3 files changed, 14 insertions, 13 deletions
diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java
index 3bf81adf7..3af069e24 100644
--- a/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java
+++ b/models-provider/src/main/java/org/onap/policy/models/provider/PolicyModelsProvider.java
@@ -22,8 +22,8 @@
package org.onap.policy.models.provider;
+import java.time.Instant;
import java.util.Collection;
-import java.util.Date;
import java.util.List;
import lombok.NonNull;
import org.onap.policy.models.base.PfModelException;
@@ -324,7 +324,7 @@ public interface PolicyModelsProvider extends AutoCloseable {
* @return the statistics found
* @throws PfModelException on errors getting statistics
*/
- public List<PdpStatistics> getPdpStatistics(final String name, final Date timestamp) throws PfModelException;
+ public List<PdpStatistics> getPdpStatistics(final String name, final Instant timestamp) throws PfModelException;
/**
@@ -341,7 +341,7 @@ public interface PolicyModelsProvider extends AutoCloseable {
* @throws PfModelException on errors getting policies
*/
public List<PdpStatistics> getFilteredPdpStatistics(String name, @NonNull String pdpGroupName, String pdpSubGroup,
- Date startTimeStamp, Date endTimeStamp, String sortOrder, int getRecordNum) throws PfModelException;
+ Instant startTimeStamp, Instant endTimeStamp, String sortOrder, int getRecordNum) throws PfModelException;
/**
* Creates PDP statistics.
@@ -371,7 +371,7 @@ public interface PolicyModelsProvider extends AutoCloseable {
* @return the PDP statistics deleted
* @throws PfModelException on errors deleting PDP statistics
*/
- public List<PdpStatistics> deletePdpStatistics(@NonNull String name, Date timestamp) throws PfModelException;
+ public List<PdpStatistics> deletePdpStatistics(@NonNull String name, Instant timestamp) throws PfModelException;
/**
* Gets all policy deployments.
diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java
index 8c7c5122b..1839604aa 100644
--- a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java
+++ b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java
@@ -22,8 +22,8 @@
package org.onap.policy.models.provider.impl;
+import java.time.Instant;
import java.util.Collection;
-import java.util.Date;
import java.util.List;
import javax.ws.rs.core.Response;
import lombok.NonNull;
@@ -247,15 +247,16 @@ public class DatabasePolicyModelsProviderImpl extends AbstractModelsProvider imp
}
@Override
- public List<PdpStatistics> getPdpStatistics(final String name, final Date timestamp) throws PfModelException {
+ public List<PdpStatistics> getPdpStatistics(final String name, final Instant timestamp) throws PfModelException {
assertInitialized();
return new PdpStatisticsProvider().getPdpStatistics(getPfDao(), name, timestamp);
}
@Override
public List<PdpStatistics> getFilteredPdpStatistics(final String name, @NonNull final String pdpGroupName,
- final String pdpSubGroup, final Date startTimeStamp, final Date endTimeStamp, final String sortOrder,
- final int getRecordNum) throws PfModelException {
+ final String pdpSubGroup, final Instant startTimeStamp,
+ final Instant endTimeStamp, final String sortOrder,
+ final int getRecordNum) throws PfModelException {
assertInitialized();
return new PdpStatisticsProvider().getFilteredPdpStatistics(getPfDao(), name, pdpGroupName, pdpSubGroup,
startTimeStamp, endTimeStamp, sortOrder, getRecordNum);
@@ -276,7 +277,7 @@ public class DatabasePolicyModelsProviderImpl extends AbstractModelsProvider imp
}
@Override
- public List<PdpStatistics> deletePdpStatistics(@NonNull final String name, final Date timestamp)
+ public List<PdpStatistics> deletePdpStatistics(@NonNull final String name, final Instant timestamp)
throws PfModelException {
assertInitialized();
return new PdpStatisticsProvider().deletePdpStatistics(getPfDao(), name, timestamp);
diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java
index 1b91f07c6..07617aad9 100644
--- a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java
+++ b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DummyPolicyModelsProviderImpl.java
@@ -22,9 +22,9 @@
package org.onap.policy.models.provider.impl;
+import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Date;
import java.util.List;
import javax.ws.rs.core.Response;
import lombok.NonNull;
@@ -211,13 +211,13 @@ public class DummyPolicyModelsProviderImpl implements PolicyModelsProvider {
}
@Override
- public List<PdpStatistics> getPdpStatistics(final String name, final Date timestamp) throws PfModelException {
+ public List<PdpStatistics> getPdpStatistics(final String name, final Instant timestamp) throws PfModelException {
return new ArrayList<>();
}
@Override
public List<PdpStatistics> getFilteredPdpStatistics(String name, String pdpGroupName, String pdpSubGroup,
- Date startTimeStamp, Date endTimeStamp, String sortOrder, int getRecordNum) {
+ Instant startTimeStamp, Instant endTimeStamp, String sortOrder, int getRecordNum) {
// Not implemented
return new ArrayList<>();
}
@@ -237,7 +237,7 @@ public class DummyPolicyModelsProviderImpl implements PolicyModelsProvider {
}
@Override
- public List<PdpStatistics> deletePdpStatistics(final String name, final Date timestamp) {
+ public List<PdpStatistics> deletePdpStatistics(final String name, final Instant timestamp) {
// Not implemented
return new ArrayList<>();
}