Project

General

Profile

Download (1.33 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 org.springframework.beans.factory.annotation.Autowired;
12

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

    
15
/**
16
 * @author a.kohlbecker
17
 * @date 30.07.2010
18
 *
19
 */
20
public abstract class AutoPropertyInitializer<T extends CdmBase> {
21

    
22
    @Autowired
23
    protected IBeanInitializer beanInitializer;
24

    
25

    
26
    /**
27
     * Implement this method to initialize associated entities of the supplied beans.
28
     * <p>
29
     * For initializing collections of cdm entity bean it is recommended to
30
     * use {@link IBeanInitializer#initializeInstance(Object)}.<br>
31
     * <b>WARNING</b>: You must NOT use {@link IBeanInitializer#initialize(Object, java.util.List)}
32
     * or {@link IBeanInitializer#initializeAll(java.util.List, java.util.List)} otherwise you risk
33
     * to get StackOverflowExceptions.
34
     *
35
     * @param bean the cdm entity bean to process
36
     */
37
    public abstract void initialize(T bean);
38

    
39

    
40
	public abstract String hibernateFetchJoin(Class<?> clazz, String beanAlias) throws Exception;
41

    
42

    
43
}
(4-4/13)