Commit d11de751 authored by Matija Obreza's avatar Matija Obreza

Added bio16-19 to TileClimate

- Removed tminX, tmaxX indexes
parent 3c83fa7f
......@@ -24,19 +24,20 @@ import javax.persistence.Table;
* The TileClimate entity maintains data from worldclim.org.
*/
@Entity
@Table(name = "tile_climate", indexes = { @Index(columnList = "alt"), @Index(columnList = "tmin1"), @Index(columnList = "tmax1"), @Index(columnList = "tmean1"),
@Index(columnList = "prec1"), @Index(columnList = "tmin2"), @Index(columnList = "tmax2"), @Index(columnList = "tmean2"), @Index(columnList = "prec2"),
@Index(columnList = "tmin3"), @Index(columnList = "tmax3"), @Index(columnList = "tmean3"), @Index(columnList = "prec3"), @Index(columnList = "tmin4"),
@Index(columnList = "tmax4"), @Index(columnList = "tmean4"), @Index(columnList = "prec4"), @Index(columnList = "tmin5"), @Index(columnList = "tmax5"),
@Index(columnList = "tmean5"), @Index(columnList = "prec5"), @Index(columnList = "tmin6"), @Index(columnList = "tmax6"), @Index(columnList = "tmean6"),
@Index(columnList = "prec6"), @Index(columnList = "tmin7"), @Index(columnList = "tmax7"), @Index(columnList = "tmean7"), @Index(columnList = "prec7"),
@Index(columnList = "tmin8"), @Index(columnList = "tmax8"), @Index(columnList = "tmean8"), @Index(columnList = "prec8"), @Index(columnList = "tmin9"),
@Index(columnList = "tmax9"), @Index(columnList = "tmean9"), @Index(columnList = "prec9"), @Index(columnList = "tmin10"), @Index(columnList = "tmax10"),
@Index(columnList = "tmean10"), @Index(columnList = "prec10"), @Index(columnList = "tmin11"), @Index(columnList = "tmax11"), @Index(columnList = "tmean11"),
@Index(columnList = "prec11"), @Index(columnList = "tmin12"), @Index(columnList = "tmax12"), @Index(columnList = "tmean12"), @Index(columnList = "prec12"),
@Table(name = "tile_climate", indexes = { @Index(columnList = "alt"), @Index(columnList = "tmean1"),
@Index(columnList = "prec1"), @Index(columnList = "tmean2"), @Index(columnList = "prec2"),
@Index(columnList = "tmean3"), @Index(columnList = "prec3"),
@Index(columnList = "tmean4"), @Index(columnList = "prec4"),
@Index(columnList = "tmean5"), @Index(columnList = "prec5"), @Index(columnList = "tmean6"),
@Index(columnList = "prec6"), @Index(columnList = "tmean7"), @Index(columnList = "prec7"),
@Index(columnList = "tmean8"), @Index(columnList = "prec8"),
@Index(columnList = "tmean9"), @Index(columnList = "prec9"),
@Index(columnList = "tmean10"), @Index(columnList = "prec10"), @Index(columnList = "tmean11"),
@Index(columnList = "prec11"), @Index(columnList = "tmean12"), @Index(columnList = "prec12"),
@Index(columnList = "bio1"), @Index(columnList = "bio2"), @Index(columnList = "bio3"), @Index(columnList = "bio4"), @Index(columnList = "bio5"),
@Index(columnList = "bio6"), @Index(columnList = "bio7"), @Index(columnList = "bio8"), @Index(columnList = "bio9"), @Index(columnList = "bio10"),
@Index(columnList = "bio11"), @Index(columnList = "bio12"), @Index(columnList = "bio13"), @Index(columnList = "bio14"), @Index(columnList = "bio15") })
@Index(columnList = "bio11"), @Index(columnList = "bio12"), @Index(columnList = "bio13"), @Index(columnList = "bio14"), @Index(columnList = "bio15"),
@Index(columnList = "bio16"), @Index(columnList = "bio17"), @Index(columnList = "bio18"), @Index(columnList = "bio19") })
public class TileClimate {
@Id
private long tileIndex;
......@@ -58,6 +59,10 @@ public class TileClimate {
private Double bio13;
private Double bio14;
private Double bio15;
private Double bio16;
private Double bio17;
private Double bio18;
private Double bio19;
private Double prec1;
private Double prec2;
......@@ -253,6 +258,38 @@ public class TileClimate {
public void setBio15(Double bio15) {
this.bio15 = bio15;
}
public Double getBio16() {
return bio16;
}
public void setBio16(Double bio16) {
this.bio16 = bio16;
}
public Double getBio17() {
return bio17;
}
public void setBio17(Double bio17) {
this.bio17 = bio17;
}
public Double getBio18() {
return bio18;
}
public void setBio18(Double bio18) {
this.bio18 = bio18;
}
public Double getBio19() {
return bio19;
}
public void setBio19(Double bio19) {
this.bio19 = bio19;
}
public Double getPrec1() {
return prec1;
......
......@@ -49,6 +49,10 @@ public class ClimateFilter {
public NumberFilter<Double> bio13;
public NumberFilter<Double> bio14;
public NumberFilter<Double> bio15;
public NumberFilter<Double> bio16;
public NumberFilter<Double> bio17;
public NumberFilter<Double> bio18;
public NumberFilter<Double> bio19;
public NumberFilter<Double> prec1;
public NumberFilter<Double> prec2;
......@@ -164,6 +168,18 @@ public class ClimateFilter {
if (bio15 != null) {
and.and(bio15.buildQuery(qtileClimate.bio15));
}
if (bio16 != null) {
and.and(bio16.buildQuery(qtileClimate.bio16));
}
if (bio17 != null) {
and.and(bio17.buildQuery(qtileClimate.bio17));
}
if (bio18 != null) {
and.and(bio18.buildQuery(qtileClimate.bio18));
}
if (bio19 != null) {
and.and(bio19.buildQuery(qtileClimate.bio19));
}
if (prec1 != null) {
and.and(prec1.buildQuery(qtileClimate.prec1));
......
......@@ -5421,3 +5421,122 @@ databaseChangeLog:
- sql:
comment: Count and assign value to totalValue field
sql: update kpiexecutionrun k set k.totalValue = (select sum(obs.value) from kpiobservation obs where obs.executionRunId = k.id)
- changeSet:
id: 1548776089000-1
author: mobreza
comment: Added missing bioXX climate variables
changes:
- addColumn:
tableName: tile_climate
columns:
- column:
name: bio16
type: DOUBLE
- column:
name: bio17
type: DOUBLE
- column:
name: bio18
type: DOUBLE
- column:
name: bio19
type: DOUBLE
# Drop index on monthly tmin
- dropIndex: # tmin1
indexName: UK_osv1n6fdkko1w04dran4q6sqj
tableName: tile_climate
- dropIndex: # 2
indexName: UK_70m5a2khfktckjjgwgmtxocwk
tableName: tile_climate
- dropIndex: # 3
indexName: UK_1rob7nrwm6fm6ko8a35lcmxfm
tableName: tile_climate
- dropIndex: # 4
indexName: UK_5v65e9k2tfbir947cqm55vdq8
tableName: tile_climate
- dropIndex: # 5
indexName: UK_4h3frp1qsyycc3am354sc0dwr
tableName: tile_climate
- dropIndex: # 6
indexName: UK_nxldxplaepwobn5gml71uovp9
tableName: tile_climate
- dropIndex: # 7
indexName: UK_to58xnxvs6delb8ookwlqd0ql
tableName: tile_climate
- dropIndex: # 8
indexName: UK_ovombpuiisygohodcfbn63dph
tableName: tile_climate
- dropIndex: # 9
indexName: UK_d3fqcoklwlhn5wqy68sj9eogc
tableName: tile_climate
- dropIndex: # 10
indexName: UK_j2j87af43hir92s162xmauatw
tableName: tile_climate
- dropIndex: # 11
indexName: UK_2403f93etp2aaro78eym0srau
tableName: tile_climate
- dropIndex: # 12
indexName: UK_mkw7lqemsxf2m6atcrd541xjj
tableName: tile_climate
# Drop index on monthly tmax
- dropIndex: # tmax1
indexName: UK_g0hq4s4dfmc4ddugrt9we0go9
tableName: tile_climate
- dropIndex: # tmax2
indexName: UK_2crtla6lgbt4pp79dytbpm5l4
tableName: tile_climate
- dropIndex: # tmax3
indexName: UK_sex5d71nmjaia88fv02s9t0o0
tableName: tile_climate
- dropIndex: # tmax4
indexName: UK_qds8uyasghug6v4rypne8keee
tableName: tile_climate
- dropIndex: # tmax5
indexName: UK_bytx1fddqookdwgpbrghfr89m
tableName: tile_climate
- dropIndex: # tmax6
indexName: UK_salfee9vtb7dgasoby1ick3td
tableName: tile_climate
- dropIndex: # tmax7
indexName: UK_ew9r0cn0917bjbmji2jfy3adi
tableName: tile_climate
- dropIndex: # tmax8
indexName: UK_lv1hyx4745wlf8np6imdp3kbd
tableName: tile_climate
- dropIndex: # tmax9
indexName: UK_qrxv9muxshywoq4uwpyqaaewg
tableName: tile_climate
- dropIndex: # tmax10
indexName: UK_iaqpx9y134h9lcvawhpl5asbj
tableName: tile_climate
- dropIndex: # tmax11
indexName: UK_f8qrv981c3olu7bmdu3dn8dx2
tableName: tile_climate
- dropIndex: # tmax12
indexName: UK_3hsn25byf33ce3dm0o8403qcw
tableName: tile_climate
- createIndex:
columns:
- column:
name: bio16
indexName: UK_tllx8suofq27njhc60y6h1ii6
tableName: tile_climate
- createIndex:
columns:
- column:
name: bio17
indexName: UK_tllx8suofq27njhc60y6h1ii7
tableName: tile_climate
- createIndex:
columns:
- column:
name: bio18
indexName: UK_tllx8suofq27njhc60y6h1ii8
tableName: tile_climate
- createIndex:
columns:
- column:
name: bio19
indexName: UK_tllx8suofq27njhc60y6h1ii9
tableName: tile_climate
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment