Project

General

Profile

« Previous | Next » 

Revision 35505

refactoring for mavenization

View differences:

Repositories.java
13 13
import gr.uoa.di.web.utils.search.CriteriaManager.Target;
14 14
import gr.uoa.di.web.utils.search.criterion.FieldCriterion;
15 15
import gr.uoa.di.web.utils.search.criterion.FieldCriterion.Qualifier;
16

  
17
import java.util.ArrayList;
18
import java.util.Comparator;
19
import java.util.List;
20
import java.util.Locale;
21
import java.util.Map;
22

  
23
import javax.servlet.ServletContext;
24

  
25 16
import org.apache.log4j.Logger;
26 17
import org.apache.struts2.interceptor.ParameterAware;
27 18
import org.apache.struts2.interceptor.RequestAware;
28 19
import org.apache.struts2.util.ServletContextAware;
29 20

  
21
import javax.servlet.ServletContext;
22
import java.util.*;
23

  
30 24
@SuppressWarnings("serial")
31 25
public class Repositories extends ParameterActionSupport implements RequestAware,
32 26
		ParameterAware, ServletContextAware {
......
75 69
			for (Repository rep : getRepositoryLookUp().fetch(
76 70
					criteria)) {
77 71

  
78
				String country = rep.getCountry();
72
				String country = rep.getCountryName();
79 73
				Repository newRep = new Repository();
80 74

  
81 75
				if (country != null && !country.trim().isEmpty()) {
82
					newRep.setCountry(countriesVocabulary
83
							.getEnglishName(country));
76
					newRep.setCountryName(rep.getCountryName());
84 77
				}
85 78

  
86 79
				newRep.setEnglishName(rep.getEnglishName());
......
130 123
		}
131 124

  
132 125
		if (repository != null) {
133
			if (repository.getCountry() != null
134
					&& !repository.getCountry().isEmpty())
135
				request.put("repCountry", getCountriesVocabulary().getEnglishName(
136
						repository.getCountry()));
126
			if (repository.getCountryName() != null
127
					&& !repository.getCountryName().isEmpty())
128
				request.put("repCountry", repository.getCountryName());
137 129
			else
138 130
				request.put("repCountry", "-");
139 131
		}
......
290 282
	
291 283
	@Override
292 284
	public int compare(Repository r1, Repository r2) {
293
		String country1 = r1.getCountry();
294
		String country2 = r2.getCountry();
285
		String country1 = r1.getCountryName();
286
		String country2 = r2.getCountryName();
295 287
		
296 288
		if(country1 == null) {
297 289
			country1 = "";

Also available in: Unified diff