From 8fc237cc606b6e9c8c7d7e7a2c811fc671a4b40e Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 20 Mar 2019 16:08:21 +0000 Subject: Implement persistence test for policies The unit test MonitoringPolicySerializationTest tests persistence for policies and shows how persistence works. Issue-ID: POLICY-1195 Change-Id: I933eb538238f9ccd41ce69614e0c9afcac869c29 Signed-off-by: liamfallon --- .../src/main/java/org/onap/policy/models/base/PfConceptKey.java | 4 ++-- .../src/main/java/org/onap/policy/models/base/PfReferenceKey.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'models-base') diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java index 695ca4712..9f575851b 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java @@ -50,10 +50,10 @@ public class PfConceptKey extends PfKey { private static final String NAME_TOKEN = "name"; private static final String VERSION_TOKEN = "version"; - @Column(name = NAME_TOKEN) + @Column(name = NAME_TOKEN, length = 128) private String name; - @Column(name = VERSION_TOKEN) + @Column(name = VERSION_TOKEN, length = 128) private String version; /** diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java b/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java index 2e9f48ba5..19e8beee9 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java @@ -72,16 +72,16 @@ public class PfReferenceKey extends PfKey { private static final int PARENT_LOCAL_NAME_FIELD = 2; private static final int LOCAL_NAME_FIELD = 3; - @Column(name = PARENT_KEY_NAME) + @Column(name = PARENT_KEY_NAME, length = 128) private String parentKeyName; - @Column(name = PARENT_KEY_VERSION) + @Column(name = PARENT_KEY_VERSION, length = 128) private String parentKeyVersion; - @Column(name = PARENT_LOCAL_NAME) + @Column(name = PARENT_LOCAL_NAME, length = 128) private String parentLocalName; - @Column(name = LOCAL_NAME) + @Column(name = LOCAL_NAME, length = 128) private String localName; /** -- cgit 1.2.3-korg