diff options
Diffstat (limited to 'ONAP-REST/src/main/java/org/onap/policy/rest/jpa')
66 files changed, 204 insertions, 270 deletions
diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionBodyEntity.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionBodyEntity.java index 1c1c3f4fe..9336a907b 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionBodyEntity.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionBodyEntity.java @@ -90,6 +90,7 @@ public class ActionBodyEntity implements Serializable { private boolean deleted = false; public ActionBodyEntity() { + //An empty constructor } @PrePersist @@ -110,7 +111,7 @@ public class ActionBodyEntity implements Serializable { return actionBodyId; } /** - * @param configurationDataId the configurationDataId to set + * @param name the configuration body name to set */ public void setActionBodyName(String name) { this.actionBodyName = name; @@ -126,7 +127,7 @@ public class ActionBodyEntity implements Serializable { return actionBody; } /** - * @param configBody the configBody to set + * @param body the configBody to set */ public void setActionBody(String body) { this.actionBody = body; @@ -213,8 +214,7 @@ public class ActionBodyEntity implements Serializable { return false; } - return ( - actionBodyId == ((ActionBodyEntity) obj).actionBodyId && + return actionBodyId == ((ActionBodyEntity) obj).actionBodyId && actionBodyName.equals(((ActionBodyEntity) obj).actionBodyName) && version == ((ActionBodyEntity) obj).version && actionBody.equals(((ActionBodyEntity) obj).actionBody) && @@ -222,7 +222,6 @@ public class ActionBodyEntity implements Serializable { createdDate.equals(((ActionBodyEntity) obj).createdDate) && modifiedBy.equals(((ActionBodyEntity) obj).modifiedBy) && modifiedDate.equals(((ActionBodyEntity) obj).modifiedDate) && - deleted == ((ActionBodyEntity) obj).deleted - ); + deleted == ((ActionBodyEntity) obj).deleted; } } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionList.java index 6be8cd7a8..7d46330f0 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionList.java @@ -53,28 +53,25 @@ public class ActionList implements Serializable { @Column(name="description") private String description; -/* - @Temporal(TemporalType.TIMESTAMP) - @Column(name="modified_date", nullable=false) - private Date modifiedDate;*/ public ActionList() { - + //An empty constructor } public ActionList(String string, String userid) { this(domain); } public ActionList(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } public String getActionName() { return this.actionName; diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionPolicyDict.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionPolicyDict.java index bf8a73161..fff1bf804 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionPolicyDict.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ActionPolicyDict.java @@ -118,7 +118,7 @@ public class ActionPolicyDict implements Serializable { private static Log logger = LogFactory.getLog(ActionPolicyDict.class); public ActionPolicyDict() { - + //An empty constructor } public ActionPolicyDict(String string, String userid) { @@ -138,10 +138,9 @@ public class ActionPolicyDict implements Serializable { public void preUpdate() { this.modifiedDate = new Date(); try { - this.userModifiedBy =XacmlAdminAuthorization.getUserId();; + this.userModifiedBy =XacmlAdminAuthorization.getUserId(); } catch (Exception e) { logger.error("Exception caused While adding Modified by Role"+e); - //PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "ActionPolicyDict", "Exception caused While adding Modified by Role"); } } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AddressGroup.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AddressGroup.java index 2a14e709a..c3673f336 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AddressGroup.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AddressGroup.java @@ -59,22 +59,23 @@ public class AddressGroup implements Serializable { private String description; public AddressGroup() { - + //An empty constructor } public AddressGroup(String string, String userid) { this(domain); } public AddressGroup(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Attribute.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Attribute.java index 7285e2e36..ea89eeac9 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Attribute.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Attribute.java @@ -151,6 +151,7 @@ public class Attribute implements Serializable { public Attribute() { + //An empty constructor } public Attribute(String domain) { @@ -230,11 +231,7 @@ public class Attribute implements Serializable { public String getXacmlId() { return this.xacmlId; } - -/* @Transient - public Identifier getXacmlIdentifier() { - return new IdentifierImpl(this.xacmlId); - }*/ + public void setXacmlId(String xacmlId) { this.xacmlId = xacmlId; @@ -332,7 +329,7 @@ public class Attribute implements Serializable { @Transient public boolean isDesignator() { - return (this.isDesignator == '1'); + return this.isDesignator == '1'; } @Transient diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AttributeAssignment.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AttributeAssignment.java index 7a1be9e7d..75e3d681e 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AttributeAssignment.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/AttributeAssignment.java @@ -65,6 +65,7 @@ public class AttributeAssignment implements Serializable { private Obadvice obadvice; public AttributeAssignment() { + //An empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/BRMSParamTemplate.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/BRMSParamTemplate.java index 5a78df227..8dd2a5995 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/BRMSParamTemplate.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/BRMSParamTemplate.java @@ -87,10 +87,11 @@ public class BRMSParamTemplate implements Serializable{ } public BRMSParamTemplate(){ + //An empty constructor } public BRMSParamTemplate(String userid){ - + //An empty constructor } @PrePersist diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Category.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Category.java index 1d0f0e456..275b03e5a 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Category.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Category.java @@ -170,12 +170,12 @@ public class Category implements Serializable { @Transient public boolean isStandard() { - return (this.isStandard == Category.STANDARD); + return this.isStandard == Category.STANDARD; } @Transient public boolean isCustom() { - return (this.isStandard == Category.CUSTOM); + return this.isStandard == Category.CUSTOM; } @Transient diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopD2Services.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopD2Services.java index f4ade220e..c69476fac 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopD2Services.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopD2Services.java @@ -103,7 +103,7 @@ public class ClosedLoopD2Services implements Serializable{ private static Log LOGGER = LogFactory.getLog(ClosedLoopD2Services.class); public ClosedLoopD2Services(){ - + //An empty constructor } public ClosedLoopD2Services(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopSite.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopSite.java index 6fbf9fb11..c3acf9a21 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopSite.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoopSite.java @@ -105,7 +105,7 @@ public class ClosedLoopSite implements Serializable{ private static Log LOGGER = LogFactory.getLog(ClosedLoopSite.class); public ClosedLoopSite(){ - + //An empty constructor } public ClosedLoopSite(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoops.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoops.java index bb5b4bda7..53695d81a 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoops.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ClosedLoops.java @@ -61,7 +61,7 @@ public class ClosedLoops implements Serializable { private String yaml; public ClosedLoops() { - + //An empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConfigurationDataEntity.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConfigurationDataEntity.java index 3386e9a51..4c15c525e 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConfigurationDataEntity.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConfigurationDataEntity.java @@ -97,6 +97,7 @@ public class ConfigurationDataEntity implements Serializable { private boolean deleted = false; public ConfigurationDataEntity() { + //An empty constructor } @PrePersist @@ -242,8 +243,7 @@ public class ConfigurationDataEntity implements Serializable { return false; } - return ( - configurationDataId == ((ConfigurationDataEntity) obj).configurationDataId && + return configurationDataId == ((ConfigurationDataEntity) obj).configurationDataId && configurationName.equals(((ConfigurationDataEntity) obj).configurationName) && version == ((ConfigurationDataEntity) obj).version && configType.equals(((ConfigurationDataEntity) obj).configType) && @@ -253,7 +253,6 @@ public class ConfigurationDataEntity implements Serializable { description.equals(((ConfigurationDataEntity) obj).description) && modifiedBy.equals(((ConfigurationDataEntity) obj).modifiedBy) && modifiedDate.equals(((ConfigurationDataEntity) obj).modifiedDate) && - deleted == ((ConfigurationDataEntity) obj).deleted - ); + deleted == ((ConfigurationDataEntity) obj).deleted; } } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintType.java index eeadeb0fc..77e883907 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintType.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintType.java @@ -69,7 +69,7 @@ public class ConstraintType implements Serializable { private Set<Attribute> attributes = new HashSet<>(); public ConstraintType() { - + //An empty constructor } public ConstraintType(String constraintType) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintValue.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintValue.java index 57e9af8b8..4943a41c8 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintValue.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ConstraintValue.java @@ -60,6 +60,7 @@ public class ConstraintValue implements Serializable { private Attribute attribute; public ConstraintValue() { + //An empty constructor } public ConstraintValue(String property, String value) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEUsers.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEUsers.java index 27d5d2790..1b08c1cc5 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEUsers.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEUsers.java @@ -57,22 +57,23 @@ public class DCAEUsers implements Serializable { public DCAEUsers() { - + //An empty constructor } public DCAEUsers(String string, String userid) { this(domain); } public DCAEUsers(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEuuid.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEuuid.java index b7f9243bc..dc6960997 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEuuid.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DCAEuuid.java @@ -57,22 +57,23 @@ public class DCAEuuid implements Serializable { public DCAEuuid() { - + //An empty constructor } public DCAEuuid(String string, String userid) { this(domain); } public DCAEuuid(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } public String getDescription() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DatabaseLockEntity.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DatabaseLockEntity.java index 7b5a8954e..42418883b 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DatabaseLockEntity.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DatabaseLockEntity.java @@ -35,7 +35,7 @@ public class DatabaseLockEntity implements Serializable { @Column(name="lock_key") private int lock_key = 1; public DatabaseLockEntity(){ - + //An empty constructor } public int getKey(){ return lock_key; diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Datatype.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Datatype.java index 6be1a84ce..15948bd6d 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Datatype.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Datatype.java @@ -222,12 +222,12 @@ public class Datatype implements Serializable { @Transient public boolean isStandard() { - return (this.isStandard == Datatype.STANDARD); + return this.isStandard == Datatype.STANDARD; } @Transient public boolean isCustom() { - return (this.isStandard == Datatype.CUSTOM); + return this.isStandard == Datatype.CUSTOM; } @Transient @@ -237,8 +237,6 @@ public class Datatype implements Serializable { + ", xacmlId=" + xacmlId + ", shortName=" + shortName + ", attributes=" + attributes + ", functions=" + functions + ", arguments=" + arguments + "]"; - - //return "Datatype [shortName=" + shortName + "]"; } } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java index 164cc3cef..e0ed676d7 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java @@ -110,6 +110,7 @@ public class DecisionSettings implements Serializable { } public DecisionSettings() { + //An empty constructor } public DecisionSettings(String domain) { @@ -144,7 +145,7 @@ public class DecisionSettings implements Serializable { public void preUpdate() { this.modifiedDate = new Date(); try { - this.userModifiedBy = XacmlAdminAuthorization.getUserId();; + this.userModifiedBy = XacmlAdminAuthorization.getUserId(); } catch (Exception e) { PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "DecisionSettings", "Exception caused While adding Modified by Role"); } @@ -186,11 +187,6 @@ public class DecisionSettings implements Serializable { public String getXacmlId() { return this.xacmlId; } - -/* @Transient - public Identifier getXacmlIdentifier() { - return new IdentifierImpl(this.xacmlId); - }*/ public void setXacmlId(String xacmlId) { this.xacmlId = xacmlId; diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DescriptiveScope.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DescriptiveScope.java index 30882fc13..68a00db98 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DescriptiveScope.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DescriptiveScope.java @@ -102,7 +102,7 @@ public class DescriptiveScope implements Serializable { private static Log LOGGER = LogFactory.getLog(DescriptiveScope.class); public DescriptiveScope(){ - + //An empty constructor } public DescriptiveScope(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTag.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTag.java index 71f4d6a6a..ed6981152 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTag.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTag.java @@ -100,7 +100,7 @@ public class FWTag implements Serializable { private static Log LOGGER = LogFactory.getLog(FWTag.class); public FWTag(){ - + //An empty constructor } public FWTag(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTagPicker.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTagPicker.java index 6f03b4915..6090558ae 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTagPicker.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FWTagPicker.java @@ -86,7 +86,7 @@ public class FWTagPicker implements Serializable { private static Log logger = LogFactory.getLog(FWTagPicker.class); public FWTagPicker(){ - + //An empty constructor } public FWTagPicker(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FirewallDictionaryList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FirewallDictionaryList.java index 27f5e75bd..5644d4a3d 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FirewallDictionaryList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FirewallDictionaryList.java @@ -57,22 +57,6 @@ public class FirewallDictionaryList implements Serializable { @Column(name="serviceList") private String serviceList; - -/* @Temporal(TemporalType.TIMESTAMP) - @Column(name="created_date", updatable=false) - private Date createdDate; - - @Temporal(TemporalType.TIMESTAMP) - @Column(name="modified_date", nullable=false) - private Date modifiedDate; - - @ManyToOne(optional = false) - @JoinColumn(name="created_by") - private UserInfo userCreatedBy; - - @ManyToOne(optional = false) - @JoinColumn(name="modified_by") - private UserInfo userModifiedBy;*/ public int getId() { return this.id; @@ -113,26 +97,9 @@ public class FirewallDictionaryList implements Serializable { public void setServiceList(String serviceList) { this.serviceList = serviceList; } - - - /*public UserInfo getUserCreatedBy() { - return userCreatedBy; - } - - public void setUserCreatedBy(UserInfo userCreatedBy) { - this.userCreatedBy = userCreatedBy; - } - - public UserInfo getUserModifiedBy() { - return userModifiedBy; - } - - public void setUserModifiedBy(UserInfo userModifiedBy) { - this.userModifiedBy = userModifiedBy; - }*/ public FirewallDictionaryList() { - + //An empty constructor } public FirewallDictionaryList(String string, String userid) { @@ -142,23 +109,4 @@ public class FirewallDictionaryList implements Serializable { this.parentItemName = domain; } - /*@PrePersist - public void prePersist() { - Date date = new Date(); - this.createdDate = date; - this.modifiedDate = date; - auditLogger.debug("Added New Term Name: "+this.parentItemName+" by "+this.userCreatedBy); - - } - @PreUpdate - public void preUpdate() { - this.modifiedDate = new Date(); - try { - this.userModifiedBy =XacmlAdminAuthorization.getUserId();; - } catch (Exception e) { - PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "TermList", "Exception caused While adding Modified by Role"); - } - auditLogger.debug("Updated Term Name: "+this.parentItemName+" by "+this.userModifiedBy); - } -*/ } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionArgument.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionArgument.java index 4d712994c..dd4535674 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionArgument.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionArgument.java @@ -57,6 +57,7 @@ public class FunctionArgument implements Serializable { private Datatype datatypeBean; public FunctionArgument() { + //An empty constructor } public FunctionArgument(final FunctionArgument argument) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionDefinition.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionDefinition.java index c3dfcaa63..d2fa034f1 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionDefinition.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/FunctionDefinition.java @@ -81,6 +81,7 @@ public class FunctionDefinition implements Serializable { private List<FunctionArgument> functionArguments; public FunctionDefinition() { + //An empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupPolicyScopeList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupPolicyScopeList.java index 44f27ba35..55c3bd6ef 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupPolicyScopeList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupPolicyScopeList.java @@ -59,22 +59,23 @@ public class GroupPolicyScopeList implements Serializable { private String description; public GroupPolicyScopeList() { - + //An empty constructor } public GroupPolicyScopeList(String string, String userid) { this(domain); } public GroupPolicyScopeList(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupServiceList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupServiceList.java index 53fb89d4f..4d1560f0c 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupServiceList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/GroupServiceList.java @@ -57,22 +57,23 @@ public class GroupServiceList implements Serializable { public GroupServiceList() { - + //An empty constructor } public GroupServiceList(String string, String userid) { this(domain); } public GroupServiceList(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceAttribute.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceAttribute.java index bb0507123..88db4dd53 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceAttribute.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceAttribute.java @@ -58,22 +58,23 @@ public class MicroServiceAttribute implements Serializable { public MicroServiceAttribute() { - + //An empty constructor } public MicroServiceAttribute(String string, String userid) { this(domain); } public MicroServiceAttribute(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceConfigName.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceConfigName.java index f47b96ed8..90a066b83 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceConfigName.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceConfigName.java @@ -57,22 +57,23 @@ public class MicroServiceConfigName implements Serializable { public MicroServiceConfigName() { - + //An empty constructor } public MicroServiceConfigName(String string, String userid) { this(domain); } public MicroServiceConfigName(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceLocation.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceLocation.java index 4d82a3b20..130de0a83 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceLocation.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceLocation.java @@ -57,22 +57,23 @@ public class MicroServiceLocation implements Serializable { public MicroServiceLocation() { - + //An empty constructor } public MicroServiceLocation(String string, String userid) { this(domain); } public MicroServiceLocation(String domain) { - + //An empty constructor } @PrePersist public void prePersist() { - + //An empty function } @PreUpdate public void preUpdate() { + //An empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceModels.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceModels.java index 513799762..ff4028f2d 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceModels.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/MicroServiceModels.java @@ -117,10 +117,11 @@ public class MicroServiceModels implements Serializable{ } public MicroServiceModels(){ + //An empty constructor } public MicroServiceModels(String userid){ - + //An empty constructor } public String getAttributes() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ObadviceExpression.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ObadviceExpression.java index 8d5be9742..7b0db3f72 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ObadviceExpression.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ObadviceExpression.java @@ -63,12 +63,6 @@ public class ObadviceExpression implements Serializable { @Column(name="type", nullable=false) private String type; - - /* - @Lob - @Column(name="expression", nullable=false) - private byte[] expression; - */ //bi-directional many-to-one association to Obadvice @ManyToOne diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java index a4c0c85da..66ee346e1 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java @@ -97,7 +97,7 @@ public class OnapName implements Serializable { } public OnapName() { - + //An empty constructor } public OnapName(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PEPOptions.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PEPOptions.java index c1fff1420..869386f69 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PEPOptions.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PEPOptions.java @@ -104,7 +104,7 @@ public class PEPOptions implements Serializable { private static Log LOGGER = LogFactory.getLog(PEPOptions.class); public PEPOptions(){ - + //An empty constructor } public PEPOptions(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfigParam.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfigParam.java index 1540c8ad8..fb18f7062 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfigParam.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfigParam.java @@ -58,6 +58,7 @@ public class PIPConfigParam implements Serializable { private PIPConfiguration pipconfiguration; public PIPConfigParam() { + //An empty constructor } public PIPConfigParam(String param) { @@ -125,7 +126,7 @@ public class PIPConfigParam implements Serializable { @Transient public boolean isRequired() { - return (this.required == '1'); + return this.required == '1'; } @Transient diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfiguration.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfiguration.java index 5d731552b..01f5cfcff 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfiguration.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPConfiguration.java @@ -124,6 +124,7 @@ public class PIPConfiguration implements Serializable { private Set<PIPResolver> pipresolvers = new HashSet<>(); public PIPConfiguration() { + //An empty constructor } public PIPConfiguration(PIPConfiguration config, String user) { @@ -316,7 +317,7 @@ public class PIPConfiguration implements Serializable { @Transient public boolean isReadOnly() { - return (this.readOnly == '1'); + return this.readOnly == '1'; } @Transient @@ -330,7 +331,7 @@ public class PIPConfiguration implements Serializable { @Transient public boolean requiresResolvers() { - return (this.requiresResolvers == '1'); + return this.requiresResolvers == '1'; } @Transient @@ -390,21 +391,21 @@ public class PIPConfiguration implements Serializable { // // Go through each property // - for (Object name : properties.keySet()) { - if (name.toString().startsWith(id) == false) { + for (Object nme : properties.keySet()) { + if (nme.toString().startsWith(id) == false) { continue; } - if (name.equals(id + ".classname")) { + if (nme.equals(id + ".classname")) { // // We already saved this // - } else if (name.equals(id + "." + StdConfigurableEngine.PROP_NAME)) { - this.name = properties.getProperty(name.toString()); - } else if (name.equals(id + "." + StdConfigurableEngine.PROP_DESCRIPTION)) { - this.description = properties.getProperty(name.toString()); - } else if (name.equals(id + "." + StdConfigurableEngine.PROP_ISSUER)) { - this.issuer = properties.getProperty(name.toString()); - } else if (name.equals(id + ".resolvers")) { + } else if (nme.equals(id + "." + StdConfigurableEngine.PROP_NAME)) { + this.name = properties.getProperty(nme.toString()); + } else if (nme.equals(id + "." + StdConfigurableEngine.PROP_DESCRIPTION)) { + this.description = properties.getProperty(nme.toString()); + } else if (nme.equals(id + "." + StdConfigurableEngine.PROP_ISSUER)) { + this.issuer = properties.getProperty(nme.toString()); + } else if (nme.equals(id + ".resolvers")) { // // It has resolvers, make sure this is set to true if // it has been already. @@ -414,13 +415,13 @@ public class PIPConfiguration implements Serializable { // Parse the resolvers // Collection<PIPResolver> resolvers = PIPResolver.importResolvers(id + ".resolver", - properties.getProperty(name.toString()), + properties.getProperty(nme.toString()), properties,"super-admin" ); for (PIPResolver resolver : resolvers) { this.addPipresolver(resolver); } - } else if (name.toString().startsWith(id + ".resolver")) { + } else if (nme.toString().startsWith(id + ".resolver")) { // // Ignore, the PIPResolver will parse these values // @@ -428,8 +429,8 @@ public class PIPConfiguration implements Serializable { // // Config Parameter // - this.addPipconfigParam(new PIPConfigParam(name.toString().substring(id.length() + 1), - properties.getProperty(name.toString()))); + this.addPipconfigParam(new PIPConfigParam(nme.toString().substring(id.length() + 1), + properties.getProperty(nme.toString()))); } } // @@ -470,12 +471,12 @@ public class PIPConfiguration implements Serializable { Iterator<PIPResolver> iter = this.pipresolvers.iterator(); while (iter.hasNext()) { PIPResolver resolver = iter.next(); - String id = Integer.toString(resolver.getId()); - Map<String, String> resolverMap = resolver.getConfiguration(prefix + "resolver." + id); + String idd = Integer.toString(resolver.getId()); + Map<String, String> resolverMap = resolver.getConfiguration(prefix + "resolver." + idd); map.putAll(resolverMap); - ids.add(id); + ids.add(idd); } - if (ids.size() > 0) { + if (!ids.isEmpty()) { map.put(prefix + "resolvers", Joiner.on(',').join(ids)); } return map; @@ -512,11 +513,11 @@ public class PIPConfiguration implements Serializable { Iterator<PIPResolver> iter = this.pipresolvers.iterator(); while (iter.hasNext()) { PIPResolver resolver = iter.next(); - String id = Integer.toString(resolver.getId()); - resolver.generateProperties(props, prefix + "resolver." + id); - ids.add(id); + String idd = Integer.toString(resolver.getId()); + resolver.generateProperties(props, prefix + "resolver." + idd); + ids.add(idd); } - if (ids.size() > 0) { + if (!ids.isEmpty()) { props.setProperty(prefix + "resolvers", Joiner.on(',').join(ids)); } return props; diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolver.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolver.java index daab6d658..4838639f9 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolver.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolver.java @@ -106,6 +106,7 @@ public class PIPResolver implements Serializable { private Set<PIPResolverParam> pipresolverParams = new HashSet<>(); public PIPResolver() { + //An empty constructor } public PIPResolver(String prefix, Properties properties, String user) throws PIPException { @@ -260,7 +261,7 @@ public class PIPResolver implements Serializable { @Transient public boolean isReadOnly() { - return (this.readOnly == '1'); + return this.readOnly == '1'; } @Transient @@ -293,62 +294,64 @@ public class PIPResolver implements Serializable { // // Go through each property // - for (Object name : properties.keySet()) { - if (name.toString().startsWith(prefix) == false) { + for (Object nme : properties.keySet()) { + if (nme.toString().startsWith(prefix) == false) { continue; } - if (name.equals(prefix + ".classname")) { + if (nme.equals(prefix + ".classname")) { // // We already saved this // - } else if (name.equals(prefix + "." + StdConfigurableEngine.PROP_NAME)) { - this.name = properties.getProperty(name.toString()); - } else if (name.equals(prefix + "." + StdConfigurableEngine.PROP_DESCRIPTION)) { - this.description = properties.getProperty(name.toString()); - } else if (name.equals(prefix + "." + StdConfigurableEngine.PROP_ISSUER)) { - this.issuer = properties.getProperty(name.toString()); + } else if (nme.equals(prefix + "." + StdConfigurableEngine.PROP_NAME)) { + this.name = properties.getProperty(nme.toString()); + } else if (nme.equals(prefix + "." + StdConfigurableEngine.PROP_DESCRIPTION)) { + this.description = properties.getProperty(nme.toString()); + } else if (nme.equals(prefix + "." + StdConfigurableEngine.PROP_ISSUER)) { + this.issuer = properties.getProperty(nme.toString()); } else { - this.addPipresolverParam(new PIPResolverParam(name.toString().substring(prefix.length() + 1), - properties.getProperty(name.toString()))); + this.addPipresolverParam(new PIPResolverParam(nme.toString().substring(prefix.length() + 1), + properties.getProperty(nme.toString()))); } } } @Transient public Map<String, String> getConfiguration(String prefix) { + String pref = prefix; Map<String, String> map = new HashMap<>(); if (prefix.endsWith(".") == false) { - prefix = prefix + "."; + pref = prefix + "."; } - map.put(prefix + "classname", this.classname); - map.put(prefix + "name", this.name); + map.put(pref + "classname", this.classname); + map.put(pref + "name", this.name); if (this.description != null) { - map.put(prefix + "description", this.description); + map.put(pref + "description", this.description); } if (this.issuer != null && this.issuer.isEmpty() != false) { - map.put(prefix + "issuer", this.issuer); + map.put(pref + "issuer", this.issuer); } for (PIPResolverParam param : this.pipresolverParams) { - map.put(prefix + param.getParamName(), param.getParamValue()); + map.put(pref + param.getParamName(), param.getParamValue()); } return map; } @Transient public void generateProperties(Properties props, String prefix) { + String pref = prefix; if (prefix.endsWith(".") == false) { - prefix = prefix + "."; + pref = prefix + "."; } - props.setProperty(prefix + "classname", this.classname); - props.setProperty(prefix + "name", this.name); + props.setProperty(pref + "classname", this.classname); + props.setProperty(pref + "name", this.name); if (this.description != null) { - props.setProperty(prefix + "description", this.description); + props.setProperty(pref + "description", this.description); } if (this.issuer != null && this.issuer.isEmpty() != false) { - props.setProperty(prefix + "issuer", this.issuer); + props.setProperty(pref + "issuer", this.issuer); } for (PIPResolverParam param : this.pipresolverParams) { - props.setProperty(prefix + param.getParamName(), param.getParamValue()); + props.setProperty(pref + param.getParamName(), param.getParamValue()); } } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolverParam.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolverParam.java index 8dec7915a..3db0e0f0d 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolverParam.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPResolverParam.java @@ -58,6 +58,7 @@ public class PIPResolverParam implements Serializable { private PIPResolver pipresolver; public PIPResolverParam() { + // Empty constructor } public PIPResolverParam(String name) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPType.java index 0ef4388c4..61ab9ffca 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPType.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PIPType.java @@ -63,6 +63,7 @@ public class PIPType implements Serializable { private Set<PIPConfiguration> pipconfigurations; public PIPType() { + // Empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyAlgorithms.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyAlgorithms.java index 4488fcd30..c21b832b6 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyAlgorithms.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyAlgorithms.java @@ -89,12 +89,12 @@ public class PolicyAlgorithms implements Serializable { @Transient public boolean isStandard() { - return (this.isStandard == PolicyAlgorithms.STANDARD); + return this.isStandard == PolicyAlgorithms.STANDARD; } @Transient public boolean isCustom() { - return (this.isStandard == PolicyAlgorithms.CUSTOM); + return this.isStandard == PolicyAlgorithms.CUSTOM; } public String getXacmlId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEditorScopes.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEditorScopes.java index bfb4218ab..698ec36da 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEditorScopes.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEditorScopes.java @@ -79,7 +79,8 @@ public class PolicyEditorScopes implements Serializable{ @JoinColumn(name="modified_by") private UserInfo userModifiedBy; - public PolicyEditorScopes() { + public PolicyEditorScopes() { + // Empty constructor } public PolicyEditorScopes(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEntity.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEntity.java index 6c7b8cf6f..c262aec4e 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEntity.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyEntity.java @@ -310,8 +310,7 @@ public class PolicyEntity implements Serializable { PolicyEntity p = (PolicyEntity) obj; - return ( - policyId == p.policyId && + return policyId == p.policyId && policyName.equals(p.policyName) && scope.equals(p.scope) && version == p.version && @@ -324,8 +323,7 @@ public class PolicyEntity implements Serializable { description.equals(p.description) && modifiedBy.equals(p.modifiedBy) && modifiedDate.equals(p.modifiedDate) && - deleted == p.deleted - ); + deleted == p.deleted; } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyRoles.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyRoles.java index 99d6075a3..e7230d694 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyRoles.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyRoles.java @@ -73,6 +73,7 @@ public class PolicyRoles implements Serializable { private String role; public PolicyRoles() { + // Empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeClosedLoop.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeClosedLoop.java index 6fc45eb70..9f437ce28 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeClosedLoop.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeClosedLoop.java @@ -56,22 +56,23 @@ public class PolicyScopeClosedLoop implements Serializable { private String description ; public PolicyScopeClosedLoop() { - + // Empty constructor } public PolicyScopeClosedLoop(String string, String userid) { this(domain); } public PolicyScopeClosedLoop(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeResource.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeResource.java index f9ec94564..9d71600e9 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeResource.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeResource.java @@ -56,22 +56,23 @@ public class PolicyScopeResource implements Serializable { private String description ; public PolicyScopeResource() { - + // Empty constructor } public PolicyScopeResource(String string, String userid) { this(domain); } public PolicyScopeResource(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeService.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeService.java index 84e85570b..ec95d1691 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeService.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeService.java @@ -56,22 +56,23 @@ public class PolicyScopeService implements Serializable { private String description ; public PolicyScopeService() { - + // Empty constructor } public PolicyScopeService(String string, String userid) { this(domain); } public PolicyScopeService(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeType.java index 48f17b0fc..92252b043 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeType.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScopeType.java @@ -56,22 +56,23 @@ public class PolicyScopeType implements Serializable { private String description ; public PolicyScopeType() { - + // Empty constructor } public PolicyScopeType(String string, String userid) { this(domain); } public PolicyScopeType(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScore.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScore.java index 3ad4b9b85..a9e776580 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScore.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyScore.java @@ -62,7 +62,7 @@ public class PolicyScore implements Serializable { private String PolicyScore; public PolicyScore() { - + // Empty constructor } public PolicyScore(String pName, String pScore) { @@ -70,7 +70,7 @@ public class PolicyScore implements Serializable { } public PolicyScore(String domain) { - + // Empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java index dd51bee2a..663d34a17 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PolicyVersion.java @@ -21,7 +21,6 @@ package org.onap.policy.rest.jpa; import java.io.Serializable; -//import java.sql.Clob; import java.sql.Timestamp; import java.util.Date; import java.util.Objects; @@ -109,7 +108,7 @@ public class PolicyVersion implements Serializable { } public PolicyVersion(){ - + // Empty constructor } @PrePersist @@ -122,14 +121,6 @@ public class PolicyVersion implements Serializable { @PreUpdate public void preUpdate() { this.modifiedDate = new Date(); - /* - * The modifiedBy must be set via the setModifiedBy() method since PolicyVersion - * has been moved to XACML-REST module for access from the XACML-PAP-REST module - - String userid = ((XacmlAdminUI) UI.getCurrent()).getLoginUserId(); - this.modifiedBy =userid; - * - */ } public int getId() { @@ -200,16 +191,14 @@ public class PolicyVersion implements Serializable { PolicyVersion p = (PolicyVersion) obj; - return ( - id == p.id && + return id == p.id && policyName.equals(p.policyName) && activeVersion == p.activeVersion && higherVersion == p.higherVersion && createdDate.equals(p.createdDate) && createdBy.equals(p.createdBy) && modifiedDate.equals(p.modifiedDate) && - modifiedBy.equals(p.modifiedBy) - ); + modifiedBy.equals(p.modifiedBy); } } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PortList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PortList.java index 5d2f35414..e696b1d06 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PortList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PortList.java @@ -59,22 +59,23 @@ public class PortList implements Serializable { private Date modifiedDate;*/ public PortList() { - + // Empty constructor } public PortList(String string, String userid) { this(domain); } public PortList(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PrefixList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PrefixList.java index 98e940228..16ef24cf7 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PrefixList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/PrefixList.java @@ -56,28 +56,25 @@ public class PrefixList implements Serializable { @Column(name="pl_value", nullable=false) private String prefixListValue; -/* - @Temporal(TemporalType.TIMESTAMP) - @Column(name="modified_date", nullable=false) - private Date modifiedDate;*/ public PrefixList() { - + // Empty constructor } public PrefixList(String string, String userid) { this(domain); } public PrefixList(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } public String getPrefixListName() { return this.prefixListName; diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ProtocolList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ProtocolList.java index befea36ed..b74bb4a57 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ProtocolList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ProtocolList.java @@ -53,28 +53,25 @@ public class ProtocolList implements Serializable { @Column(name="description") private String description; -/* - @Temporal(TemporalType.TIMESTAMP) - @Column(name="modified_date", nullable=false) - private Date modifiedDate;*/ public ProtocolList() { - + // Empty constructor } public ProtocolList(String string, String userid) { this(domain); } public ProtocolList(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } public String getProtocolName() { return this.protocolName; diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java index 383eb11c2..6761fe963 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RainyDayTreatments.java @@ -61,7 +61,7 @@ public class RainyDayTreatments implements Serializable { private String treatments; public RainyDayTreatments() { - + // Empty constructor } public int getId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java index f0443c0db..7d347951c 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RemoteCatalogValues.java @@ -57,22 +57,23 @@ public class RemoteCatalogValues implements Serializable { public RemoteCatalogValues() { - + // Empty constructor } public RemoteCatalogValues(String string, String userid) { this(domain); } public RemoteCatalogValues(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } public String getValue() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java index 155372617..a65e41f2e 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RiskType.java @@ -101,7 +101,7 @@ public class RiskType implements Serializable { private static Log LOGGER = LogFactory.getLog(RiskType.class); public RiskType() { - + // Empty constructor } public RiskType(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java index 83f6e2d3e..9d0f005be 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/RuleAlgorithms.java @@ -98,12 +98,12 @@ public class RuleAlgorithms implements Serializable { @Transient public boolean isStandard() { - return (this.isStandard == RuleAlgorithms.STANDARD); + return this.isStandard == RuleAlgorithms.STANDARD; } @Transient public boolean isCustom() { - return (this.isStandard == RuleAlgorithms.CUSTOM); + return this.isStandard == RuleAlgorithms.CUSTOM; } public String getXacmlId() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java index 1f92fe67a..8b017c006 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SafePolicyWarning.java @@ -65,22 +65,23 @@ public class SafePolicyWarning implements Serializable { this.riskType = riskType; } public SafePolicyWarning() { - + // Empty constructor } public SafePolicyWarning(String string, String userid) { this(domain); } public SafePolicyWarning(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java index d8bc33c13..cbbb8962e 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/SecurityZone.java @@ -56,22 +56,23 @@ public class SecurityZone implements Serializable { public SecurityZone() { - + // Empty constructor } public SecurityZone(String string, String userid) { this(domain); } public SecurityZone(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java index 40e31172e..057b86992 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/ServiceList.java @@ -65,31 +65,25 @@ public class ServiceList implements Serializable { @Column(name="ports") private String servicePorts; - - - -/* - @Temporal(TemporalType.TIMESTAMP) - @Column(name="modified_date", nullable=false) - private Date modifiedDate;*/ public ServiceList() { - + // Empty constructor } public ServiceList(String string, String userid) { this(domain); } public ServiceList(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java index c9a27ef15..099257c39 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/TermList.java @@ -128,7 +128,7 @@ public class TermList implements Serializable { private static Log LOGGER = LogFactory.getLog(TermList.class); public TermList() { - + // Empty constructor } private static final Log auditLogger = LogFactory diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java index 01df59201..356ecb7c9 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VMType.java @@ -57,22 +57,23 @@ public class VMType implements Serializable { public VMType() { - + // Empty constructor } public VMType(String string, String userid) { this(domain); } public VMType(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } public String getDescription() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java index cf1e6b85f..d44e4b5b7 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VNFType.java @@ -102,7 +102,7 @@ public class VNFType implements Serializable { private static Log LOGGER = LogFactory.getLog(VNFType.class); public VNFType() { - + // Empty constructor } public String getVnftype() { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java index 5bfab1793..df605ee7d 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VSCLAction.java @@ -101,7 +101,7 @@ public class VSCLAction implements Serializable { private static Log LOGGER = LogFactory.getLog(VSCLAction.class); public VSCLAction() { - + // Empty constructor } public VSCLAction(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java index 0ede025bd..376689ee7 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/VarbindDictionary.java @@ -103,7 +103,7 @@ public class VarbindDictionary implements Serializable{ private static Log LOGGER = LogFactory.getLog(VarbindDictionary.class); public VarbindDictionary() { - + // Empty constructor } public VarbindDictionary(String string, String userid) { diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java index 71b35269f..7586dd8bf 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/WatchPolicyNotificationTable.java @@ -96,10 +96,9 @@ public class WatchPolicyNotificationTable implements Serializable{ return false; } - return(id == ((WatchPolicyNotificationTable)obj).id && + return id == ((WatchPolicyNotificationTable)obj).id && policyName.equals(((WatchPolicyNotificationTable)obj).policyName) && - loginIds.equals(((WatchPolicyNotificationTable)obj).loginIds) - ); + loginIds.equals(((WatchPolicyNotificationTable)obj).loginIds); } diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java index eb53c42f1..fe5d62adc 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/Zone.java @@ -56,22 +56,23 @@ public class Zone implements Serializable { public Zone() { - + // Empty constructor } public Zone(String string, String userid) { this(domain); } public Zone(String domain) { - + // Empty constructor } @PrePersist public void prePersist() { - + // Empty function } @PreUpdate public void preUpdate() { + // Empty function } |