Integration du travail de Jialin hors svn
This commit is contained in:
@@ -1,88 +0,0 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.yacos.core;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author wang
|
|
||||||
* TODO
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
public class Conference {
|
|
||||||
|
|
||||||
private String titre;
|
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
private String infoComplementary;
|
|
||||||
|
|
||||||
private Date dateAbstract;
|
|
||||||
|
|
||||||
private Date dateEvaluation;
|
|
||||||
|
|
||||||
private Date dateStart;
|
|
||||||
|
|
||||||
private Date dateEnd;
|
|
||||||
|
|
||||||
public String getTitre() {
|
|
||||||
return titre;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTitre(String titre) {
|
|
||||||
this.titre = titre;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfoComplementary() {
|
|
||||||
return infoComplementary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInfoComplementary(String infoComplementary) {
|
|
||||||
this.infoComplementary = infoComplementary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDateAbstract() {
|
|
||||||
return dateAbstract;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateAbstract(Date dateAbstract) {
|
|
||||||
this.dateAbstract = dateAbstract;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDateEvaluation() {
|
|
||||||
return dateEvaluation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateEvaluation(Date dateEvaluation) {
|
|
||||||
this.dateEvaluation = dateEvaluation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDateStart() {
|
|
||||||
return dateStart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateStart(Date dateStart) {
|
|
||||||
this.dateStart = dateStart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDateEnd() {
|
|
||||||
return dateEnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDateEnd(Date dateEnd) {
|
|
||||||
this.dateEnd = dateEnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -26,8 +26,10 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
em.persist(a);
|
em.persist(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getArticles() {
|
|
||||||
return em.createQuery("SELECT a FROM Article a ORDER BY a.title").getResultList();
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Article> getArticles() {
|
||||||
|
return em.createQuery("SELECT a FROM Article a ORDER BY a.title").getResultList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateArticle(Article old, Article newArticle) {
|
public void updateArticle(Article old, Article newArticle) {
|
||||||
@@ -38,7 +40,4 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
public void removeArticle(Article a) {
|
public void removeArticle(Article a) {
|
||||||
em.remove(a);
|
em.remove(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,85 +1,84 @@
|
|||||||
/**
|
package org.yacos.core.conferences;
|
||||||
*
|
|
||||||
*/
|
import java.util.Date;
|
||||||
package org.yacos.core.conferences;
|
|
||||||
|
public class Conference {
|
||||||
import java.util.Date;
|
private String id;
|
||||||
|
private String titre;
|
||||||
/**
|
private String descirption;
|
||||||
* @author wang
|
private String infoComplementray;
|
||||||
* TODO
|
private Date dataAbstract;
|
||||||
*/
|
private Date dateArticle;
|
||||||
public class Conference {
|
private Date dateEvaluation;
|
||||||
|
private Date dateStart;
|
||||||
private String titre;
|
private Date dateEnd;
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
public Date getDataAbstract() {
|
||||||
private String infoComplementary;
|
return dataAbstract;
|
||||||
|
}
|
||||||
private Date dateAbstract;
|
public void setDataAbstract(Date dataAbstract) {
|
||||||
|
this.dataAbstract = dataAbstract;
|
||||||
private Date dateEvaluation;
|
}
|
||||||
|
public Date getDateArticle() {
|
||||||
private Date dateStart;
|
return dateArticle;
|
||||||
|
}
|
||||||
private Date dateEnd;
|
public void setDateArticle(Date dateArticle) {
|
||||||
|
this.dateArticle = dateArticle;
|
||||||
public String getTitre() {
|
}
|
||||||
return titre;
|
public Date getDateEnd() {
|
||||||
}
|
return dateEnd;
|
||||||
|
}
|
||||||
public void setTitre(String titre) {
|
public void setDateEnd(Date dateEnd) {
|
||||||
this.titre = titre;
|
this.dateEnd = dateEnd;
|
||||||
}
|
}
|
||||||
|
public Date getDateEvaluation() {
|
||||||
public String getDescription() {
|
return dateEvaluation;
|
||||||
return description;
|
}
|
||||||
}
|
public void setDateEvaluation(Date dateEvaluation) {
|
||||||
|
this.dateEvaluation = dateEvaluation;
|
||||||
public void setDescription(String description) {
|
}
|
||||||
this.description = description;
|
public Date getDateStart() {
|
||||||
}
|
return dateStart;
|
||||||
|
}
|
||||||
public String getInfoComplementary() {
|
public void setDateStart(Date dateStart) {
|
||||||
return infoComplementary;
|
this.dateStart = dateStart;
|
||||||
}
|
}
|
||||||
|
public String getDescirption() {
|
||||||
public void setInfoComplementary(String infoComplementary) {
|
return descirption;
|
||||||
this.infoComplementary = infoComplementary;
|
}
|
||||||
}
|
public void setDescirption(String descirption) {
|
||||||
|
this.descirption = descirption;
|
||||||
public Date getDateAbstract() {
|
}
|
||||||
return dateAbstract;
|
public String getInfoComplementray() {
|
||||||
}
|
return infoComplementray;
|
||||||
|
}
|
||||||
public void setDateAbstract(Date dateAbstract) {
|
public void setInfoComplementray(String infoComplementray) {
|
||||||
this.dateAbstract = dateAbstract;
|
this.infoComplementray = infoComplementray;
|
||||||
}
|
}
|
||||||
|
public String getTitre() {
|
||||||
public Date getDateEvaluation() {
|
return titre;
|
||||||
return dateEvaluation;
|
}
|
||||||
}
|
public void setTitre(String titre) {
|
||||||
|
this.titre = titre;
|
||||||
public void setDateEvaluation(Date dateEvaluation) {
|
}
|
||||||
this.dateEvaluation = dateEvaluation;
|
public String getId() {
|
||||||
}
|
return id;
|
||||||
|
}
|
||||||
public Date getDateStart() {
|
public void setId(String id) {
|
||||||
return dateStart;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
public Conference(String id, String titre, String descirption, String infoComplementray, Date dataAbstract, Date dateArticle, Date dateEvaluation, Date dateStart, Date dateEnd) {
|
||||||
public void setDateStart(Date dateStart) {
|
super();
|
||||||
this.dateStart = dateStart;
|
this.id = id;
|
||||||
}
|
this.titre = titre;
|
||||||
|
this.descirption = descirption;
|
||||||
public Date getDateEnd() {
|
this.infoComplementray = infoComplementray;
|
||||||
return dateEnd;
|
this.dataAbstract = dataAbstract;
|
||||||
}
|
this.dateArticle = dateArticle;
|
||||||
|
this.dateEvaluation = dateEvaluation;
|
||||||
public void setDateEnd(Date dateEnd) {
|
this.dateStart = dateStart;
|
||||||
this.dateEnd = dateEnd;
|
this.dateEnd = dateEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,38 @@
|
|||||||
package org.yacos.core.conferences;
|
package org.yacos.core.conferences;
|
||||||
|
|
||||||
public class ConferenceManager {
|
import javax.ejb.Stateless;
|
||||||
//TODO
|
import java.util.List;
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
import javax.persistence.PersistenceContext;
|
||||||
|
|
||||||
|
@Stateless
|
||||||
|
public class ConferenceManager implements IConferenceManager {
|
||||||
|
|
||||||
|
|
||||||
|
@PersistenceContext
|
||||||
|
EntityManager em;
|
||||||
|
|
||||||
|
public void addConference(Conference conf) {
|
||||||
|
em.persist(conf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Conference> getConferences() {
|
||||||
|
return em.createQuery("SELECT conf FROM Conference conf ORDER BY conf.id").getResultList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Conference getConference(String id) {
|
||||||
|
return em.find(Conference.class, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void remove(String id) {
|
||||||
|
Conference conf=this.getConference(id);
|
||||||
|
em.remove(conf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Conference newC, String id) {
|
||||||
|
//newC doit avoir le meme ID pour remplacer le vieil objet.
|
||||||
|
this.remove(id);
|
||||||
|
this.addConference(newC);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
package org.yacos.core.conferences;
|
package org.yacos.core.conferences;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.ejb.Remote;
|
||||||
|
|
||||||
|
@Remote
|
||||||
public interface IConferenceManager {
|
public interface IConferenceManager {
|
||||||
// TODO
|
public void addConference(Conference conf);
|
||||||
|
public Conference getConference(String id);
|
||||||
|
public List<Conference> getConferences();
|
||||||
|
public void remove(String id);
|
||||||
|
public void update(Conference newC,String id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user