Revision 90046bc4
Added by Andreas Müller almost 8 years ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/DatabaseInitialiser.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 |
*/ |
9 |
|
|
9 |
|
|
10 | 10 |
package eu.etaxonomy.cdm.model; |
11 | 11 |
|
12 | 12 |
import org.apache.log4j.Logger; |
... | ... | |
40 | 40 |
logger.info("Populate database with a taxon"); |
41 | 41 |
IJournal sec = ReferenceFactory.newJournal(); |
42 | 42 |
NonViralName<?> nvName = BotanicalName.NewInstance(Rank.SPECIES()); |
43 |
Taxon tax = Taxon.NewInstance(nvName, (Reference<?>)sec);
|
|
43 |
Taxon tax = Taxon.NewInstance(nvName, (Reference)sec); |
|
44 | 44 |
//BotanicalName ve = nm.getNextVersion(); |
45 | 45 |
nvName.setNameCache(speciesname); |
46 | 46 |
nvName.setTitleCache(speciesname, true); |
... | ... | |
53 | 53 |
Transaction tx = s.beginTransaction(); |
54 | 54 |
s.saveOrUpdate(obj); |
55 | 55 |
tx.commit(); |
56 |
s.close();
|
|
56 |
s.close(); |
|
57 | 57 |
} |
58 | 58 |
|
59 | 59 |
public static void main(String[] args) { |
Also available in: Unified diff
Remove generics from Reference in cdmlib-model #5830