Revision de3db973
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
31 | 31 |
|
32 | 32 |
/** |
33 |
* <p>OccurrenceEditorInput class.</p> |
|
34 |
* |
|
35 | 33 |
* @author n.hoffmann |
36 | 34 |
* @created Jun 16, 2010 |
37 | 35 |
*/ |
38 | 36 |
public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObservationBase> { |
39 | 37 |
|
40 |
/** |
|
41 |
* |
|
42 |
*/ |
|
43 | 38 |
private static final long serialVersionUID = 1014860873939989973L; |
44 | 39 |
|
45 |
/** Constant <code>ID="bulkeditor.input.occurrence"</code> */ |
|
46 | 40 |
public static final String ID = "bulkeditor.input.occurrence"; //$NON-NLS-1$ |
47 | 41 |
|
48 | 42 |
private static OccurrenceEditorInput instance; |
49 | 43 |
|
50 |
/** |
|
51 |
* <p>Getter for the field <code>instance</code>.</p> |
|
52 |
* |
|
53 |
* @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object. |
|
54 |
*/ |
|
55 | 44 |
public static AbstractBulkEditorInput<SpecimenOrObservationBase> getInstance() { |
56 | 45 |
if (instance == null) { |
57 | 46 |
instance = new OccurrenceEditorInput(); |
... | ... | |
70 | 59 |
return CdmStore.getService(IOccurrenceService.class).countByTitle(configurator); |
71 | 60 |
} |
72 | 61 |
|
73 |
/** {@inheritDoc} */ |
|
74 | 62 |
@Override |
75 | 63 |
protected List<SpecimenOrObservationBase> listEntities( |
76 | 64 |
IIdentifiableEntityServiceConfigurator configurator) { |
77 | 65 |
return CdmStore.getSearchManager().findOccurrences(configurator, false); |
78 | 66 |
} |
79 | 67 |
|
80 |
/** {@inheritDoc} |
|
81 |
@Override |
|
82 |
protected SpecimenOrObservationBase loadEntity(UUID entityUuid) { |
|
83 |
List<String> propertyPaths = Arrays.asList(new String[]{}); |
|
84 |
return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths); |
|
85 |
}*/ |
|
86 |
|
|
87 | 68 |
@Override |
88 | 69 |
public String getName() { |
89 | 70 |
return BulkEditorInputType.OCCURRENCE.label; |
... | ... | |
102 | 83 |
return super.getTypeText(entity); |
103 | 84 |
} |
104 | 85 |
|
105 |
/** |
|
106 |
* <p>getId</p> |
|
107 |
* |
|
108 |
* @return a {@link java.lang.Object} object. |
|
109 |
*/ |
|
110 | 86 |
public static Object getId(){ |
111 | 87 |
return ID; |
112 | 88 |
} |
113 | 89 |
|
114 |
/** {@inheritDoc} |
|
115 |
* @throws ReferencedObjectUndeletableException */ |
|
116 | 90 |
@Override |
117 | 91 |
public boolean delete(SpecimenOrObservationBase entity, DeleteConfiguratorBase config ) throws ReferencedObjectUndeletableException { |
118 | 92 |
DeleteResult deleteResult; |
... | ... | |
127 | 101 |
return deleteResult.isOk(); |
128 | 102 |
} |
129 | 103 |
|
130 |
/** {@inheritDoc} */ |
|
131 | 104 |
@Override |
132 | 105 |
public SpecimenOrObservationBase<?> save(SpecimenOrObservationBase entity) { |
133 | 106 |
return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity(); |
Also available in: Unified diff
ref #7502 code cleaning