# HG changeset patch # User Felix Wolfsteller # Date 1326790830 0 # Node ID 7a8f52267a5c0a788f703200330d2dffe1de1e29 # Parent a202a9e048a5716c413ff843d124b402514342d5 Fix stateId/hash assignment in WaterlevelFacet. flys-artifacts/trunk@3695 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r a202a9e048a5 -r 7a8f52267a5c flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Jan 17 08:17:50 2012 +0000 +++ b/flys-artifacts/ChangeLog Tue Jan 17 09:00:30 2012 +0000 @@ -1,3 +1,13 @@ +2012-01-17 Felix Wolfsteller + + Fix assignment of stateId/hash in WaterlevelFacet. + + * src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java: + More verbose logging, fix hash/stateid assignment. + + * src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java: + (deepCopy): implemented. + 2012-01-17 Felix Wolfsteller "Ported" StaticWQKmsArtifact to use compute-type caching mechanism. diff -r a202a9e048a5 -r 7a8f52267a5c flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java Tue Jan 17 08:17:50 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java Tue Jan 17 09:00:30 2012 +0000 @@ -6,6 +6,7 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; +import de.intevation.artifactdatabase.state.Facet; import de.intevation.artifactdatabase.state.DefaultFacet; @@ -61,5 +62,13 @@ return null; } } + + /** Copy deeply. */ + @Override + public Facet deepCopy() { + BlackboardDataFacet copy = new BlackboardDataFacet(); + copy.set(this); + return copy; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r a202a9e048a5 -r 7a8f52267a5c flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java Tue Jan 17 08:17:50 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java Tue Jan 17 09:00:30 2012 +0000 @@ -32,7 +32,7 @@ String hash ) { - super(index, name, description, type, stateID, hash); + super(index, name, description, type, hash, stateID); } public WaterlevelFacet() { @@ -44,7 +44,8 @@ * @return a WQKms at given index. */ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for waterlevels at index: " + index); + logger.debug("Get data for waterlevels at index: " + index + + " /stateId: " + stateId); FLYSArtifact winfo = (FLYSArtifact)artifact; @@ -63,8 +64,8 @@ WaterlevelFacet copy = new WaterlevelFacet(); copy.set(this); copy.type = type; + copy.hash = hash; copy.stateId = stateId; - copy.hash = hash; return copy; } }