List of usage examples for org.springframework.beans.factory.config TypedStringValue equals
@Override public boolean equals(@Nullable Object other)
From source file:com.wavemaker.runtime.data.cloudfoundry.CloudFoundryDataServiceBeanFactoryPostProcessor.java
/** * @param beanFactory/* w w w . j a v a2 s . c o m*/ */ private void processHibernateProperties(DefaultListableBeanFactory beanFactory) { String[] sessionFactoryBeanNames = beanFactory .getBeanNamesForType(ConfigurationAndSessionFactoryBean.class); for (String sfBean : sessionFactoryBeanNames) { BeanDefinition beanDefinition = getBeanDefinition(beanFactory, sfBean); if (sfBean.contains(DataServiceConstants.AUX_BEAN_SUFFIX)) { beanDefinition.setLazyInit(false); } else { beanDefinition.setLazyInit(true); } MutablePropertyValues propertyValues = beanDefinition.getPropertyValues(); PropertyValue hibernateProperties = propertyValues.getPropertyValue("hibernateProperties"); ManagedProperties hibernatePropsPropertyValue = null; if (hibernateProperties != null) { Object value = hibernateProperties.getValue(); if (value instanceof ManagedProperties) { hibernatePropsPropertyValue = (ManagedProperties) hibernateProperties.getValue(); TypedStringValue dialect = (TypedStringValue) hibernatePropsPropertyValue .get(new TypedStringValue(DataServiceConstants.HIBERNATE_DIALECT_PROPERTY)); if (dialect != null && dialect .equals(new TypedStringValue("com.wavemaker.runtime.data.dialect.MySQLDialect"))) { hibernatePropsPropertyValue.put( new TypedStringValue(DataServiceConstants.HIBERNATE_DIALECT_PROPERTY), new TypedStringValue("org.hibernate.dialect.MySQLDialect")); } } } else { hibernatePropsPropertyValue = new ManagedProperties(); } } }