/** * PUBLIC: * Set the class of identity map to be the no identity map. * This map does no caching. * Note: This map does not maintain object identity. * In general if caching is not desired a WeakIdentityMap should be used with an isolated descriptor. * The default is the "SoftCacheWeakIdentityMap". * @see #setIsIsolated(boolean) */ public void useNoIdentityMap() { getCachePolicy().useNoIdentityMap(); }
/** * PUBLIC: * Set the class of identity map to be the no identity map. * This map does no caching. * Note: This map does not maintain object identity. * In general if caching is not desired a WeakIdentityMap should be used with an isolated descriptor. * The default is the "SoftCacheWeakIdentityMap". * @see #setIsIsolated(boolean) */ public void useNoIdentityMap() { getCachePolicy().useNoIdentityMap(); }
/** * INTERNAL: * Allow the descriptor to initialize any dependencies on this session. */ public void preInitialize(AbstractSession session) throws DescriptorException { // Avoid repetitive initialization (this does not solve loops) if (isInitialized(PREINITIALIZED)) { return; } setInitializationStage(PREINITIALIZED); // Allow mapping pre init, must be done before validate. for (Enumeration mappingsEnum = getMappings().elements(); mappingsEnum.hasMoreElements();) { try { DatabaseMapping mapping = (DatabaseMapping) mappingsEnum.nextElement(); mapping.preInitialize(session); } catch (DescriptorException exception) { session.getIntegrityChecker().handleError(exception); } } getCachePolicy().useNoIdentityMap(); getQueryManager().getDoesExistQuery().setExistencePolicy(DoesExistQuery.CheckDatabase); validateBeforeInitialization(session); preInitializeInheritancePolicy(session); verifyTableQualifiers(session.getDatasourcePlatform()); initializeProperties(session); if (hasInterfacePolicy()) { preInterfaceInitialization(session); } getCachePolicy().assignDefaultValues(session); }
/** * INTERNAL: * Allow the descriptor to initialize any dependencies on this session. */ public void preInitialize(AbstractSession session) throws DescriptorException { // Avoid repetitive initialization (this does not solve loops) if (isInitialized(PREINITIALIZED)) { return; } setInitializationStage(PREINITIALIZED); // Allow mapping pre init, must be done before validate. for (Enumeration mappingsEnum = getMappings().elements(); mappingsEnum.hasMoreElements();) { try { DatabaseMapping mapping = (DatabaseMapping) mappingsEnum.nextElement(); mapping.preInitialize(session); } catch (DescriptorException exception) { session.getIntegrityChecker().handleError(exception); } } getCachePolicy().useNoIdentityMap(); getQueryManager().getDoesExistQuery().setExistencePolicy(DoesExistQuery.CheckDatabase); validateBeforeInitialization(session); preInitializeInheritancePolicy(session); verifyTableQualifiers(session.getDatasourcePlatform()); initializeProperties(session); if (hasInterfacePolicy()) { preInterfaceInitialization(session); } getCachePolicy().assignDefaultValues(session); }
classDescriptor.useCacheIdentityMap(); } else if (m_type.equals(CacheType.NONE.name())) { classDescriptor.getCachePolicy().useNoIdentityMap();