View Javadoc
1   package com.atlassian.activeobjects.internal;
2   
3   import com.atlassian.activeobjects.config.ActiveObjectsConfiguration;
4   import com.atlassian.activeobjects.spi.DatabaseType;
5   import net.java.ao.EntityManager;
6   
7   import javax.sql.DataSource;
8   
9   /**
10   * A factory to create new EntityManagers from a given data source.
11   */
12  interface EntityManagerFactory {
13      /**
14       * Creates a <em>new</em> entity manager using the given data source.
15       *
16       * @param dataSource    the data source for which to create the entity manager
17       * @param databaseType  the type of database that the data source connects to.
18       * @param configuration the configuration for this active objects instance
19       * @return a new entity manager
20       */
21      EntityManager getEntityManager(DataSource dataSource, DatabaseType databaseType, String schema, ActiveObjectsConfiguration configuration);
22  }