Project

General

Profile

Revision 1cfc76cb

ID1cfc76cb43154174f219664578e3685f31684564
Parent 1c9d09b9
Child 7dab8082

Added by Patrick Plitzner over 3 years ago

ref #6484 Move enum AssignmentStatus to cdm-persistence

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/query/AssignmentStatus.java
1
/**
2
* Copyright (C) 2018 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.cdm.persistence.query;
10

  
11
import java.util.UUID;
12

  
13
/**
14
 * Enum to indicate if the retrieved specimens are associated to a taxon. Default is <code>ALL_SPECIMEN</code>.<br>
15
 * <br>
16
 * <b>Note:</b>This status is <b>ignored</b> if the configurator has either a name
17
 * or a taxon set via {@link #setAssociatedTaxonNameUuid(UUID)} or
18
 * {@link #setAssociatedTaxonUuid(UUID)}
19
 *
20
 * @author pplitzner
21
 */
22
public enum AssignmentStatus{
23
    ALL_SPECIMENS,
24
    ASSIGNED_SPECIMENS,
25
    UNASSIGNED_SPECIMENS
26
}
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/OccurrenceServiceImpl.java
46 46
import eu.etaxonomy.cdm.api.service.UpdateResult.Status;
47 47
import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
48 48
import eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator;
49
import eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator.AssignmentStatus;
50 49
import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
51 50
import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
52 51
import eu.etaxonomy.cdm.api.service.dto.DerivateDTO;
......
115 114
import eu.etaxonomy.cdm.persistence.dao.molecular.ISingleReadDao;
116 115
import eu.etaxonomy.cdm.persistence.dao.occurrence.IOccurrenceDao;
117 116
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
117
import eu.etaxonomy.cdm.persistence.query.AssignmentStatus;
118 118
import eu.etaxonomy.cdm.persistence.query.OrderHint;
119 119
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
120 120
import eu.etaxonomy.cdm.strategy.cache.common.IdentifiableEntityDefaultCacheStrategy;
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/config/FindOccurrencesConfigurator.java
12 12

  
13 13
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
14 14
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
15
import eu.etaxonomy.cdm.persistence.query.AssignmentStatus;
15 16

  
16 17
/**
17 18
 * @author pplitzner
......
27 28
    private UUID associatedTaxonNameUuid;
28 29
    private String significantIdentifier;
29 30
    private boolean retrieveIndirectlyAssociatedSpecimens;
30
    public static enum AssignmentStatus{
31
        ALL_SPECIMENS,
32
        ASSIGNED_SPECIMENS,
33
        UNASSIGNED_SPECIMENS
34
    }
35
    private AssignmentStatus assignmentStatus = AssignmentStatus.ALL_SPECIMENS;
36 31

  
37
    /**
38
     * Enum to indicate if the retrieved specimens are associated to a taxon. Default is <code>ALL_SPECIMEN</code>.<br>
39
     * <br>
40
     * <b>Note:</b>This status is <b>ignored</b> if the configurator has either a name
41
     * or a taxon set via {@link #setAssociatedTaxonNameUuid(UUID)} or
42
     * {@link #setAssociatedTaxonUuid(UUID)}
43
     *
44
     * @param associatedWithTaxon
45
     */
32
    private AssignmentStatus assignmentStatus = AssignmentStatus.ALL_SPECIMENS;
46 33

  
47 34
    public void setAssignmentStatus(AssignmentStatus assignmentStatus) {
48 35
        this.assignmentStatus = assignmentStatus;
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/OccurrenceServiceTest.java
26 26
import org.unitils.spring.annotation.SpringBeanByType;
27 27

  
28 28
import eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator;
29
import eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator.AssignmentStatus;
30 29
import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
31 30
import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
32 31
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
......
72 71
import eu.etaxonomy.cdm.model.taxon.SynonymType;
73 72
import eu.etaxonomy.cdm.model.taxon.Taxon;
74 73
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
74
import eu.etaxonomy.cdm.persistence.query.AssignmentStatus;
75 75
import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest;
76 76
import eu.etaxonomy.cdm.test.unitils.CleanSweepInsertLoadStrategy;
77 77

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)