/** Build a Hibernate session factory. */ public void build() { if (useHibernateCfgXml) { configurationBuilder.configure(hibernateCfgXmlPath); } if (annotatedClasses != null) { configurationBuilder.addAnnotatedClasses(annotatedClasses); } if (packagesToScan != null) { configurationBuilder.addPackagesToScan(packagesToScan); } configureFromExistingSessionFactory(configurationBuilder.buildSessionFactory(), hibernate4Used); }
@Override public MapBuilder Map( final String name, final Class<?> keyType, final Class<?> valueType, final boolean isSingleton) { return parent.Map(name, keyType, valueType, isSingleton); }
public FluentFactoryBuilder hibernateProperties(HibernateProperties options) { configurationBuilder.addHibernateProperties(options); return this; }
@Override public final ComponentBuilder Agent(final String name, final Class<?> type) { return parent.Agent(name, type); }
@Override public final ComponentBuilder Component( final String name, final Class<?> type, final boolean isSingleton) { return parent.Component(name, type, isSingleton); }
/** * Nests the configuration described by the given builder in the current component definition. * * @param innerConfigurationBuilder The inner builder to be nested * @return This builder */ public final IConfigurationBuilder withInner( final IConfigurationBuilder innerConfigurationBuilder) { return withInner(innerConfigurationBuilder.build()); }
@Override public final CollectionBuilder Set(final String name) { return parent.Set(name); }
/** * Use the default Hibernate5NamingStrategy with options. * * @param options options, to specify a strategy behaviour */ public FluentFactoryBuilder useNamingStrategy(StrategyOptions options) { configurationBuilder.useNamingStrategy(options); return this; }
@Override public MapBuilder Map(final String name, final Class<?> keyType, final Class<?> valueType) { return parent.Map(name, keyType, valueType); }
@Override public MapBuilder Map(final String name) { return parent.Map(name); }
@Override public final ArrayBuilder Array( final String name, final Class<?> type, final boolean isSingleton) { return parent.Array(name, type, isSingleton); }
@Override public final ArrayBuilder Array(final String name, final Class<?> type) { return parent.Array(name, type); }
@Override public final CollectionBuilder List( final String name, final Class<?> type, final boolean isSingleton) { return parent.List(name, type, isSingleton); }
@Override public final CollectionBuilder List(final String name, final Class<?> type) { return parent.List(name, type); }
public FluentFactoryBuilder hibernatePropertiesFromFile(File propertiesFilePath) { configurationBuilder.addPropertiesFromFile(propertiesFilePath); return this; }
public FluentFactoryBuilder hibernatePropertiesFromClassPathResource( String classPathResourcePath) { configurationBuilder.addPropertiesFromClassPath(classPathResourcePath); return this; }
@Override public final List<IComponentDefinition> build() { return parent.build(); }
public FluentFactoryBuilder useNamingStrategy(Object strategy) { configurationBuilder.useNamingStrategy(strategy); return this; }
@Override public final ComponentBuilder Strategy(final String name, final Class<?> type) { return parent.Strategy(name, type); }