/** 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);
  }
예제 #2
0
 @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;
 }
예제 #4
0
 @Override
 public final ComponentBuilder Agent(final String name, final Class<?> type) {
   return parent.Agent(name, type);
 }
예제 #5
0
 @Override
 public final ComponentBuilder Component(
     final String name, final Class<?> type, final boolean isSingleton) {
   return parent.Component(name, type, isSingleton);
 }
예제 #6
0
 /**
  * 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());
 }
예제 #7
0
 @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;
 }
예제 #9
0
 @Override
 public MapBuilder Map(final String name, final Class<?> keyType, final Class<?> valueType) {
   return parent.Map(name, keyType, valueType);
 }
예제 #10
0
 @Override
 public MapBuilder Map(final String name) {
   return parent.Map(name);
 }
예제 #11
0
 @Override
 public final ArrayBuilder Array(
     final String name, final Class<?> type, final boolean isSingleton) {
   return parent.Array(name, type, isSingleton);
 }
예제 #12
0
 @Override
 public final ArrayBuilder Array(final String name, final Class<?> type) {
   return parent.Array(name, type);
 }
예제 #13
0
 @Override
 public final CollectionBuilder List(
     final String name, final Class<?> type, final boolean isSingleton) {
   return parent.List(name, type, isSingleton);
 }
예제 #14
0
 @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;
 }
예제 #17
0
 @Override
 public final List<IComponentDefinition> build() {
   return parent.build();
 }
 public FluentFactoryBuilder useNamingStrategy(Object strategy) {
   configurationBuilder.useNamingStrategy(strategy);
   return this;
 }
예제 #19
0
 @Override
 public final ComponentBuilder Strategy(final String name, final Class<?> type) {
   return parent.Strategy(name, type);
 }