#5225 Replace saveOrUpdate with merge for new entity wizards
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / newWizard / NewFieldUnitWizard.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.newWizard;
12
13 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
14 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
15 import eu.etaxonomy.taxeditor.store.CdmStore;
16
17 /**
18 * <p>NewFieldUnitWizard class.</p>
19 *
20 * @author n.hoffmann
21 * @created Jun 17, 2010
22 * @version 1.0
23 */
24 public class NewFieldUnitWizard extends AbstractNewEntityWizard<FieldUnit> {
25
26 /* (non-Javadoc)
27 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#createNewEntity()
28 */
29 /** {@inheritDoc} */
30 @Override
31 protected FieldUnit createNewEntity() {
32 return null;
33 }
34
35 /* (non-Javadoc)
36 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
37 */
38 /** {@inheritDoc} */
39 @Override
40 protected void saveEntity() {
41 CdmStore.getService(IOccurrenceService.class).merge(getEntity());
42 }
43
44 @Override
45 protected String getEntityName() {
46 return "Field Unit";
47 }
48 }