Subversion Repositories eFlore/Applications.coel

Rev

Rev 1329 | Rev 1417 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1329 Rev 1369
Line 1... Line 1...
1
package org.tela_botanica.client.modeles.collection;
1
package org.tela_botanica.client.modeles.collection;
Line -... Line 2...
-
 
2
 
2
 
3
import java.util.Iterator;
3
import java.util.LinkedList;
4
import java.util.LinkedList;
-
 
5
import java.util.List;
-
 
6
import java.util.Map;
Line 4... Line 7...
4
import java.util.List;
7
import java.util.Set;
5
 
8
 
Line 6... Line 9...
6
import org.tela_botanica.client.modeles.aDonnee;
9
import org.tela_botanica.client.modeles.aDonnee;
Line 19... Line 22...
19
	private CollectionAPublicationListe publicationsLiees = null;
22
	private CollectionAPublicationListe publicationsLiees = null;
20
	private CollectionACommentaireListe commentairesLiees = null;
23
	private CollectionACommentaireListe commentairesLiees = null;
21
	public static String[] champsObligatoires = {"cc_id_collection","cc_ce_type"};
24
	public static String[] champsObligatoires = {"cc_id_collection","cc_ce_type"};
Line 22... Line 25...
22
	
25
	
23
	public Collection(){
-
 
24
		
26
	public Collection() {
Line 25... Line 27...
25
	}
27
	}
26
 
28
	
27
	public Collection(ModelData model)
29
	public Collection(ModelData model)
-
 
30
	{		
-
 
31
		Map<String, Object> a = model.getProperties();
-
 
32
 
-
 
33
		Set<String> cles = a.keySet();
-
 
34
		Iterator<String> it = cles.iterator();
-
 
35
		while (it.hasNext()) {
-
 
36
			String cle = it.next();			
28
	{		
37
			if (a.get(cle) != null) {
-
 
38
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
-
 
39
				this.set(cleObjet, a.get(cle));
29
		this.set("id_collection", model.get("cc_id_collection"));
40
			}
Line 30... Line 41...
30
		this.set("nom", model.get("cc_nom"));
41
		}
31
	}
42
	}
32
 
43