Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1292 Rev 1323
Line 30... Line 30...
30
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
30
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
31
import org.tela_botanica.client.modeles.structure.StructureAPersonneAsyncDao;
31
import org.tela_botanica.client.modeles.structure.StructureAPersonneAsyncDao;
32
import org.tela_botanica.client.modeles.structure.StructureAsyncDao;
32
import org.tela_botanica.client.modeles.structure.StructureAsyncDao;
33
import org.tela_botanica.client.modeles.structure.StructureConservation;
33
import org.tela_botanica.client.modeles.structure.StructureConservation;
34
import org.tela_botanica.client.modeles.structure.StructureValorisation;
34
import org.tela_botanica.client.modeles.structure.StructureValorisation;
-
 
35
import org.tela_botanica.client.synchronisation.Sequenceur;
35
import org.tela_botanica.client.util.Debug;
36
import org.tela_botanica.client.util.Debug;
Line 36... Line 37...
36
 
37
 
37
import com.extjs.gxt.ui.client.Registry;
38
import com.extjs.gxt.ui.client.Registry;
-
 
39
import com.google.gwt.core.client.GWT;
Line 38... Line 40...
38
import com.google.gwt.core.client.GWT;
40
import com.google.gwt.user.client.Window;
39
 
41
 
Line 40... Line 42...
40
// TODO : le transformer en SINGLETON
42
// TODO : le transformer en SINGLETON
Line 45... Line 47...
45
	}
47
	}
Line 46... Line 48...
46
 
48
 
47
	//+----------------------------------------------------------------------------------------------------------------+
49
	//+----------------------------------------------------------------------------------------------------------------+
48
	//												GESTION DES VALEURS ET LISTES
50
	//												GESTION DES VALEURS ET LISTES
49
	//+----------------------------------------------------------------------------------------------------------------+
-
 
50
	
51
	//+----------------------------------------------------------------------------------------------------------------+
-
 
52
	public void obtenirListeValeurs(Rafraichissable vue, Integer id, Integer seqId) {
-
 
53
		if (vue instanceof Sequenceur)	{
-
 
54
			vue = (Sequenceur) vue;
51
	public void obtenirListeValeurs(Rafraichissable vue, Integer id) {
55
		}
52
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
56
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
53
		lsDao.obtenirListe(id);
57
		lsDao.obtenirListe(id, seqId);
Line 54... Line 58...
54
	}
58
	}
55
 
59
 
56
	public void obtenirListeValeurs(Rafraichissable vue, String type, int id) {
60
	public void obtenirListeValeurs(Rafraichissable vue, String type, int id, Integer seqId) {
57
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
61
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
Line 58... Line 62...
58
		lsDao.obtenirListe(type, String.valueOf(id));
62
		lsDao.obtenirListe(type, String.valueOf(id), seqId);
59
	}	
63
	}	
60
	
64
	
61
	public void obtenirListeValeurs(Rafraichissable vue, Integer listId, boolean pagination, String recherche, int start, int nbElements) {
65
	public void obtenirListeValeurs(Rafraichissable vue, Integer listId, boolean pagination, String recherche, int start, int nbElements, Integer seqId) {
-
 
66
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
-
 
67
		lsDao.obtenirListe(listId, pagination, recherche, start, nbElements, seqId);
-
 
68
	}
-
 
69
 
-
 
70
	public void obtenirListeValeurs(Rafraichissable vue, String type, String id, Integer seqId) {
Line 62... Line 71...
62
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
71
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
63
		lsDao.obtenirListe(listId, pagination, recherche, start, nbElements);
72
		lsDao.obtenirListe(type, String.valueOf(id), seqId);
64
	}
73
	}	
65
	
74
	
Line 66... Line 75...
66
	public void obtenirListeRegion(Rafraichissable vue, Integer id, String region) {
75
	public void obtenirListeRegion(Rafraichissable vue, Integer id, String region) {
67
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
76
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
68
		lsDao.selectionner("abv", id, region, null);
77
		lsDao.selectionner("abv", id, region, null, null);
69
	}
78
	}
Line 70... Line 79...
70
	
79
	
71
	public void obtenirValeur(Rafraichissable vue, String type, Integer id, String identifiant) {
80
	public void obtenirValeur(Rafraichissable vue, String type, Integer id, String identifiant, Integer seqId) {
72
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
81
		ValeurListeAsyncDao lsDao = new ValeurListeAsyncDao(vue);
Line 111... Line 120...
111
	
120
	
112
	//+----------------------------------------------------------------------------------------------------------------+
121
	//+----------------------------------------------------------------------------------------------------------------+
113
	//												GESTION DES PROJETS
122
	//												GESTION DES PROJETS
Line 114... Line 123...
114
	//+----------------------------------------------------------------------------------------------------------------+
123
	//+----------------------------------------------------------------------------------------------------------------+
115
	
124
	
116
	public void selectionnerProjet(Rafraichissable vueARafraichir, String projetId, String nom, int start, int nbElements) {
125
	public void selectionnerProjet(Rafraichissable vueARafraichir, String projetId, String nom, int start, int nbElements, Integer seqId) {
117
		ProjetAsyncDao pADAO = new ProjetAsyncDao(vueARafraichir);
126
		ProjetAsyncDao pADAO = new ProjetAsyncDao(vueARafraichir);
Line 118... Line 127...
118
		pADAO.selectionner(projetId, nom, start, nbElements);
127
		pADAO.selectionner(projetId, nom, start, nbElements, seqId);
119
	}
128
	}
120
 
129
 
Line 130... Line 139...
130
 
139
 
131
	//+----------------------------------------------------------------------------------------------------------------+
140
	//+----------------------------------------------------------------------------------------------------------------+
132
	//												GESTION DES STRUCTURES
141
	//												GESTION DES STRUCTURES
Line 133... Line 142...
133
	//+----------------------------------------------------------------------------------------------------------------+
142
	//+----------------------------------------------------------------------------------------------------------------+
134
 
143
 
135
	public void selectionnerStructure(Rafraichissable vueARafraichir, String projetId, String structureId, String nomStructure, int start, int nbElements) {
144
	public void selectionnerStructure(Rafraichissable vueARafraichir, String projetId, String structureId, String nomStructure, int start, int nbElements, Integer seqId) {
136
		// Gestion des données des tables coel_structure, coel_structure_conservation et coel_structure_valorisation 
145
		// Gestion des données des tables coel_structure, coel_structure_conservation et coel_structure_valorisation 
137
		StructureAsyncDao sDao = new StructureAsyncDao(vueARafraichir);
146
		StructureAsyncDao sDao = new StructureAsyncDao(vueARafraichir);
Line 138... Line 147...
138
		sDao.selectionner(projetId, structureId, nomStructure, start, nbElements);
147
		sDao.selectionner(projetId, structureId, nomStructure, start, nbElements, seqId);
139
	}
148
	}
140
	
149
	
Line 158... Line 167...
158
	}
167
	}
Line 159... Line 168...
159
 
168
 
160
	//+----------------------------------------------------------------------------------------------------------------+
169
	//+----------------------------------------------------------------------------------------------------------------+
Line 161... Line 170...
161
	// GESTION de la relation STRUCTURE A PERSONNE
170
	// GESTION de la relation STRUCTURE A PERSONNE
162
	
171
	
163
	public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String structureId, String roleId) {
172
	public void selectionnerStructureAPersonne(Rafraichissable vueARafraichir, String structureId, String roleId, Integer seqId) {
164
		// Gestion des données de la table coel_structure_a_personne
173
		// Gestion des données de la table coel_structure_a_personne
165
		if (structureId != null && roleId != null) {
174
		if (structureId != null && roleId != null) {
166
			StructureAPersonneAsyncDao sapDao = new StructureAPersonneAsyncDao(vueARafraichir);
175
			StructureAPersonneAsyncDao sapDao = new StructureAPersonneAsyncDao(vueARafraichir);
167
			sapDao.selectionner(structureId, roleId);
176
			sapDao.selectionner(structureId, roleId, seqId);
Line 168... Line 177...
168
		}
177
		}
169
	}
178
	}
Line 277... Line 286...
277
	}
286
	}
Line 278... Line 287...
278
	
287
	
279
	//+----------------------------------------------------------------------------------------------------------------+
288
	//+----------------------------------------------------------------------------------------------------------------+
280
	//												GESTION DES PERSONNES
289
	//												GESTION DES PERSONNES
281
	//+----------------------------------------------------------------------------------------------------------------+
-
 
282
	
290
	//+----------------------------------------------------------------------------------------------------------------+
-
 
291
	public void selectionnerPersonne(Rafraichissable vueARafraichir, String personneId, String projetId, String nomComplet, int start, int nbElements) {
-
 
292
		selectionnerPersonne(vueARafraichir, personneId, projetId, nomComplet, start, nbElements, null);
-
 
293
	}
-
 
294
	
283
	public void selectionnerPersonne(Rafraichissable vueARafraichir, String personneId, String projetId, String nomComplet, int start, int nbElements) {
295
	public void selectionnerPersonne(Rafraichissable vueARafraichir, String personneId, String projetId, String nomComplet, int start, int nbElements, Integer seqId) {
284
		PersonneAsyncDao pDao = new PersonneAsyncDao(vueARafraichir);
296
		PersonneAsyncDao pDao = new PersonneAsyncDao(vueARafraichir);
285
		pDao.selectionner(personneId, projetId, nomComplet, start, nbElements);
297
		pDao.selectionner(personneId, projetId, nomComplet, start, nbElements, seqId);
Line 286... Line 298...
286
	}
298
	}
287
 
299
 
288
	public void supprimerPersonne(Rafraichissable vueARafraichir, String idPersonneSepareParVirgule) {
300
	public void supprimerPersonne(Rafraichissable vueARafraichir, String idPersonneSepareParVirgule) {
Line 303... Line 315...
303
		
315
		
304
	//+----------------------------------------------------------------------------------------------------------------+
316
	//+----------------------------------------------------------------------------------------------------------------+
305
	//												GESTION DES PUBLICATIONS
317
	//												GESTION DES PUBLICATIONS
Line 306... Line 318...
306
	//+----------------------------------------------------------------------------------------------------------------+
318
	//+----------------------------------------------------------------------------------------------------------------+
307
	
319
	
308
	public void selectionnerPublication(Rafraichissable vueARafraichir, String publicationId, String projetId, String nomComplet, int nbElements, int pageCourante) {
320
	public void selectionnerPublication(Rafraichissable vueARafraichir, String publicationId, String projetId, String nomComplet, int nbElements, int pageCourante, Integer seqId) {
309
		PublicationAsyncDao lsDao = new PublicationAsyncDao(vueARafraichir);
321
		PublicationAsyncDao lsDao = new PublicationAsyncDao(vueARafraichir);
Line 310... Line 322...
310
		lsDao.selectionner(publicationId, projetId, nomComplet, nbElements, pageCourante);
322
		lsDao.selectionner(publicationId, projetId, nomComplet, nbElements, pageCourante, seqId);
311
	}
323
	}
312
	
324
	
313
	public void modifierPublication(Rafraichissable vueRafraichir, Publication publication) {
325
	public void modifierPublication(Rafraichissable vueRafraichir, Publication publication, Integer seqId) {
Line 314... Line 326...
314
		PublicationAsyncDao pDao = new PublicationAsyncDao(vueRafraichir);
326
		PublicationAsyncDao pDao = new PublicationAsyncDao(vueRafraichir);
315
		pDao.modifier(publication);
327
		pDao.modifier(publication, seqId);
316
	}
328
	}
317
 
329
 
Line 318... Line 330...
318
	public void ajouterPublication(Rafraichissable vueARafraichir, Publication publication) {
330
	public void ajouterPublication(Rafraichissable vueARafraichir, Publication publication, Integer seqId) {
319
		PublicationAsyncDao pDao = new PublicationAsyncDao(vueARafraichir);
331
		PublicationAsyncDao pDao = new PublicationAsyncDao(vueARafraichir);
320
		pDao.ajouter(publication);
332
		pDao.ajouter(publication, seqId);
321
	}
333
	}
Line 322... Line 334...
322
 
334
 
323
	public void supprimerPublication(Rafraichissable vueARafraichir, String idPublicationSeparesParVirgule) {		
335
	public void supprimerPublication(Rafraichissable vueARafraichir, String idPublicationSeparesParVirgule) {		
Line 324... Line 336...
324
		PublicationAsyncDao pDao = new PublicationAsyncDao(vueARafraichir);
336
		PublicationAsyncDao pDao = new PublicationAsyncDao(vueARafraichir);
325
		pDao.supprimer(idPublicationSeparesParVirgule);	
337
		pDao.supprimer(idPublicationSeparesParVirgule);	
326
	}
338
	}
327
 
339
 
Line 328... Line 340...
328
	//+----------------------------------------------------------------------------------------------------------------+
340
	//+----------------------------------------------------------------------------------------------------------------+
329
	// GESTION de la relation PUBLICATION A PERSONNE
341
	// GESTION de la relation PUBLICATION A PERSONNE
330
 
342
 
331
	public void selectionPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId) {
343
	public void selectionPublicationAPersonne(Rafraichissable vueARafraichir, String publicationId, String personnesId, String roleId, Integer seqId) {
Line 332... Line 344...
332
		PublicationAPersonneAsyncDao paDao = new PublicationAPersonneAsyncDao(vueARafraichir);
344
		PublicationAPersonneAsyncDao paDao = new PublicationAPersonneAsyncDao(vueARafraichir);
333
		paDao.selectionner(publicationId, personnesId, roleId);
345
		paDao.selectionner(publicationId, personnesId, roleId, seqId);
334
	}
346
	}