Project

General

Profile

Download (1.01 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 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.dao.initializer;
10

    
11
import java.util.Optional;
12

    
13
import eu.etaxonomy.cdm.model.common.Marker;
14

    
15
/**
16
 * @author a.kohlbecker
17
 * @since 30.07.2010
18
 *
19
 */
20
public class MarkerTypeAutoInitializer extends AutoPropertyInitializer<Marker> {
21

    
22

    
23
    /* (non-Javadoc)
24
     * @see eu.etaxonomy.cdm.persistence.dao.BeanAutoInitializer#initialize(eu.etaxonomy.cdm.model.common.CdmBase)
25
     */
26
    @Override
27
    public void initialize(Marker bean) {
28
        beanInitializer.initializeInstance(bean.getMarkerType());
29
    }
30

    
31
    @Override
32
    public Optional<String> hibernateFetchJoin(Class<?> clazz, String beanAlias){
33
    	return Optional.of(String.format(" LEFT JOIN FETCH %s.markerType ", beanAlias));
34
    }
35

    
36
}
(9-9/15)