# HG changeset patch # User Tim Englich # Date 1253805851 0 # Node ID b02310d7ffeedce18d17b41370f5d71160e3c9a5 # Parent 2f1b87e1a40c7f43af1aa91c3c1dba32938d33c8 Make Classes Serializable for Storing in ArtifactDatabase geo-backend/trunk@131 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 2f1b87e1a40c -r b02310d7ffee geo-backend/Changelog --- a/geo-backend/Changelog Mon Sep 21 15:30:07 2009 +0000 +++ b/geo-backend/Changelog Thu Sep 24 15:24:11 2009 +0000 @@ -1,3 +1,11 @@ +2009-09-24 Tim Englich + + * src/main/java/de/intevation/gnv/geobackend/base/ResultDescriptor.java Edited, + src/main/java/de/intevation/gnv/geobackend/base/Result.java Edited, + src/main/java/de/intevation/gnv/geobackend/base/DefaultResultDescriptor.java Edited, + src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java Edited: + Make Classes Serializable for Storing in ArtifactDatabase + 2009-09-21 Tim Englich * src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java: diff -r 2f1b87e1a40c -r b02310d7ffee geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java --- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java Mon Sep 21 15:30:07 2009 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResult.java Thu Sep 24 15:24:11 2009 +0000 @@ -18,6 +18,12 @@ public class DefaultResult implements Result { /** + * THE UID of this Classe + */ + private static final long serialVersionUID = -6886218808840982766L; + + + /** * HashMap which stores the Columnvalues identified by the unique Columnname */ private HashMap columnValues = new HashMap(); @@ -41,16 +47,13 @@ */ public Date getDate(String columnName) { Object o = this.columnValues.get(columnName); + Date d = null; if(o instanceof Date){ - return (Date)o; + d = (Date)o; }else if (o instanceof GregorianCalendar){ - return ((GregorianCalendar)o).getTime(); - }else{ - // TODO FIXME FEHLER finden. - return null; + d = ((GregorianCalendar)o).getTime(); } - - + return d; } /** diff -r 2f1b87e1a40c -r b02310d7ffee geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResultDescriptor.java --- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResultDescriptor.java Mon Sep 21 15:30:07 2009 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResultDescriptor.java Thu Sep 24 15:24:11 2009 +0000 @@ -15,6 +15,11 @@ public class DefaultResultDescriptor implements ResultDescriptor { /** + *The Uid of this Class + */ + private static final long serialVersionUID = 7016889733270716130L; + + /** * The Names of the Columns of one Result */ private List columnNames = new ArrayList(); diff -r 2f1b87e1a40c -r b02310d7ffee geo-backend/src/main/java/de/intevation/gnv/geobackend/base/Result.java --- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/Result.java Mon Sep 21 15:30:07 2009 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/Result.java Thu Sep 24 15:24:11 2009 +0000 @@ -3,6 +3,7 @@ */ package de.intevation.gnv.geobackend.base; +import java.io.Serializable; import java.util.Date; @@ -12,7 +13,7 @@ * @author Tim Englich * */ -public interface Result { +public interface Result extends Serializable{ /** * Returns the ResultDescriptor which provides the diff -r 2f1b87e1a40c -r b02310d7ffee geo-backend/src/main/java/de/intevation/gnv/geobackend/base/ResultDescriptor.java --- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/ResultDescriptor.java Mon Sep 21 15:30:07 2009 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/ResultDescriptor.java Thu Sep 24 15:24:11 2009 +0000 @@ -2,12 +2,15 @@ * */ package de.intevation.gnv.geobackend.base; + +import java.io.Serializable; + /** * Interface which provides the Methods for Accessing * the MetaData of an ResultEntry * @author Tim Englich */ -public interface ResultDescriptor { +public interface ResultDescriptor extends Serializable{ /** * Returns the Classname of the Column