Subversion Repositories eFlore/Applications.del

Rev

Rev 361 | Rev 467 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 361 Rev 445
1
package org.tela_botanica.del.client.cache;
1
package org.tela_botanica.del.client.cache;
2
 
2
 
3
import org.tela_botanica.del.client.modeles.Image;
3
import org.tela_botanica.del.client.modeles.Image;
4
import org.tela_botanica.del.client.modeles.InformationsRecherche;
4
import org.tela_botanica.del.client.modeles.InformationsRecherche;
5
import org.tela_botanica.del.client.modeles.Observation;
5
import org.tela_botanica.del.client.modeles.Observation;
6
import org.tela_botanica.del.client.modeles.Protocole;
6
import org.tela_botanica.del.client.modeles.Protocole;
7
 
7
 
8
public class CacheClient {
8
public class CacheClient {
9
 
9
 
10
	private Observation observationCourante;
10
	private Observation observationCourante;
11
	private Image imageCourante;
11
	private Image imageCourante;
12
	private String taxonPourRechercheEflore;
12
	private String taxonPourRechercheEflore;
13
	private Protocole protocoleCourant;
13
	private Protocole protocoleCourant;
14
	private int numPageRechercheImage = 0;
14
	private int numPageRechercheImage = 0;
15
	private int nbTotalImagesRecherchees = 0;
15
	private int nbTotalImagesRecherchees = 0;
16
 
16
 
17
	private int pasPagination = 10;
17
	private int pasPagination = 10;
18
	private int pageCouranteRechercheImage = 0;
18
	private int pageCouranteRechercheImage = 1;
19
	private int pageCouranteRechercheObservations = 0;
19
	private int pageCouranteRechercheObservations = 1;
20
	private InformationsRecherche informationsRechercheImage;
20
	private InformationsRecherche informationsRechercheImage;
21
	private InformationsRecherche informationsRechercheObservation;
21
	private InformationsRecherche informationsRechercheObservation;
22
 
22
 
23
	private static CacheClient instance;
23
	private static CacheClient instance;
24
 
24
 
25
	private CacheClient() {
25
	private CacheClient() {
26
		instance = this;
26
		instance = this;
27
	}
27
	}
28
 
28
 
29
	public Observation getObservationCourante() {
29
	public Observation getObservationCourante() {
30
		return observationCourante;
30
		return observationCourante;
31
	}
31
	}
32
 
32
 
33
	public void setObservationCourante(Observation observationCourante) {
33
	public void setObservationCourante(Observation observationCourante) {
34
		this.observationCourante = observationCourante;
34
		this.observationCourante = observationCourante;
35
	}
35
	}
36
 
36
 
37
	public static CacheClient getInstance() {
37
	public static CacheClient getInstance() {
38
		if (instance == null) {
38
		if (instance == null) {
39
			instance = new CacheClient();
39
			instance = new CacheClient();
40
		}
40
		}
41
		return instance;
41
		return instance;
42
	}
42
	}
43
 
43
 
44
	public String getTaxonPourRechercheEflore() {
44
	public String getTaxonPourRechercheEflore() {
45
		return taxonPourRechercheEflore;
45
		return taxonPourRechercheEflore;
46
	}
46
	}
47
 
47
 
48
	public void setTaxonPourRechercheEflore(String taxonPourRechercheEflore) {
48
	public void setTaxonPourRechercheEflore(String taxonPourRechercheEflore) {
49
		this.taxonPourRechercheEflore = taxonPourRechercheEflore;
49
		this.taxonPourRechercheEflore = taxonPourRechercheEflore;
50
	}
50
	}
51
 
51
 
52
	public int getNumPageRechercheImage() {
52
	public int getNumPageRechercheImage() {
53
		return numPageRechercheImage;
53
		return numPageRechercheImage;
54
	}
54
	}
55
 
55
 
56
	// Pour la recherche :
56
	// Pour la recherche :
57
	public int getPasPagination() {
57
	public int getPasPagination() {
58
		return pasPagination;
58
		return pasPagination;
59
	}
59
	}
60
 
60
 
61
	public void setPasPagination(int pasPagination) {
61
	public void setPasPagination(int pasPagination) {
62
		this.pasPagination = pasPagination;
62
		this.pasPagination = pasPagination;
63
	}
63
	}
64
 
64
 
65
	public void setPageCouranteRechercheImages(int pageCouranteRecherche) {
65
	public void setPageCouranteRechercheImages(int pageCouranteRecherche) {
66
		this.pageCouranteRechercheImage = pageCouranteRecherche;
66
		this.pageCouranteRechercheImage = pageCouranteRecherche;
67
	}
67
	}
68
 
68
 
69
	public int getPageCouranteRechercheImage() {
69
	public int getPageCouranteRechercheImage() {
70
		return this.pageCouranteRechercheImage;
70
		return this.pageCouranteRechercheImage;
71
	}
71
	}
72
 
72
 
73
	public void setNbTotalImagesRecherchees(int nbTotalImagesRecherchees) {
73
	public void setNbTotalImagesRecherchees(int nbTotalImagesRecherchees) {
74
		this.nbTotalImagesRecherchees = nbTotalImagesRecherchees;
74
		this.nbTotalImagesRecherchees = nbTotalImagesRecherchees;
75
	}
75
	}
76
 
76
 
77
	public int getNbTotalImagesRecherchees() {
77
	public int getNbTotalImagesRecherchees() {
78
		return this.nbTotalImagesRecherchees;
78
		return this.nbTotalImagesRecherchees;
79
	}
79
	}
80
 
80
 
81
	public Image getImageCourante() {
81
	public Image getImageCourante() {
82
		return imageCourante;
82
		return imageCourante;
83
	}
83
	}
84
 
84
 
85
	public void setImageCourante(Image imageCourante) {
85
	public void setImageCourante(Image imageCourante) {
86
		this.imageCourante = imageCourante;
86
		this.imageCourante = imageCourante;
87
	}
87
	}
88
 
88
 
89
	public Protocole getProtocoleCourant() {
89
	public Protocole getProtocoleCourant() {
90
		return protocoleCourant;
90
		return protocoleCourant;
91
	}
91
	}
92
 
92
 
93
	public void setProtocoleCourant(Protocole protocoleCourant) {
93
	public void setProtocoleCourant(Protocole protocoleCourant) {
94
		this.protocoleCourant = protocoleCourant;
94
		this.protocoleCourant = protocoleCourant;
95
	}
95
	}
96
 
96
 
97
	public InformationsRecherche getInformationsRechercheImage() {
97
	public InformationsRecherche getInformationsRechercheImage() {
98
		return informationsRechercheImage;
98
		return informationsRechercheImage;
99
	}
99
	}
100
 
100
 
101
	public InformationsRecherche getInformationsRechercheObservation() {
101
	public InformationsRecherche getInformationsRechercheObservation() {
102
		return informationsRechercheObservation;
102
		return informationsRechercheObservation;
103
	}
103
	}
104
 
104
 
105
	public void setInformationsRechercheImage(InformationsRecherche informationsRechercheImage) {
105
	public void setInformationsRechercheImage(InformationsRecherche informationsRechercheImage) {
106
		this.informationsRechercheImage = informationsRechercheImage;
106
		this.informationsRechercheImage = informationsRechercheImage;
107
	}
107
	}
108
 
108
 
109
	public void setInformationsRechercheObservation(InformationsRecherche informationsRechercheObservation) {
109
	public void setInformationsRechercheObservation(InformationsRecherche informationsRechercheObservation) {
110
		this.informationsRechercheObservation = informationsRechercheObservation;
110
		this.informationsRechercheObservation = informationsRechercheObservation;
111
	}
111
	}
112
 
112
 
113
	public int getPageCouranteRechercheObservations() {
113
	public int getPageCouranteRechercheObservations() {
114
		return pageCouranteRechercheObservations;
114
		return pageCouranteRechercheObservations;
115
	}
115
	}
116
 
116
 
117
	public void setPageCouranteRechercheObservations(int pageCouranteRechercheObservations) {
117
	public void setPageCouranteRechercheObservations(int pageCouranteRechercheObservations) {
118
		this.pageCouranteRechercheObservations = pageCouranteRechercheObservations;
118
		this.pageCouranteRechercheObservations = pageCouranteRechercheObservations;
119
	}
119
	}
120
 
120
 
121
}
121
}