Subversion Repositories eFlore/Applications.del

Rev

Rev 445 | Rev 537 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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