aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyByteValues.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/ConfigPropertyByteValues.java')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyByteValues.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyByteValues.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyByteValues.java
index 51f7e4da6..c31ca98ed 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyByteValues.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/ConfigPropertyByteValues.java
@@ -1,11 +1,9 @@
package at.gv.egovernment.moa.id.commons.db.dao.config;
import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.Lob;
import javax.persistence.Table;
import at.gv.egovernment.moa.logging.Logger;
@@ -27,7 +25,6 @@ public class ConfigPropertyByteValues extends AbstractConfigProperty{
private static final long serialVersionUID = 1L;
- @Lob
@Column(name = "propertyValueBytes")
private byte[] value = null;
@@ -58,7 +55,10 @@ public class ConfigPropertyByteValues extends AbstractConfigProperty{
@Override
public void setValue(String value) {
try {
- this.value = value.getBytes("UTF-8");
+ if (value == null)
+ this.value = null;
+ else
+ this.value = value.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
Logger.error("Internal DB write error! Can not read write to configuration DB.", e);
@@ -66,8 +66,12 @@ public class ConfigPropertyByteValues extends AbstractConfigProperty{
}
}
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.commons.db.dao.config.AbstractConfigProperty#getImplementationClass()
+ */
@Override
- protected String getImpplementationName() {
- return this.getClass().getName();
+ protected Class<? extends AbstractConfigProperty> getImplementationClass() {
+ return this.getClass();
+
}
}