1 7 package org.objectweb.speedo.pobjects.inheritance.ejboo2; 8 9 import java.util.Collection ; 10 import java.util.HashSet ; 11 12 import javax.jdo.JDOHelper; 13 import javax.jdo.PersistenceManager; 14 15 18 public class MarchePersistantImpl implements MarchePersistant { 19 20 private Long id; 21 22 private String nom; 23 24 private String description; 25 26 30 public MarchePersistantImpl() { 31 this.articles = new HashSet (); 32 } 33 34 public MarchePersistantImpl(long idmar) { 35 this(); 36 id = new Long (idmar); 37 } 38 39 40 private Collection articles; 42 45 public Collection getArticles() { 46 return articles; 47 } 48 51 public void setArticles(Collection articles) { 52 this.articles = articles; 53 } 54 57 public String getDescription() { 58 return description; 59 } 60 63 public void setDescription(String description) { 64 this.description = description; 65 } 66 69 public Long getId() { 70 return id; 71 } 72 75 public void setId(Long id) { 76 this.id = id; 77 } 78 81 public String getNom() { 82 return nom; 83 } 84 87 public void setNom(String nom) { 88 this.nom = nom; 89 } 90 91 public void supprimer() { 92 PersistenceManager pm = JDOHelper.getPersistenceManager(this); 93 94 pm.deletePersistent(this); 95 } 96 97 public String toString() { 98 String s = new String (this.getClass().getName()); 99 s += " id="+id; 100 s += " nom="+nom; 101 s += " description="+description; 102 return s; 103 } 104 } 105 | Popular Tags |