eu.etaxonomy.cdm.persistence.dao
Interface BeanInitializer

All Known Implementing Classes:
AbstractBeanInitializer, HibernateBeanInitializer

public interface BeanInitializer

Author:
a.kohlbecker

Field Summary
static String LOAD_2ONE_2MANY_WILDCARD
          Wildcard for initializing all *ToOne and all *ToMany relations of a bean.
static String LOAD_2ONE_WILDCARD
          Wildcard for initializing all *ToOne relations of a bean.
 
Method Summary
 void initialize(Object bean, List<String> propertyPaths)
          Allows more fine grained initialization not only of the root bean identified by its uuid but also of specific paths of the object graph.
<T> List<T>
initializeAll(List<T> list, List<String> propertyPaths)
           
 void load(Object bean)
          Initializes all *ToOne relations of the bean.
 void loadFully(Object bean)
          Initializes all *ToOne and all *ToMany relations of the bean.
 

Field Detail

LOAD_2ONE_WILDCARD

static final String LOAD_2ONE_WILDCARD
Wildcard for initializing all *ToOne relations of a bean.

See Also:
Constant Field Values

LOAD_2ONE_2MANY_WILDCARD

static final String LOAD_2ONE_2MANY_WILDCARD
Wildcard for initializing all *ToOne and all *ToMany relations of a bean.

See Also:
Constant Field Values
Method Detail

load

void load(Object bean)
Initializes all *ToOne relations of the bean.

Parameters:
bean -

loadFully

void loadFully(Object bean)
Initializes all *ToOne and all *ToMany relations of the bean.

Parameters:
bean -

initialize

void initialize(Object bean,
                List<String> propertyPaths)
Allows more fine grained initialization not only of the root bean identified by its uuid but also of specific paths of the object graph. The sub graph to initialize may be defined in the propertyPaths parameter as list of paths all starting at the root bean.

You can use wildcards * LOAD_2ONE_2MANY_WILDCARD and $ LOAD_2ONE_WILDCARD for initializing all *ToOne and all *ToMany relations of a bean. NOTE: A wildcard subsequently terminates its property path.

Example: Assuming cdmEntity is a Taxon instance the following propertyPaths can be used for initializing bean properties of this instance. It is possible to initialized nested properties of properties with unlimited depth.

Parameters:
bean -
propertyPaths - a List of property names

initializeAll

<T> List<T> initializeAll(List<T> list,
                          List<String> propertyPaths)


Copyright © 2007-2012 EDIT. All Rights Reserved.