public class AdvancedBeanInitializer extends HibernateBeanInitializer
Modifier and Type | Field and Description |
---|---|
static Logger |
logger |
LOAD_2ONE_2MANY_WILDCARD, LOAD_2ONE_WILDCARD
Constructor and Description |
---|
AdvancedBeanInitializer() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(java.lang.Object bean,
java.util.List<java.lang.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. |
<C extends java.util.Collection<?>> |
initializeAll(C beanList,
java.util.List<java.lang.String> propertyPaths)
Initializes the entities given in the bean list according to the given
propertyPaths . |
initialize, initializeInstance
getBeanAutoInitializers, getProperties, initializeAllEntries, initializeBean, initializePropertyPath, invokeInitialization, invokePropertyAutoInitializers, load, loadFully, setBeanAutoInitializers, setProperty
public static final Logger logger
public void initialize(java.lang.Object bean, java.util.List<java.lang.String> propertyPaths)
IBeanInitializer
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.
name
: initializes TaxonBase.getName()
name.rank
: initializes TaxonBase.getName()
.getRank()
name.$
: initializes all *ToOne relations of the TaxonBase.getName()
initialize
in interface IBeanInitializer
initialize
in class AbstractBeanInitializer
propertyPaths
- a List of property namespublic <C extends java.util.Collection<?>> C initializeAll(C beanList, java.util.List<java.lang.String> propertyPaths)
IBeanInitializer
propertyPaths
.initializeAll
in interface IBeanInitializer
initializeAll
in class AbstractBeanInitializer
Copyright © 2007-2020 EDIT. All Rights Reserved.