- Timestamp:
- Sep 20, 2010, 8:51:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/dao/TagDao.java
r6972 r6980 12 12 import fr.mael.jiwigo.om.Tag; 13 13 import fr.mael.jiwigo.transverse.enumeration.MethodsEnum; 14 import fr.mael.jiwigo.transverse.enumeration.TagEnum; 14 15 import fr.mael.jiwigo.transverse.util.Outil; 15 16 … … 50 51 public static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(Main.class); 51 52 /** 52 * Instance, afin d'utiliser unsingleton53 * Instance, to use a singleton 53 54 */ 54 55 private static TagDao instance; 55 56 56 57 /** 57 * Constructeur privé, afin que seule l'instance soit accessible58 * private constructor to use a singleton 58 59 */ 59 60 private TagDao() { … … 62 63 63 64 /** 64 * @return l'instance65 * @return the instance 65 66 */ 66 67 public static TagDao getInstance() { … … 72 73 73 74 /** 74 * Lister les tag75 * @return la liste destags75 * lists the tags 76 * @return the list of tags 76 77 * @throws IOException 77 78 */ … … 92 93 List<Element> listElement = (List<Element>) element.getChildren("tag"); 93 94 ArrayList<Tag> tags = new ArrayList<Tag>(); 94 for (Element t : listElement) { 95 Tag tag = new Tag(t); 95 for (Element tagElement : listElement) { 96 Tag tag = new Tag(); 97 tag.setId(Integer.valueOf(tagElement.getAttributeValue(TagEnum.ID.getLabel()))); 98 tag.setNom(tagElement.getAttributeValue(TagEnum.NAME.getLabel())); 96 99 tags.add(tag); 97 100 } … … 101 104 102 105 /** 103 * Cr éation d'untag104 * @param tag le tag à créer105 * @return true si le tag a bien été créé106 * Creation of a tag 107 * @param tag the tag to create 108 * @return true if the tag as been successfully created 106 109 */ 107 110 public boolean creer(Tag tag) {
Note: See TracChangeset
for help on using the changeset viewer.