Revision e09f9c40
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java | ||
---|---|---|
60 | 60 |
import org.jboss.logging.Logger; |
61 | 61 |
|
62 | 62 |
import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration; |
63 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
63 | 64 |
import eu.etaxonomy.taxeditor.remoting.CdmEagerLoadingException; |
64 | 65 |
import eu.etaxonomy.taxeditor.remoting.cache.ProxyUtils; |
65 | 66 |
import eu.etaxonomy.taxeditor.service.ICachedCommonService; |
... | ... | |
1297 | 1298 |
String fieldName = role.substring(role.lastIndexOf(".") + 1); |
1298 | 1299 |
log.info("--> Remote Lazy Initializing Collection " + getRole() + " , key : " + getKey() + " , field : " + fieldName); |
1299 | 1300 |
Object owner = getOwner(); |
1300 |
|
|
1301 |
CdmBase cdmBase; |
|
1302 |
if(owner instanceof CdmBase) { |
|
1303 |
cdmBase = (CdmBase)owner; |
|
1304 |
} else { |
|
1305 |
throw new HibernateException("Owner of persistent collection is not a cdm entity"); |
|
1306 |
} |
|
1301 | 1307 |
if(configuration == null) { |
1302 | 1308 |
throw new HibernateException("CdmApplicationRemoteConfiguration not initialized (null)"); |
1303 | 1309 |
} |
... | ... | |
1306 | 1312 |
throw new HibernateException("commonService not initialized (null)"); |
1307 | 1313 |
} |
1308 | 1314 |
|
1309 |
Object obj = ProxyUtils.deproxy(cachedCommonService.initializeCollection(this)); |
|
1315 |
//Object obj = ProxyUtils.deproxy(cachedCommonService.initializeCollection(this)); |
|
1316 |
Object obj = ProxyUtils.deproxy(cachedCommonService.initializeCollection(cdmBase.getUuid(), fieldName)); |
|
1310 | 1317 |
afterInitialize(); |
1311 | 1318 |
|
1312 | 1319 |
Class<?> clazz = getClass(); |
Also available in: Unified diff
#5031 Update remoting code to be compatible with new common service collection calls