Policy failures:
Code warning - failed on resource Conference.java. Reason: The assignment to variable id has no effect, line 136 - failed on resource Conference.java. Reason: The import javax.persistence.JoinColumn is never used, line 11 - failed on resource Conference.java. Reason: The import javax.persistence.OneToOne is never used, line 13 - failed on resource Conference.java. Reason: The import org.yacos.core.users.User is never used, line 18 - failed on resource Conference.java. Reason: The serializable class Conference does not declare a static final serialVersionUID field of type long, line 2 Override reason: ajout serizable
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package org.yacos.core.conferences;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
@@ -16,7 +18,7 @@ import org.yacos.core.article.Article;
|
||||
import org.yacos.core.users.User;
|
||||
|
||||
@Entity
|
||||
public class Conference {
|
||||
public class Conference implements Serializable{
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||
private Integer id;
|
||||
@@ -34,31 +36,32 @@ public class Conference {
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date dateEnd;
|
||||
|
||||
@OneToOne(targetEntity=User.class,optional=false)
|
||||
@JoinColumn(name="chairman_id",nullable=false)
|
||||
/*@OneToOne(targetEntity=User.class,optional=true)
|
||||
@JoinColumn(name="chairman_id",nullable=true)
|
||||
private User chairman;
|
||||
|
||||
*/
|
||||
@OneToMany(targetEntity=Article.class,mappedBy="conference")
|
||||
private Collection<Article> articles;
|
||||
|
||||
/**
|
||||
* @return the chairman
|
||||
*/
|
||||
@OneToOne(targetEntity=User.class,optional=false)
|
||||
@JoinColumn(name="chairman_id",nullable=false)
|
||||
/*@OneToOne(targetEntity=User.class,optional=true)
|
||||
@JoinColumn(name="chairman_id",nullable=true)
|
||||
public User getChairman() {
|
||||
return chairman;
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* @param chairman the chairman to set
|
||||
*/
|
||||
@OneToOne(targetEntity=User.class,optional=false)
|
||||
@JoinColumn(name="chairman_id",nullable=false)
|
||||
/*
|
||||
@OneToOne(targetEntity=User.class,optional=true)
|
||||
@JoinColumn(name="chairman_id",nullable=true)
|
||||
public void setChairman(User chairman) {
|
||||
this.chairman = chairman;
|
||||
}
|
||||
|
||||
*/
|
||||
@Temporal(TemporalType.DATE)
|
||||
public Date getDataAbstract() {
|
||||
return dateAbstract;
|
||||
@@ -128,7 +131,7 @@ public class Conference {
|
||||
public Conference() {
|
||||
}
|
||||
|
||||
public Conference(Integer id, String titre, String descirption, String infoComplementray, Date dataAbstract, Date dateArticle, Date dateEvaluation, Date dateStart, Date dateEnd) {
|
||||
public Conference(String titre, String descirption, String infoComplementray, Date dataAbstract, Date dateArticle, Date dateEvaluation, Date dateStart, Date dateEnd) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.titre = titre;
|
||||
|
||||
Reference in New Issue
Block a user