X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2Fjpa%2FPIPType.java;h=aa8c45ef26c80ca2545f80be761aff076adafc85;hb=refs%2Fchanges%2F33%2F58133%2F1;hp=61ab9ffca3545068da9b3d968ec2f87cc8cf101f;hpb=1ecf9de8c889adb2dbc9ddd9a79d28e1da89d87b;p=policy%2Fengine.git 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 61ab9ffca..aa8c45ef2 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 @@ -42,91 +42,91 @@ import javax.persistence.Transient; @Table(name="PIPType") @NamedQuery(name="PIPType.findAll", query="SELECT p FROM PIPType p") public class PIPType implements Serializable { - private static final long serialVersionUID = 1L; - - public static final String TYPE_SQL = "SQL"; - public static final String TYPE_LDAP = "LDAP"; - public static final String TYPE_CSV = "CSV"; - public static final String TYPE_HYPERCSV = "Hyper-CSV"; - public static final String TYPE_CUSTOM = "Custom"; - - @Id - @GeneratedValue(strategy=GenerationType.AUTO) - @Column(name="id") - private int id; - - @Column(name="type", nullable=false, length=45) - private String type; - - //bi-directional many-to-one association to PIPConfiguration - @OneToMany(mappedBy="piptype") - private Set pipconfigurations; - - public PIPType() { - // Empty constructor - } - - public int getId() { - return this.id; - } - - public void setId(int id) { - this.id = id; - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = type; - } - - public Set getPipconfigurations() { - return this.pipconfigurations; - } - - public void setPipconfigurations(Set pipconfigurations) { - this.pipconfigurations = pipconfigurations; - } - - public PIPConfiguration addPipconfiguration(PIPConfiguration pipconfiguration) { - getPipconfigurations().add(pipconfiguration); - pipconfiguration.setPiptype(this); - - return pipconfiguration; - } - - public PIPConfiguration removePipconfiguration(PIPConfiguration pipconfiguration) { - getPipconfigurations().remove(pipconfiguration); - pipconfiguration.setPiptype(null); - - return pipconfiguration; - } - - @Transient - public boolean isSQL() { - return this.type.equals(TYPE_SQL); - } - - @Transient - public boolean isLDAP() { - return this.type.equals(TYPE_LDAP); - } - - @Transient - public boolean isCSV() { - return this.type.equals(TYPE_CSV); - } - - @Transient - public boolean isHyperCSV() { - return this.type.equals(TYPE_HYPERCSV); - } - - @Transient - public boolean isCustom() { - return this.type.equals(TYPE_CUSTOM); - } + private static final long serialVersionUID = 1L; + + public static final String TYPE_SQL = "SQL"; + public static final String TYPE_LDAP = "LDAP"; + public static final String TYPE_CSV = "CSV"; + public static final String TYPE_HYPERCSV = "Hyper-CSV"; + public static final String TYPE_CUSTOM = "Custom"; + + @Id + @GeneratedValue(strategy=GenerationType.AUTO) + @Column(name="id") + private int id; + + @Column(name="type", nullable=false, length=45) + private String type; + + //bi-directional many-to-one association to PIPConfiguration + @OneToMany(mappedBy="piptype") + private Set pipconfigurations; + + public PIPType() { + // Empty constructor + } + + public int getId() { + return this.id; + } + + public void setId(int id) { + this.id = id; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public Set getPipconfigurations() { + return this.pipconfigurations; + } + + public void setPipconfigurations(Set pipconfigurations) { + this.pipconfigurations = pipconfigurations; + } + + public PIPConfiguration addPipconfiguration(PIPConfiguration pipconfiguration) { + getPipconfigurations().add(pipconfiguration); + pipconfiguration.setPiptype(this); + + return pipconfiguration; + } + + public PIPConfiguration removePipconfiguration(PIPConfiguration pipconfiguration) { + getPipconfigurations().remove(pipconfiguration); + pipconfiguration.setPiptype(null); + + return pipconfiguration; + } + + @Transient + public boolean isSQL() { + return this.type.equals(TYPE_SQL); + } + + @Transient + public boolean isLDAP() { + return this.type.equals(TYPE_LDAP); + } + + @Transient + public boolean isCSV() { + return this.type.equals(TYPE_CSV); + } + + @Transient + public boolean isHyperCSV() { + return this.type.equals(TYPE_HYPERCSV); + } + + @Transient + public boolean isCustom() { + return this.type.equals(TYPE_CUSTOM); + } }