OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 17 | Rev 61 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 25
Line 30... Line 30...
30
import java.util.logging.Logger;
30
import java.util.logging.Logger;
31
 
31
 
32
import javax.swing.JFrame;
32
import javax.swing.JFrame;
33
import javax.swing.UIManager;
33
import javax.swing.UIManager;
34
 
34
 
35
 
-
 
36
public class Ville {
35
public class Ville {
37
 
36
 
38
    private static Map<String, Ville> map = new HashMap<String, Ville>();
37
    private static Map<String, Ville> map = new HashMap<String, Ville>();
39
    private static DatabaseAccessor accessor;
38
    private static DatabaseAccessor accessor;
40
    private final static ArrayList<Ville> villes = new ArrayList<Ville>(39000);
39
    private final static ArrayList<Ville> villes = new ArrayList<Ville>(39000);
Line 128... Line 127...
128
        addVilleSilently(v);
127
        addVilleSilently(v);
129
        accessor.store(v);
128
        accessor.store(v);
130
        // FIXME: fire missing
129
        // FIXME: fire missing
131
    }
130
    }
132
 
131
 
-
 
132
    public static synchronized void removeVille(final Ville v) {
-
 
133
        villes.remove(v);
-
 
134
        final String villeEtCode = v.getVilleEtCode();
-
 
135
        villesNames.remove(villeEtCode);
-
 
136
        map.remove(villeEtCode);
-
 
137
 
-
 
138
        accessor.delete(v);
-
 
139
        // FIXME: fire missing
-
 
140
    }
-
 
141
 
133
    // ** getter
142
    // ** getter
134
 
143
 
135
    private static final synchronized void await() {
144
    private static final synchronized void await() {
136
        if (init != null) {
145
        if (init != null) {
137
            try {
146
            try {