Subversion Repositories eFlore/Applications.del

Rev

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