diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java index 0a1c0f2df162f720252af7fa767f32587fb87a99..377a46be8b71c7b9b0b54758391083c4150e28f9 100644 --- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java +++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestTypeNursery.java @@ -20,12 +20,9 @@ package no.nibio.vips.logic.entity; import java.io.Serializable; -import java.util.Map; -import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.Table; -import javax.persistence.Transient; /** * @copyright 2023 <a href="http://www.nibio.no/">NIBIO</a> @@ -36,37 +33,4 @@ import javax.persistence.Transient; @Table(name = "point_of_interest_nursery") public class PointOfInterestTypeNursery extends PointOfInterest implements Serializable { - private Double impactRadius; - - /** - * Radius (in km) of the expected impact (implemented for fire blight) - * of the nursery. Used for map rendering - * @return the impactRadius - */ - @Column(name="impact_radius") - public Double getImpactRadius() { - return impactRadius; - } - - /** - * @param impactRadius the impactRadius to set - */ - public void setImpactRadius(Double impactRadius) { - this.impactRadius = impactRadius; - } - - @Transient - @Override - public String getGeoJSON() - { - this.addProperty("impactRadius", this.getImpactRadius()); - return super.getGeoJSON(); - } - - @Transient - @Override - public Map<String,Object> getProperties() { - this.addProperty("impactRadius", this.getImpactRadius()); - return super.getProperties(); - } } diff --git a/src/main/resources/db/migration/V16__POI_type_nursery_altered_rollback.sql b/src/main/resources/db/migration/V16__POI_type_nursery_altered_rollback.sql new file mode 100644 index 0000000000000000000000000000000000000000..c9179e6a50a79fe39bc829f03f9c07429e22a7b3 --- /dev/null +++ b/src/main/resources/db/migration/V16__POI_type_nursery_altered_rollback.sql @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2023 NIBIO <http://www.nibio.no/>. + * + * This file is part of VIPSLogic. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + */ +/** + * Author: Tor-Einar Skog <tor-einar.skog@nibio.no> + * Created: September 29th, 2023 + */ + + + +-- Rollback adding of property impact_radius to POI type nursery +ALTER TABLE public.point_of_interest_nursery + DROP COLUMN impact_radius; \ No newline at end of file