private void applyBeanValidationConstraintsOnDDL() { BeanValidationActivator.applyDDL( ( Collection<PersistentClass> ) classes.values(), getProperties() ); }
private void applyConstraintsToDDL() { boolean applyOnDdl = getProperties().getProperty( "hibernate.validator.apply_to_ddl", "true" ) .equalsIgnoreCase( "true" ); if ( !applyOnDdl ) { return; // nothing to do in this case } applyHibernateValidatorLegacyConstraintsOnDDL(); applyBeanValidationConstraintsOnDDL(); }
private void enableBeanValidation() { BeanValidationActivator.activateBeanValidation( getEventListeners(), getProperties() ); }
EventListeners.class, Properties.class ); enableSearchMethod.invoke( searchStartupInstance, getEventListeners(), getProperties() );
getProperties().put( Environment.GLOBALLY_QUOTED_IDENTIFIERS, "true" ); && StringHelper.isNotEmpty( getProperties().getProperty( ARTEFACT_PROCESSING_ORDER ) ) ) { configurationArtefactPrecedence = parsePrecedence( getProperties().getProperty( ARTEFACT_PROCESSING_ORDER ) );
public Properties getProperties() { return cfg.getProperties(); }
public Settings buildSettings() throws HibernateException { Thread thread = null; ClassLoader contextClassLoader = null; if (overridenClassLoader != null) { thread = Thread.currentThread(); contextClassLoader = thread.getContextClassLoader(); thread.setContextClassLoader( overridenClassLoader ); } try { return settingsFactory.buildSettings( cfg.getProperties() ); } finally { if (thread != null) thread.setContextClassLoader( contextClassLoader ); } }
/** * Process configuration and build an EntityManagerFactory <b>when</b> the configuration is ready * @deprecated */ public EntityManagerFactory createEntityManagerFactory() { configure( cfg.getProperties(), new HashMap() ); return buildEntityManagerFactory(); }
if ( cfg.getProperties() != null ) preparedProperties.putAll( cfg.getProperties() );
public EntityManagerFactory buildEntityManagerFactory() { Thread thread = null; ClassLoader contextClassLoader = null; if (overridenClassLoader != null) { thread = Thread.currentThread(); contextClassLoader = thread.getContextClassLoader(); thread.setContextClassLoader( overridenClassLoader ); } try { configure( (Properties)null, null ); NamingHelper.bind(this); return new EntityManagerFactoryImpl( cfg.buildSessionFactory(), transactionType, discardOnClose, getSessionInterceptorClass( cfg.getProperties() ) ); } catch (HibernateException e) { throw new PersistenceException( getExceptionHeader() + "Unable to build EntityManagerFactory", e ); } finally { if (thread != null) { thread.setContextClassLoader( contextClassLoader ); } } }
if ( precedence == null ) precedence = getProperties().getProperty( ARTEFACT ); if ( precedence == null ) precedence = DEFAULT_PRECEDENCE; StringTokenizer precedences = new StringTokenizer( precedence, ",; ", false );