aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java73
1 files changed, 16 insertions, 57 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java
index 6e2743b81..07770fdf3 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigProperty.java
@@ -1,95 +1,54 @@
package at.gv.egovernment.moa.id.commons.db.dao.config;
-import java.io.Serializable;
-
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
+
/**
- * Reflects a MOAID configuration entry.
+ * Reflects a MOAID configuration entry with String values.
*
*/
@Table(name = "configproperty")
@Entity
-public class ConfigProperty implements Serializable {
+public class ConfigProperty extends AbstractConfigProperty{
+
+
+
+ /**
+ *
+ */
private static final long serialVersionUID = 1L;
- @Id
- @Column(name = "propertyKey", unique = true)
- private String key;
-
@Lob
@Column(name = "propertyValue")
private String value;
- /**
- * Returns the property's key.
- * @return The key.
- */
- public String getKey() {
- return key;
- }
-
- /**
- * Sets the property's key.
- * @param key The key
- */
- public void setKey(String key) {
- this.key = key;
- }
-
+
+
/**
* Returns the property's value (which might be {@code null}).
* @return The property's value (might be {@code null}).
*/
+ @Override
public String getValue() {
return value;
+
}
/**
* Sets the property's value.
* @param value The value
*/
+ @Override
public void setValue(String value) {
this.value = value;
}
@Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((key == null) ? 0 : key.hashCode());
- return result;
+ protected String getImpplementationName() {
+ return this.getClass().getName();
}
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ConfigProperty other = (ConfigProperty) obj;
- if (key == null) {
- if (other.key != null)
- return false;
- } else if (!key.equals(other.key))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- StringBuilder builder = new StringBuilder();
- builder.append("ConfigProperty [key=");
- builder.append(key);
- builder.append(", value=");
- builder.append(value);
- builder.append("]");
- return builder.toString();
- }
}