From d12ef35045c15265a2172b7fe37a4fe4f58b2dbc Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Thu, 24 May 2018 09:59:39 +0200
Subject: [PATCH] model contains information about user consent for google maps
 API terms

---
 .../lcsb/mapviewer/model/map/layout/Layout.java     | 13 ++++++++++++-
 persist/src/db/11.1.0/fix_db_20180509.sql           |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 persist/src/db/11.1.0/fix_db_20180509.sql

diff --git a/model/src/main/java/lcsb/mapviewer/model/map/layout/Layout.java b/model/src/main/java/lcsb/mapviewer/model/map/layout/Layout.java
index 15e70bdd5e..759bc05bd5 100644
--- a/model/src/main/java/lcsb/mapviewer/model/map/layout/Layout.java
+++ b/model/src/main/java/lcsb/mapviewer/model/map/layout/Layout.java
@@ -70,7 +70,10 @@ public class Layout implements Serializable {
 	/**
 	 * Does the layout present data in hierarchical view.
 	 */
-	private boolean						hierarchicalView = false;
+    private boolean                     hierarchicalView = false;
+    
+    @Column(name="google_license_consent")
+    private boolean                     googleLicenseConsent = false;
 
 	/**
 	 * If overlay contain hierarchical view then it might be fixed on some
@@ -447,4 +450,12 @@ public class Layout implements Serializable {
 		this.hierarchyViewLevel = hierarchyViewLevel;
 	}
 
+  public boolean isGoogleLicenseConsent() {
+    return googleLicenseConsent;
+  }
+
+  public void setGoogleLicenseConsent(boolean googleLicenseConsent) {
+    this.googleLicenseConsent = googleLicenseConsent;
+  }
+
 }
diff --git a/persist/src/db/11.1.0/fix_db_20180509.sql b/persist/src/db/11.1.0/fix_db_20180509.sql
new file mode 100644
index 0000000000..7b90e53299
--- /dev/null
+++ b/persist/src/db/11.1.0/fix_db_20180509.sql
@@ -0,0 +1 @@
+alter table layout add column google_license_consent boolean default false;
-- 
GitLab