public class TitleAndNameCacheAutoInitializer extends AutoPropertyInitializer<IdentifiableEntity<?>>
Title caches are constructed by a cascade of methods which are calling other
title cache methods. If a more general cache is protected we still need to
check if the more special caches are not protected and initialize those.
Otherwise unexpected LazyLoadingExceptions
may occur. Since this
cascade is different in the various name types we must check each of them
individually.
beanInitializer
Constructor and Description |
---|
TitleAndNameCacheAutoInitializer() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
hibernateFetchJoin(java.lang.Class<?> clazz,
java.lang.String beanAlias) |
void |
initialize(IdentifiableEntity<?> bean)
Implement this method to initialize associated entities of the supplied beans.
|
public void initialize(IdentifiableEntity<?> bean)
AutoPropertyInitializer
For initializing collections of cdm entity bean it is recommended to
use IBeanInitializer.initializeInstance(Object)
.
WARNING: You must NOT use IBeanInitializer.initialize(Object, java.util.List)
or IBeanInitializer#initializeAll(java.util.List, java.util.List)
otherwise you risk
to get StackOverflowExceptions.
initialize
in class AutoPropertyInitializer<IdentifiableEntity<?>>
bean
- the cdm entity bean to processpublic java.lang.String hibernateFetchJoin(java.lang.Class<?> clazz, java.lang.String beanAlias) throws java.lang.Exception
hibernateFetchJoin
in class AutoPropertyInitializer<IdentifiableEntity<?>>
java.lang.Exception
Copyright © 2007-2020 EDIT. All Rights Reserved.