view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/StaticSQCacheKey.java @ 5515:87dab419b924

Properly handle hydr_boundaries and hydr_boundaries_poly in datacage This also fixes hydr_boundaries_poly which refered to the wrong table
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Mar 2013 17:13:53 +0100
parents 700ac898ab0b
children
line wrap: on
line source
package de.intevation.flys.artifacts.model.sq;

import java.io.Serializable;


public class StaticSQCacheKey
implements Serializable
{
    public static final String CACHE_NAME = "static-sq-relation";

    private String river;
    private int measurementId;

    public StaticSQCacheKey(String river, int measurementId) {
        this.river = river;
        this.measurementId = measurementId;
    }

    public int hashCode() {
        return this.river.hashCode() | measurementId;
    }

    public boolean equals(Object other) {
        if (!(other instanceof StaticSQCacheKey)) {
            return false;
        }
        StaticSQCacheKey o = (StaticSQCacheKey) other;
        return this.river == o.river && this.measurementId == o.measurementId;
    }
}

http://dive4elements.wald.intevation.org