Project

General

Profile

« Previous | Next » 

Revision fdeb8328

Added by Andreas Kohlbecker almost 4 years ago

remaming CdmEntityDecoratorDTO to CdmEntityAdapterDTO

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/model/CdmEntityAdapterDTO.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.vaadin.model;
10

  
11
import java.io.Serializable;
12
import java.util.UUID;
13

  
14
import org.joda.time.DateTime;
15

  
16
import eu.etaxonomy.cdm.model.common.CdmBase;
17
import eu.etaxonomy.cdm.model.common.User;
18

  
19
/**
20
 * @author a.kohlbecker
21
 * @since Apr 23, 2018
22
 *
23
 */
24
public class CdmEntityAdapterDTO<CDM extends CdmBase> implements Serializable {
25

  
26
    private static final long serialVersionUID = 1715911851453178727L;
27

  
28
    protected CDM entity;
29

  
30
    public CdmEntityAdapterDTO(CDM entity){
31
        this.entity = entity;
32
    }
33

  
34
    public CDM cdmEntity(){
35
        return entity;
36
    }
37

  
38
    public void setCreated(DateTime created) {
39
        entity.setCreated(created);
40
    }
41

  
42
    public void setCreatedBy(User createdBy) {
43
        entity.setCreatedBy(createdBy);
44
    }
45

  
46
    public DateTime getCreated() {
47
        return entity.getCreated();
48
    }
49

  
50
    public User getCreatedBy() {
51
        return entity.getCreatedBy();
52
    }
53

  
54
    public int getId() {
55
        return entity.getId();
56
    }
57

  
58
    public void setId(int id) {
59
        entity.setId(id);
60
    }
61

  
62
    public UUID getUuid() {
63
        return entity.getUuid();
64
    }
65

  
66
    public void setUuid(UUID uuid) {
67
        entity.setUuid(uuid);
68
    }
69

  
70
}
src/main/java/eu/etaxonomy/cdm/vaadin/model/CdmEntityDecoraterDTO.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.vaadin.model;
10

  
11
import java.io.Serializable;
12
import java.util.UUID;
13

  
14
import org.joda.time.DateTime;
15

  
16
import eu.etaxonomy.cdm.model.common.CdmBase;
17
import eu.etaxonomy.cdm.model.common.User;
18

  
19
/**
20
 * @author a.kohlbecker
21
 * @since Apr 23, 2018
22
 *
23
 */
24
public class CdmEntityDecoraterDTO<CDM extends CdmBase> implements Serializable {
25

  
26
    private static final long serialVersionUID = 1715911851453178727L;
27

  
28
    protected CDM entity;
29

  
30
    public CdmEntityDecoraterDTO(CDM entity){
31
        this.entity = entity;
32
    }
33

  
34
    public CDM cdmEntity(){
35
        return entity;
36
    }
37

  
38
    public void setCreated(DateTime created) {
39
        entity.setCreated(created);
40
    }
41

  
42
    public void setCreatedBy(User createdBy) {
43
        entity.setCreatedBy(createdBy);
44
    }
45

  
46
    public DateTime getCreated() {
47
        return entity.getCreated();
48
    }
49

  
50
    public User getCreatedBy() {
51
        return entity.getCreatedBy();
52
    }
53

  
54
    public int getId() {
55
        return entity.getId();
56
    }
57

  
58
    public void setId(int id) {
59
        entity.setId(id);
60
    }
61

  
62
    public UUID getUuid() {
63
        return entity.getUuid();
64
    }
65

  
66
    public void setUuid(UUID uuid) {
67
        entity.setUuid(uuid);
68
    }
69

  
70
}
src/main/java/eu/etaxonomy/cdm/vaadin/model/name/TaxonNameDTO.java
31 31
import eu.etaxonomy.cdm.model.name.Rank;
32 32
import eu.etaxonomy.cdm.model.name.TaxonName;
33 33
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
34
import eu.etaxonomy.cdm.vaadin.model.CdmEntityDecoraterDTO;
34
import eu.etaxonomy.cdm.vaadin.model.CdmEntityAdapterDTO;
35 35

  
36 36
/**
37 37
 * @author a.kohlbecker
38 38
 * @since Apr 23, 2018
39 39
 *
40 40
 */
41
public class TaxonNameDTO extends CdmEntityDecoraterDTO<TaxonName> {
41
public class TaxonNameDTO extends CdmEntityAdapterDTO<TaxonName> {
42 42

  
43 43
    private static final long serialVersionUID = -8018109905949198530L;
44 44

  
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractCdmDTOEditorPresenter.java
9 9
package eu.etaxonomy.vaadin.mvp;
10 10

  
11 11
import eu.etaxonomy.cdm.model.common.CdmBase;
12
import eu.etaxonomy.cdm.vaadin.model.CdmEntityDecoraterDTO;
12
import eu.etaxonomy.cdm.vaadin.model.CdmEntityAdapterDTO;
13 13

  
14 14
/**
15 15
 * Provides generic save operations of modified cdm entities.
......
18 18
 * @since Apr 5, 2017
19 19
 *
20 20
 */
21
public abstract class AbstractCdmDTOEditorPresenter<DTO extends CdmEntityDecoraterDTO<CDM>, CDM extends CdmBase, V extends ApplicationView<?>>
21
public abstract class AbstractCdmDTOEditorPresenter<DTO extends CdmEntityAdapterDTO<CDM>, CDM extends CdmBase, V extends ApplicationView<?>>
22 22
    extends CdmEditorPresenterBase<DTO, CDM, V> {
23 23

  
24 24
    private static final long serialVersionUID = -6315824180341694825L;
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractCdmDTOPopupEditor.java
14 14

  
15 15
import eu.etaxonomy.cdm.model.common.CdmBase;
16 16
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
17
import eu.etaxonomy.cdm.vaadin.model.CdmEntityDecoraterDTO;
17
import eu.etaxonomy.cdm.vaadin.model.CdmEntityAdapterDTO;
18 18
import eu.etaxonomy.cdm.vaadin.view.PerEntityAuthorityGrantingEditor;
19 19

  
20 20
/**
......
22 22
 * @since May 5, 2017
23 23
 *
24 24
 */
25
public abstract class AbstractCdmDTOPopupEditor<DTO extends CdmEntityDecoraterDTO<CDM>, CDM extends CdmBase, P extends CdmEditorPresenterBase<DTO, CDM, ? extends ApplicationView>>
25
public abstract class AbstractCdmDTOPopupEditor<DTO extends CdmEntityAdapterDTO<CDM>, CDM extends CdmBase, P extends CdmEditorPresenterBase<DTO, CDM, ? extends ApplicationView>>
26 26
    extends AbstractPopupEditor<DTO, P> implements PerEntityAuthorityGrantingEditor {
27 27

  
28 28
    /**

Also available in: Unified diff