Project

General

Profile

Revision 2937c7c8

ID2937c7c8c9a3e237d23cd8072ea998ab98f74b99
Parent bb006ee7
Child 4eb265cf

Added by Andreas Müller over 3 years ago

cleanup

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImpl.java
1254 1254
        return hql;
1255 1255
    }
1256 1256

  
1257

  
1258

  
1259

  
1260 1257
    @Override
1261 1258
    public TaxonBase find(LSID lsid) {
1262 1259
        TaxonBase<?> taxonBase = super.find(lsid);
......
1281 1278
        return taxonBase;
1282 1279
    }
1283 1280

  
1284

  
1285

  
1286 1281
    @Override
1287 1282
    public List<String> taxaByNameNotInDB(List<String> taxonNames){
1288 1283
        //get all taxa, already in db
......
1298 1293
            if (taxonNames.contains(nameCache)){
1299 1294
                taxonNames.remove(nameCache);
1300 1295
            }
1301

  
1302 1296
        }
1303 1297

  
1304 1298
        return taxonNames;
......
1377 1371
            }
1378 1372
        }
1379 1373

  
1380

  
1381 1374
        query = getSession().createQuery("from ZoologicalName zn where zn.nameCache IN (:identicalNames)");
1382 1375
        query.setParameterList("identicalNames", identicalNames);
1383 1376
        List<TaxonName> result = query.list();
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/config/IdentifiableServiceConfiguratorImpl.java
1 1
/**
2 2
 * Copyright (C) 2007 EDIT
3
 * European Distributed Institute of Taxonomy 
3
 * European Distributed Institute of Taxonomy
4 4
 * http://www.e-taxonomy.eu
5
 * 
5
 *
6 6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
 * See LICENSE.TXT at the top of this package for the full license terms.
8 8
 */
......
21 21
 * @author a.babadshanjan
22 22
 * @author n.hoffmann
23 23
 * @since 03.03.2009
24
 * @version 1.1
25 24
 */
26 25
public class IdentifiableServiceConfiguratorImpl<T extends IIdentifiableEntity> implements IIdentifiableEntityServiceConfigurator<T>{
27
	
28
	private String titleSearchString;
26

  
27
    private static final long serialVersionUID = -8126736101861741087L;
28

  
29
    private String titleSearchString;
29 30
	protected MatchMode matchMode;
30 31
	private Integer pageSize;
31 32
	private Integer pageNumber;
......
33 34
	private List<Criterion> criteria;
34 35
	private List<String> propertyPaths;
35 36
	private List<OrderHint> orderHints;
36
	
37

  
37 38
	@Override
38 39
	public Class<? extends T> getClazz() {
39 40
		return clazz;
......
43 44
	public void setClazz(Class<? extends T> clazz) {
44 45
		this.clazz = clazz;
45 46
	}
46
	
47
	public String getTitleSearchString() {
47

  
48
	@Override
49
    public String getTitleSearchString() {
48 50
		return titleSearchString;
49 51
	}
50 52
	
51 53
	public String getTitleSearchStringSqlized(){
52 54
		return getTitleSearchString().replace("*", "%");
53 55
	}
54
	
55
	public void setTitleSearchString(String titleSearchString) {
56

  
57
	@Override
58
    public void setTitleSearchString(String titleSearchString) {
56 59
		this.titleSearchString = titleSearchString;
57 60
	}
58
 
61

  
59 62
	/**
60 63
	 * @return the pageSize
61 64
	 */
62
	public Integer getPageSize() {
65
	@Override
66
    public Integer getPageSize() {
63 67
		return pageSize;
64 68
	}
65 69

  
66 70
	/**
67 71
	 * Sets the number of results that should be shown on current page
68
	 * 
72
	 *
69 73
	 * @param pageSize the pageSize to set
70 74
	 */
71
	public void setPageSize(Integer pageSize) {
75
	@Override
76
    public void setPageSize(Integer pageSize) {
72 77
		this.pageSize = pageSize;
73 78
	}
74 79

  
75 80
	/**
76 81
	 * @return the pageNumber
77 82
	 */
78
	public Integer getPageNumber() {
83
	@Override
84
    public Integer getPageNumber() {
79 85
		return pageNumber;
80 86
	}
81 87

  
82 88
	/**
83
	 * Sets the number of the page the first result should come from, starting 
89
	 * Sets the number of the page the first result should come from, starting
84 90
	 * with 0 as the first page.
85
	 * 
91
	 *
86 92
	 * @param pageNumber the pageNumber to set
87 93
	 */
88
	public void setPageNumber(Integer pageNumber) {
94
	@Override
95
    public void setPageNumber(Integer pageNumber) {
89 96
		this.pageNumber = pageNumber;
90 97
	}
91 98

  
92
	public MatchMode getMatchMode() {
99
	@Override
100
    public MatchMode getMatchMode() {
93 101
		return matchMode;
94 102
	}
95 103

  
96
	public void setMatchMode(MatchMode matchMode) {
104
	@Override
105
    public void setMatchMode(MatchMode matchMode) {
97 106
		this.matchMode = matchMode;
98 107
	}
99 108

  
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/OccurrenceServiceTest.java
46 46
import eu.etaxonomy.cdm.model.molecular.DnaSample;
47 47
import eu.etaxonomy.cdm.model.molecular.Sequence;
48 48
import eu.etaxonomy.cdm.model.name.IBotanicalName;
49
import eu.etaxonomy.cdm.model.name.Rank;
50 49
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
51 50
import eu.etaxonomy.cdm.model.name.TaxonName;
52 51
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
......
111 110
        return result;
112 111
    }
113 112

  
114
    private Taxon getTaxon() {
115
        Reference sec = getReference();
116
        TaxonName name = TaxonNameFactory.NewBotanicalInstance(Rank.GENUS());
117
        Taxon taxon = Taxon.NewInstance(name, sec);
118
        return taxon;
119

  
120
    }
121 113

  
122 114
    @Test
123 115
    @DataSet(loadStrategy = CleanSweepInsertLoadStrategy.class, value = "OccurenceServiceTest.move.xml")

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)