X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2Fjpa%2FConstraintType.java;h=10394ae6f469982e5736d99932a5d71200437272;hb=2f3ca9fc5edc5a52659b3486605e0db508143318;hp=f7637013baf20f7fba019ebb258644b801fdbc49;hpb=ad162645e845baae599383a227122bcfffb8d326;p=policy%2Fengine.git 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 f7637013b..10394ae6f 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 @@ -36,9 +36,16 @@ import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + @Entity @Table(name = "ConstraintType") @NamedQuery(name = "ConstraintType.findAll", query = "SELECT a FROM ConstraintType a") +@Getter +@Setter +@NoArgsConstructor public class ConstraintType implements Serializable { private static final long serialVersionUID = 1L; @@ -66,7 +73,7 @@ public class ConstraintType implements Serializable { private int id; @Column(name = "constraint_type", nullable = false, length = 64) - private String constraintType; + private String theConstraintType; @Column(name = "description", nullable = false, length = 255) private String description; @@ -75,13 +82,9 @@ public class ConstraintType implements Serializable { @OneToMany(mappedBy = "constraintType") private Set attributes = new HashSet<>(); - public ConstraintType() { - // An empty constructor - } - public ConstraintType(String constraintType) { this(); - this.constraintType = constraintType; + this.theConstraintType = constraintType; } public ConstraintType(String constraintType, String description) { @@ -89,40 +92,15 @@ public class ConstraintType implements Serializable { this.description = description; } - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; + public static String[] getRangeTypes() { + return RANGE_TYPES; } public String getConstraintType() { - return constraintType; - } - - public void setConstraintType(String constraintType) { - this.constraintType = constraintType; + return theConstraintType; } - public String getDescription() { - return description; + public void setConstraintType(final String theConstraintType) { + this.theConstraintType = theConstraintType; } - - public void setDescription(String description) { - this.description = description; - } - - public Set getAttributes() { - return attributes; - } - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } - - public static String[] getRangeTypes() { - return RANGE_TYPES; - } - }