1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.persistence.dao.initializer;
|
11
|
|
12
|
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
13
|
|
14
|
/**
|
15
|
* @author a.kohlbecker
|
16
|
* @date 30.07.2010
|
17
|
*
|
18
|
*/
|
19
|
public class TaxonNodeAutoInitializer extends AutoPropertyInitializer<TaxonNode> {
|
20
|
|
21
|
@Override
|
22
|
public void initialize(TaxonNode bean) {
|
23
|
beanInitializer.initializeInstance(bean.getTaxon().getName());
|
24
|
beanInitializer.initializeInstance(bean.getTaxon().getSec());
|
25
|
}
|
26
|
|
27
|
@Override
|
28
|
public String hibernateFetchJoin(Class<?> clazz, String beanAlias) throws Exception{
|
29
|
|
30
|
String result = "";
|
31
|
result += String.format(" LEFT JOIN FETCH %s.taxon taxon LEFT JOIN FETCH taxon.name LEFT JOIN FETCH taxon.sec", beanAlias);
|
32
|
return result;
|
33
|
}
|
34
|
|
35
|
}
|