public interface IBeanInitializer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOAD_2ONE_2MANY_WILDCARD
Wildcard for initializing all *ToOne and all *ToMany relations of a
bean . |
static java.lang.String |
LOAD_2ONE_WILDCARD
Wildcard for initializing all *ToOne relations of a
bean . |
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 list,
java.util.List<java.lang.String> propertyPaths)
Initializes the entities given in the bean list according to the given
propertyPaths . |
java.lang.Object |
initializeInstance(java.lang.Object proxy)
Initialize the the proxy, unwrap the target object and return it.
|
void |
load(java.lang.Object bean)
Initializes all *ToOne relations of the
bean . |
void |
loadFully(java.lang.Object bean)
Initializes all *ToOne and all *ToMany relations of the
bean . |
static final java.lang.String LOAD_2ONE_WILDCARD
bean
.static final java.lang.String LOAD_2ONE_2MANY_WILDCARD
bean
.void load(java.lang.Object bean)
bean
.bean
- void loadFully(java.lang.Object bean)
bean
.bean
- void initialize(java.lang.Object bean, java.util.List<java.lang.String> propertyPaths)
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()
bean
- propertyPaths
- a List of property names<C extends java.util.Collection<?>> C initializeAll(C list, java.util.List<java.lang.String> propertyPaths)
propertyPaths
.beanList
- propertyPaths
- java.lang.Object initializeInstance(java.lang.Object proxy)
proxy
- the proxy to initialize may wrap a single bean or a collectionCopyright © 2007-2020 EDIT. All Rights Reserved.