Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 benjamin 1
package org.tela_botanica.del.client.cache;
2
 
3
import org.tela_botanica.del.client.modeles.Observation;
4
 
14 benjamin 5
public class CacheClient {
9 benjamin 6
 
7
	private Observation currentObservation;
8
 
14 benjamin 9
	private static CacheClient instance;
9 benjamin 10
 
14 benjamin 11
	private CacheClient() {
9 benjamin 12
		instance = this;
13
	}
14
 
14 benjamin 15
	public Observation getCurrentObservation() {
9 benjamin 16
		return currentObservation;
17
	}
18
 
14 benjamin 19
	public void setCurrentObservation(Observation currentObservation) {
9 benjamin 20
		this.currentObservation = currentObservation;
21
	}
22
 
14 benjamin 23
	public static CacheClient getInstance() {
9 benjamin 24
		if (instance == null) {
14 benjamin 25
			instance = new CacheClient();
9 benjamin 26
		}
27
		return instance;
28
	}
29
 
30
}