Project

General

Profile

Download (1.35 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.newWizard;
10

    
11
import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;
12
import eu.etaxonomy.cdm.model.molecular.Primer;
13
import eu.etaxonomy.taxeditor.store.CdmStore;
14

    
15
/**
16
 * @author pplitzner
17
 * @date 11.03.2014
18
 *
19
 */
20
public class NewPrimerWizard  extends AbstractNewEntityWizard<Primer> {
21

    
22
    private PrimerWizardPage primerPage;
23

    
24
    /** {@inheritDoc} */
25
    @Override
26
    public void addPages() {
27
        primerPage = new PrimerWizardPage(formFactory, getConversationHolder(), getEntity());
28
        addPage(primerPage);
29
    }
30

    
31
    /** {@inheritDoc} */
32
    @Override
33
    protected Primer createNewEntity() {
34
        return Primer.NewInstance("");
35
    }
36

    
37
    /** {@inheritDoc} */
38
    @Override
39
    protected void saveEntity() {
40
       CdmStore.getService(IPrimerService.class).merge(getEntity(),true);
41
       
42
    }
43

    
44
    /** {@inheritDoc} */
45
    @Override
46
    public void setEntity(Primer entity) {
47
        super.setEntity(entity);
48
        primerPage.getDetailElement().setEntity(entity);
49
    }
50

    
51
    @Override
52
    protected String getEntityName() {
53
        return "Primer";
54
    }
55
}
(16-16/23)