c26702fc15b3c9d8df1841145595f871681466ae
[cdm-vaadin.git] / src / main / java / eu / etaxonomy / cdm / service / BeanToDTOConverter.java
1 /**
2 * Copyright (C) 2020 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.service;
10
11 import com.vaadin.data.util.BeanItemContainer;
12
13 import eu.etaxonomy.cdm.model.common.CdmBase;
14
15 /**
16 * Interface for classes converting {@link CdmBase) beans into DTO classes.
17 * <p>
18 * This interface is meant to be used in the context of {@link BeanItemContainer}s,
19 *
20 * @author a.kohlbecker
21 * @since Sep 21, 2020
22 */
23 public interface BeanToDTOConverter<CDM extends CdmBase, DTO extends Object> {
24
25 public DTO toDTO(CDM bean);
26
27 /**
28 * @return
29 */
30 public Class<DTO> getDTOType();
31
32 }