X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2Fjpa%2FPolicyAlgorithms.java;h=ba1097500b91e010073387d70cefe68b1c3c9c8c;hb=0c20d1c294fe146e1018f14b07a8d861c29fe527;hp=4488fcd30f3079339f9140ea4e598ad0d679f658;hpb=073cc188efe9abb4c010cf674e34e2cf46ef1c52;p=policy%2Fengine.git 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..ba1097500 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 @@ -37,80 +37,80 @@ import com.att.research.xacml.api.Identifier; @Table(name="PolicyAlgorithms") @NamedQuery(name="PolicyAlgorithms.findAll", query="SELECT d FROM PolicyAlgorithms d") public class PolicyAlgorithms implements Serializable { - private static final long serialVersionUID = 1L; - - public static final char STANDARD = 'S'; - public static final char CUSTOM = 'C'; - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - @Column(name="id") - private int id; - - @Column(name="is_standard", nullable=false) - private char isStandard; - - @Column(name="xacml_id", nullable=false, unique=true, length=255) - private String xacmlId; - - @Column(name="short_name", nullable=false, length=64) - private String shortName; - - public PolicyAlgorithms(Identifier identifier, char standard) { - this.isStandard = standard; - if (identifier != null) { - this.xacmlId = identifier.stringValue(); - } - } - - public PolicyAlgorithms(Identifier identifier) { - this(identifier, PolicyAlgorithms.STANDARD); - } - - public PolicyAlgorithms() { - this(null, PolicyAlgorithms.STANDARD); - } - - public int getId() { - return this.id; - } - - public void setId(int id) { - this.id = id; - } - - public char getIsStandard() { - return this.isStandard; - } - - public void setIsStandard(char isStandard) { - this.isStandard = isStandard; - } - - @Transient - public boolean isStandard() { - return (this.isStandard == PolicyAlgorithms.STANDARD); - } - - @Transient - public boolean isCustom() { - return (this.isStandard == PolicyAlgorithms.CUSTOM); - } - - public String getXacmlId() { - return this.xacmlId; - } - - public void setXacmlId(String xacmlId) { - this.xacmlId = xacmlId; - } - - public String getShortName() { - return shortName; - } - - public void setShortName(String shortName) { - this.shortName = shortName; - } + private static final long serialVersionUID = 1L; + + public static final char STANDARD = 'S'; + public static final char CUSTOM = 'C'; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name="id") + private int id; + + @Column(name="is_standard", nullable=false) + private char isStandard; + + @Column(name="xacml_id", nullable=false, unique=true, length=255) + private String xacmlId; + + @Column(name="short_name", nullable=false, length=64) + private String shortName; + + public PolicyAlgorithms(Identifier identifier, char standard) { + this.isStandard = standard; + if (identifier != null) { + this.xacmlId = identifier.stringValue(); + } + } + + public PolicyAlgorithms(Identifier identifier) { + this(identifier, PolicyAlgorithms.STANDARD); + } + + public PolicyAlgorithms() { + this(null, PolicyAlgorithms.STANDARD); + } + + public int getId() { + return this.id; + } + + public void setId(int id) { + this.id = id; + } + + public char getIsStandard() { + return this.isStandard; + } + + public void setIsStandard(char isStandard) { + this.isStandard = isStandard; + } + + @Transient + public boolean isStandard() { + return this.isStandard == PolicyAlgorithms.STANDARD; + } + + @Transient + public boolean isCustom() { + return this.isStandard == PolicyAlgorithms.CUSTOM; + } + + public String getXacmlId() { + return this.xacmlId; + } + + public void setXacmlId(String xacmlId) { + this.xacmlId = xacmlId; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } }