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,7 +26,9 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
||||
em.persist(a);
|
||||
}
|
||||
|
||||
public List getArticles() {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Article> getArticles() {
|
||||
return em.createQuery("SELECT a FROM Article a ORDER BY a.title").getResultList();
|
||||
}
|
||||
|
||||
@@ -38,7 +40,4 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
||||
public void removeArticle(Article a) {
|
||||
em.remove(a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,85 +1,84 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.yacos.core.conferences;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wang
|
||||
* TODO
|
||||
*/
|
||||
public class Conference {
|
||||
|
||||
private String id;
|
||||
private String titre;
|
||||
|
||||
private String description;
|
||||
|
||||
private String infoComplementary;
|
||||
|
||||
private Date dateAbstract;
|
||||
|
||||
private String descirption;
|
||||
private String infoComplementray;
|
||||
private Date dataAbstract;
|
||||
private Date dateArticle;
|
||||
private Date dateEvaluation;
|
||||
|
||||
private Date dateStart;
|
||||
|
||||
private Date dateEnd;
|
||||
|
||||
public String getTitre() {
|
||||
return titre;
|
||||
}
|
||||
|
||||
public void setTitre(String titre) {
|
||||
this.titre = titre;
|
||||
public Date getDataAbstract() {
|
||||
return dataAbstract;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
public void setDataAbstract(Date dataAbstract) {
|
||||
this.dataAbstract = dataAbstract;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
public Date getDateArticle() {
|
||||
return dateArticle;
|
||||
}
|
||||
|
||||
public String getInfoComplementary() {
|
||||
return infoComplementary;
|
||||
public void setDateArticle(Date dateArticle) {
|
||||
this.dateArticle = dateArticle;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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 String getDescirption() {
|
||||
return descirption;
|
||||
}
|
||||
public void setDescirption(String descirption) {
|
||||
this.descirption = descirption;
|
||||
}
|
||||
public String getInfoComplementray() {
|
||||
return infoComplementray;
|
||||
}
|
||||
public void setInfoComplementray(String infoComplementray) {
|
||||
this.infoComplementray = infoComplementray;
|
||||
}
|
||||
public String getTitre() {
|
||||
return titre;
|
||||
}
|
||||
public void setTitre(String titre) {
|
||||
this.titre = titre;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Conference(String id, String titre, String descirption, String infoComplementray, Date dataAbstract, Date dateArticle, Date dateEvaluation, Date dateStart, Date dateEnd) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.titre = titre;
|
||||
this.descirption = descirption;
|
||||
this.infoComplementray = infoComplementray;
|
||||
this.dataAbstract = dataAbstract;
|
||||
this.dateArticle = dateArticle;
|
||||
this.dateEvaluation = dateEvaluation;
|
||||
this.dateStart = dateStart;
|
||||
this.dateEnd = dateEnd;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
package org.yacos.core.conferences;
|
||||
|
||||
public class ConferenceManager {
|
||||
//TODO
|
||||
import javax.ejb.Stateless;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
import javax.ejb.Remote;
|
||||
|
||||
@Remote
|
||||
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