From 357a3e07d982bc6a9eede1d78e4f30700f7c263c Mon Sep 17 00:00:00 2001 From: Bojnourdi Date: Mon, 31 Aug 2015 09:53:39 +0200 Subject: [PATCH] Code cleanup --- .../GDE-ejb/src/java/com/edf/gde/entities/Attribute.java | 4 ++-- projects/GDE_App/src/drop.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/GDE_App/GDE-ejb/src/java/com/edf/gde/entities/Attribute.java b/projects/GDE_App/GDE-ejb/src/java/com/edf/gde/entities/Attribute.java index 4f63612..f612414 100644 --- a/projects/GDE_App/GDE-ejb/src/java/com/edf/gde/entities/Attribute.java +++ b/projects/GDE_App/GDE-ejb/src/java/com/edf/gde/entities/Attribute.java @@ -38,6 +38,7 @@ import javax.xml.bind.annotation.XmlRootElement; @NamedQuery(name = "Attribute.findByValue", query = "SELECT a FROM Attribute a WHERE a.value = :value"), @NamedQuery(name = "Attribute.findByGroupId", query = "SELECT a FROM Attribute a WHERE a.attributeGroup.id=:attributeGroupId") }) +@SequenceGenerator(name = "SEQ_GEN_SEQUENCE", allocationSize = 50, initialValue = 10000) public class Attribute implements Serializable { private static final long serialVersionUID = 1L; @@ -45,7 +46,6 @@ public class Attribute implements Serializable { @Basic(optional = false) @NotNull @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_GEN_SEQUENCE") - @SequenceGenerator(name = "SEQ_GEN_SEQUENCE",allocationSize = 50, initialValue = 10000) @Column(name = "id") private long id; @Size(max = 255) @@ -125,7 +125,7 @@ public class Attribute implements Serializable { attribute.type = ato.getType(); attribute.value = ato.getValue(); attribute.mandatory = ato.getMandatory(); - attribute.attributeGroup=ato.getGroupId()==0?null:em.find(AttributeGroup.class, ato.getGroupId()); + attribute.attributeGroup = ato.getGroupId() == 0 ? null : em.find(AttributeGroup.class, ato.getGroupId()); return attribute; } diff --git a/projects/GDE_App/src/drop.sql b/projects/GDE_App/src/drop.sql index f4d3f5b..754f7f0 100644 --- a/projects/GDE_App/src/drop.sql +++ b/projects/GDE_App/src/drop.sql @@ -1,5 +1,5 @@ drop sequence if exists SEQ_GEN_SEQUENCE; -create sequence SEQ_GEN_SEQUENCE START WITH 1000 INCREMENT BY 50; +-- create sequence SEQ_GEN_SEQUENCE START WITH 1000 INCREMENT BY 50; drop table if exists study_files cascade; DROP TABLE IF EXISTS GROUP_ CASCADE; -- 2.39.2