mirror of
https://github.com/ArenMg/aren.git
synced 2024-11-16 21:50:50 +00:00
Merge branch 'lastdev' of https://github.com/ArenMg/aren into lastdev
This commit is contained in:
commit
0dc22beb0d
2 changed files with 30 additions and 37 deletions
|
@ -2,14 +2,7 @@ package fr.lirmm.aren.model;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
|
@ -18,7 +11,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
|||
import java.time.ZonedDateTime;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import javax.persistence.FetchType;
|
||||
|
||||
import org.hibernate.annotations.SortNatural;
|
||||
import org.hibernate.annotations.Where;
|
||||
|
||||
|
@ -32,6 +25,10 @@ import org.hibernate.annotations.Where;
|
|||
|
||||
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", scope = Debate.class)
|
||||
public class Debate extends AbstractOwnedEntity implements Serializable {
|
||||
public enum Type{
|
||||
BASIC,
|
||||
CARTO
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -99,8 +96,9 @@ public class Debate extends AbstractOwnedEntity implements Serializable {
|
|||
@Column(name = "open_public")
|
||||
private boolean openPublic = false;
|
||||
|
||||
@Column(name = "is_carto")
|
||||
private boolean carto = false;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "type")
|
||||
private Type type=Type.BASIC ;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -353,16 +351,16 @@ public class Debate extends AbstractOwnedEntity implements Serializable {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isCarto() {
|
||||
return carto;
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param carto
|
||||
* @param type
|
||||
*/
|
||||
public void setCarto(boolean carto) {
|
||||
this.carto = carto;
|
||||
public void setType(Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,13 +4,7 @@ import java.io.Serializable;
|
|||
import java.util.TreeSet;
|
||||
import java.util.SortedSet;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
|
@ -59,14 +53,15 @@ public class Document extends AbstractDatedEntity implements Serializable {
|
|||
@Column(name = "debates_count")
|
||||
private Integer debatesCount = 0;
|
||||
|
||||
@Column(name = "is_carto")
|
||||
private boolean carto = false;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "type")
|
||||
private Debate.Type type= Debate.Type.BASIC ;
|
||||
|
||||
@Column(name = "mesh_line")
|
||||
private int meshLine = 1;
|
||||
private Integer meshLine = 1;
|
||||
|
||||
@Column(name = "mesh_column")
|
||||
private int meshColumn = 1;
|
||||
private Integer meshColumn = 1;
|
||||
|
||||
@Lob
|
||||
@Type(type = "org.hibernate.type.TextType")
|
||||
|
@ -184,23 +179,23 @@ public class Document extends AbstractDatedEntity implements Serializable {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isCarto() {
|
||||
return carto;
|
||||
public Debate.Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param carto
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
public void setCarto(boolean carto) {
|
||||
this.carto = carto;
|
||||
public void setType(Debate.Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getMeshLine() {
|
||||
public Integer getMeshLine() {
|
||||
return meshLine;
|
||||
}
|
||||
|
||||
|
@ -208,15 +203,15 @@ public class Document extends AbstractDatedEntity implements Serializable {
|
|||
*
|
||||
* @param meshLine
|
||||
*/
|
||||
public void setMeshLine(int meshLine) {
|
||||
public void setMeshLine(Integer meshLine) {
|
||||
this.meshLine = meshLine;
|
||||
}
|
||||
|
||||
public int getMeshColumn() {
|
||||
public Integer getMeshColumn() {
|
||||
return meshColumn;
|
||||
}
|
||||
|
||||
public void setMeshColumn(int meshColumn) {
|
||||
public void setMeshColumn(Integer meshColumn) {
|
||||
this.meshColumn = meshColumn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue