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 eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
12
|
|
13
|
/**
|
14
|
* @author a.kohlbecker
|
15
|
\* @since 30.07.2010
|
16
|
*
|
17
|
*/
|
18
|
public class TaxonNodeAutoInitializer extends AutoPropertyInitializer<TaxonNode> {
|
19
|
|
20
|
@Override
|
21
|
public void initialize(TaxonNode bean) {
|
22
|
beanInitializer.initializeInstance(bean.getTaxon().getName());
|
23
|
beanInitializer.initializeInstance(bean.getTaxon().getSec());
|
24
|
}
|
25
|
|
26
|
@Override
|
27
|
public String hibernateFetchJoin(Class<?> clazz, String beanAlias) throws Exception{
|
28
|
|
29
|
String result = "";
|
30
|
result += String.format(" LEFT JOIN FETCH %s.taxon taxon LEFT JOIN FETCH taxon.name LEFT JOIN FETCH taxon.sec", beanAlias);
|
31
|
return result;
|
32
|
}
|
33
|
|
34
|
}
|