[Dive4elements-commits] [PATCH] Add sequences to the new tables that use sequences
Wald Commits
scm-commit at wald.intevation.org
Mon Feb 25 16:00:56 CET 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1361804452 -3600
# Branch dami
# Node ID a2600507761e58d771b8bef29ca4f6b046d1deb1
# Parent 415ac9bc5a56984aac2e56db932557c1896f8089
Add sequences to the new tables that use sequences
diff -r 415ac9bc5a56 -r a2600507761e flys-backend/src/main/java/de/intevation/flys/model/DGM.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/DGM.java Mon Feb 25 15:40:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/DGM.java Mon Feb 25 16:00:52 2013 +0100
@@ -6,10 +6,13 @@
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.SequenceGenerator;
import org.hibernate.Session;
import org.hibernate.Query;
@@ -41,6 +44,13 @@
}
@Id
+ @SequenceGenerator(
+ name = "SEQUENCE_DEM_ID_SEQ",
+ sequenceName = "DEM_ID_SEQ",
+ allocationSize = 1)
+ @GeneratedValue(
+ strategy = GenerationType.SEQUENCE,
+ generator = "SEQUENCE_DEM_ID_SEQ")
@Column(name = "id")
public Integer getId() {
return id;
diff -r 415ac9bc5a56 -r a2600507761e flys-backend/src/main/java/de/intevation/flys/model/HWSLine.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/HWSLine.java Mon Feb 25 15:40:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/HWSLine.java Mon Feb 25 16:00:52 2013 +0100
@@ -9,10 +9,13 @@
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.SequenceGenerator;
import org.hibernate.Session;
import org.hibernate.Query;
@@ -42,6 +45,13 @@
private Geometry geom;
@Id
+ @SequenceGenerator(
+ name = "SEQUENCE_HWS_LINES_ID_SEQ",
+ sequenceName = "HWS_LINES_ID_SEQ",
+ allocationSize = 1)
+ @GeneratedValue(
+ strategy = GenerationType.SEQUENCE,
+ generator = "SEQUENCE_HWS_LINES_ID_SEQ")
@Column(name = "id")
public Integer getId() {
return id;
diff -r 415ac9bc5a56 -r a2600507761e flys-backend/src/main/java/de/intevation/flys/model/HWSPoint.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/HWSPoint.java Mon Feb 25 15:40:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/HWSPoint.java Mon Feb 25 16:00:52 2013 +0100
@@ -8,10 +8,13 @@
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.SequenceGenerator;
import org.hibernate.annotations.Type;
@@ -42,6 +45,13 @@
private Geometry geom;
@Id
+ @SequenceGenerator(
+ name = "SEQUENCE_HWS_POINTS_ID_SEQ",
+ sequenceName = "HWS_POINTS_ID_SEQ",
+ allocationSize = 1)
+ @GeneratedValue(
+ strategy = GenerationType.SEQUENCE,
+ generator = "SEQUENCE_HWS_POINTS_ID_SEQ")
@Column(name = "id")
public Integer getId() {
return id;
diff -r 415ac9bc5a56 -r a2600507761e flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java Mon Feb 25 15:40:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java Mon Feb 25 16:00:52 2013 +0100
@@ -5,10 +5,13 @@
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.SequenceGenerator;
import org.hibernate.Session;
import org.hibernate.Query;
@@ -37,6 +40,13 @@
@Id
+ @SequenceGenerator(
+ name = "SEQUENCE_HYDR_BOUNDARIES_ID_SEQ",
+ sequenceName = "HYDR_BOUNDARIES_ID_SEQ",
+ allocationSize = 1)
+ @GeneratedValue(
+ strategy = GenerationType.SEQUENCE,
+ generator = "SEQUENCE_HYDR_BOUNDARIES_ID_SEQ")
@Column(name = "id")
public Integer getId() {
return id;
diff -r 415ac9bc5a56 -r a2600507761e flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java Mon Feb 25 15:40:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java Mon Feb 25 16:00:52 2013 +0100
@@ -5,10 +5,13 @@
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import javax.persistence.SequenceGenerator;
import org.hibernate.Session;
import org.hibernate.Query;
@@ -37,6 +40,13 @@
@Id
+ @SequenceGenerator(
+ name = "SEQUENCE_HYDR_BOUNDARIES_POLY_ID_SEQ",
+ sequenceName = "HYDR_BOUNDARIES_POLY_ID_SEQ",
+ allocationSize = 1)
+ @GeneratedValue(
+ strategy = GenerationType.SEQUENCE,
+ generator = "SEQUENCE_HYDR_BOUNDARIES_POLY_ID_SEQ")
@Column(name = "id")
public Integer getId() {
return id;
More information about the Dive4elements-commits
mailing list