Subversion Repositories eFlore/Applications.coel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1320 gduche 1
package org.tela_botanica.client.synchronisation;
2
 
3
import org.tela_botanica.client.interfaces.Rafraichissable;
4
import org.tela_botanica.client.synchronisation.Reponse;
5
 
6
public class Requete implements Rafraichissable{
7
 
8
	private Rafraichissable vueARafraichir;
9
	private Object retour;
10
	private int numeroSequence;
11
 
12
	public Requete(Rafraichissable vueARafraichir, int numeroSequence)	{
13
		this.vueARafraichir = vueARafraichir;
14
		this.numeroSequence = numeroSequence;
15
	}
16
 
17
	public Rafraichissable getVueARafraichir()	{
18
		return this.vueARafraichir;
19
	}
20
 
21
	public boolean aRetour()	{
22
		return (retour!=null);
23
	}
24
 
25
	public void setRetour(Reponse reponse)	{
26
		this.retour = reponse.obtenirRetour();
27
	}
28
 
29
	public Object obtenirRetour()	{
30
		return this.retour;
31
	}
32
 
33
	public int obtenirNumeroSequence()	{
34
		return numeroSequence;
35
	}
36
 
37
	public void rafraichir()	{
38
		rafraichir(null);
39
	}
40
 
41
	public void rafraichir(Object nouvellesDonnees) {
42
		vueARafraichir.rafraichir(retour);
43
	}
44
 
45
	public String toString()	{
46
		return vueARafraichir.getClass().getName() +"= " +numeroSequence;
47
	}
48
}