Add Legacy Op Policy Persistence
[policy/models.git] / models-base / src / main / java / org / onap / policy / models / base / PfKey.java
index 6e9035e..5407030 100644 (file)
@@ -101,10 +101,39 @@ public abstract class PfKey extends PfConcept {
      */
     public abstract boolean isCompatible(@NonNull PfKey otherKey);
 
+    /**
+     * Check if this key is a newer version than the other key.
+     *
+     * @param otherKey the key to check against
+     * @return true, if this key is newer than the other key
+     */
+    public abstract boolean isNewerThan(@NonNull PfKey otherKey);
+
     /**
      * Check if a key equals its null key.
      *
      * @return true, if the key is a null key
      */
     public abstract boolean isNullKey();
+
+    /**
+     * Get the major version of a key.
+     *
+     * @return the major version of a key
+     */
+    public abstract int getMajorVersion();
+
+    /**
+     * Get the minor version of a key.
+     *
+     * @return the minor version of a key
+     */
+    public abstract int getMinorVersion();
+
+    /**
+     * Get the patch version of a key.
+     *
+     * @return the patch version of a key
+     */
+    public abstract int getPatchVersion();
 }