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.common.Annotation;
|
13
|
|
14
|
/**
|
15
|
* @author a.kohlbecker
|
16
|
* @date 30.07.2010
|
17
|
*
|
18
|
*/
|
19
|
public class AnnotationTypeAutoInitializer extends AutoPropertyInitializer<Annotation> {
|
20
|
|
21
|
|
22
|
/* (non-Javadoc)
|
23
|
* @see eu.etaxonomy.cdm.persistence.dao.BeanAutoInitializer#initialize(eu.etaxonomy.cdm.model.common.CdmBase)
|
24
|
*/
|
25
|
@Override
|
26
|
public void initialize(Annotation bean) {
|
27
|
beanInitializer.initializeInstance(bean.getAnnotationType());
|
28
|
}
|
29
|
|
30
|
@Override
|
31
|
public String hibernateFetchJoin(Class<?> clazz, String beanAlias) throws Exception{
|
32
|
return String.format(" LEFT JOIN FETCH %s.annotationType ", beanAlias);
|
33
|
}
|
34
|
|
35
|
}
|