Revision 804a5884
Added by Andreas Müller about 7 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java | ||
---|---|---|
31 | 31 |
* |
32 | 32 |
* @author n.hoffmann |
33 | 33 |
* @created Jun 16, 2010 |
34 |
* @version 1.0 |
|
35 | 34 |
*/ |
36 | 35 |
public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObservationBase> { |
37 | 36 |
|
... | ... | |
57 | 56 |
return instance; |
58 | 57 |
} |
59 | 58 |
|
60 |
/* (non-Javadoc) |
|
61 |
* @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#listEntities(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator) |
|
62 |
*/ |
|
63 | 59 |
/** {@inheritDoc} */ |
64 | 60 |
@Override |
65 | 61 |
protected List<SpecimenOrObservationBase> listEntities( |
... | ... | |
67 | 63 |
return CdmStore.getSearchManager().findOccurrences(configurator); |
68 | 64 |
} |
69 | 65 |
|
70 |
/* (non-Javadoc) |
|
71 |
* @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID) |
|
72 |
*/ |
|
73 | 66 |
/** {@inheritDoc} |
74 | 67 |
@Override |
75 | 68 |
protected SpecimenOrObservationBase loadEntity(UUID entityUuid) { |
... | ... | |
77 | 70 |
return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths); |
78 | 71 |
}*/ |
79 | 72 |
|
80 |
/* (non-Javadoc) |
|
81 |
* @see org.eclipse.ui.IEditorInput#getName() |
|
82 |
*/ |
|
83 | 73 |
/** |
84 | 74 |
* <p>getName</p> |
85 | 75 |
* |
... | ... | |
90 | 80 |
return BulkEditorInputType.OCCURRENCE.label; |
91 | 81 |
} |
92 | 82 |
|
93 |
/* (non-Javadoc) |
|
94 |
* @see org.eclipse.ui.IEditorInput#getToolTipText() |
|
95 |
*/ |
|
96 | 83 |
/** |
97 | 84 |
* <p>getToolTipText</p> |
98 | 85 |
* |
... | ... | |
103 | 90 |
return getName(); |
104 | 91 |
} |
105 | 92 |
|
106 |
/* (non-Javadoc) |
|
107 |
* @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object) |
|
108 |
*/ |
|
109 | 93 |
@Override |
110 | 94 |
public String getTypeText(Object entity) { |
111 | 95 |
if(HibernateProxyHelper.isInstanceOf(entity, SpecimenOrObservationBase.class)){ |
... | ... | |
123 | 107 |
return ID; |
124 | 108 |
} |
125 | 109 |
|
126 |
/* (non-Javadoc) |
|
127 |
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object) |
|
128 |
*/ |
|
129 | 110 |
/** {@inheritDoc} |
130 | 111 |
* @throws ReferencedObjectUndeletableException */ |
131 | 112 |
@Override |
... | ... | |
133 | 114 |
return CdmStore.getService(IOccurrenceService.class).delete(entity) != null; |
134 | 115 |
} |
135 | 116 |
|
136 |
/* (non-Javadoc) |
|
137 |
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object) |
|
138 |
*/ |
|
139 | 117 |
/** {@inheritDoc} */ |
140 | 118 |
@Override |
141 |
public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
|
|
119 |
public SpecimenOrObservationBase<?> save(SpecimenOrObservationBase entity) {
|
|
142 | 120 |
return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity(); |
143 | 121 |
|
144 | 122 |
} |
145 | 123 |
|
146 |
|
|
147 |
/* (non-Javadoc) |
|
148 |
* @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator() |
|
149 |
*/ |
|
150 | 124 |
@Override |
151 | 125 |
protected IEntityCreator<SpecimenOrObservationBase> createEntityCreator() { |
152 | 126 |
return new OccurrenceCreator(); |
153 | 127 |
} |
154 | 128 |
|
155 |
/* (non-Javadoc) |
|
156 |
* @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders() |
|
157 |
*/ |
|
158 | 129 |
@Override |
159 | 130 |
public List<IBulkEditorSortProvider<SpecimenOrObservationBase>> getSortProviders() { |
160 | 131 |
List<IBulkEditorSortProvider<SpecimenOrObservationBase>> sortProviders = super.getSortProviders(); |
... | ... | |
164 | 135 |
return sortProviders; |
165 | 136 |
} |
166 | 137 |
|
167 |
/* (non-Javadoc) |
|
168 |
* @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge() |
|
169 |
*/ |
|
170 | 138 |
@Override |
171 | 139 |
public void merge() { |
172 | 140 |
|
... | ... | |
177 | 145 |
List<String> propertyPaths = Arrays.asList(new String[]{}); |
178 | 146 |
return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths); |
179 | 147 |
} |
180 |
|
|
181 | 148 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/CreateSpecimenDescriptionOperation.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.taxeditor.editor.view.descriptive.operation; |
10 | 10 |
|
11 | 11 |
import org.eclipse.core.commands.operations.IUndoContext; |
12 |
import org.eclipse.swt.internal.ole.win32.ISpecifyPropertyPages; |
|
12 | 13 |
|
13 | 14 |
import eu.etaxonomy.cdm.model.description.DescriptionBase; |
14 | 15 |
import eu.etaxonomy.cdm.model.description.SpecimenDescription; |
15 | 16 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
17 |
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy; |
|
16 | 18 |
import eu.etaxonomy.taxeditor.operation.AbstractDescriptionPostOperation; |
17 | 19 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
18 | 20 |
|
... | ... | |
21 | 23 |
* @date 04.12.2013 |
22 | 24 |
* |
23 | 25 |
*/ |
24 |
public class CreateSpecimenDescriptionOperation extends AbstractDescriptionPostOperation<SpecimenOrObservationBase, DescriptionBase<?>> {
|
|
26 |
public class CreateSpecimenDescriptionOperation extends AbstractDescriptionPostOperation<SpecimenOrObservationBase, DescriptionBase> { |
|
25 | 27 |
|
26 | 28 |
/** |
27 | 29 |
* @param label |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateTaxonUseOperation.java | ||
---|---|---|
26 | 26 |
* CreateTaxonUseOperation Class |
27 | 27 |
* @author a.theys |
28 | 28 |
* @created mar 13, 2012 |
29 |
* @version 1.0 |
|
30 | 29 |
*/ |
31 | 30 |
public class CreateTaxonUseOperation extends CreateTaxonDescriptionOperation { |
32 | 31 |
private TaxonDescription description; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractDescriptionPostOperation.java | ||
---|---|---|
48 | 48 |
this.isImageGallery = isImageGallery; |
49 | 49 |
} |
50 | 50 |
|
51 |
/* (non-Javadoc) |
|
52 |
* @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable) |
|
53 |
*/ |
|
54 | 51 |
/** {@inheritDoc} */ |
55 | 52 |
@Override |
56 | 53 |
public IStatus execute(IProgressMonitor monitor, IAdaptable info) |
Also available in: Unified diff
fix generics