/** * INTERNAL: * Some attributes have default values defined in Project. * If such the value for the attribute hasn't been set then the default value is assigned. */ protected void assignDefaultValues(AbstractSession session) { if (this.idValidation == null) { this.idValidation = session.getProject().getDefaultIdValidation(); } getCachePolicy().assignDefaultValues(session); }
/** * INTERNAL: * Some attributes have default values defined in Project. * If such the value for the attribute hasn't been set then the default value is assigned. */ protected void assignDefaultValues(AbstractSession session) { if (this.idValidation == null) { this.idValidation = session.getProject().getDefaultIdValidation(); } 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); }
/** * 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); }