io.ebeaninternal.server.deploy.BeanManagerFactory Maven / Gradle / Ivy
package io.ebeaninternal.server.deploy;
import io.ebean.config.dbplatform.DatabasePlatform;
import io.ebeaninternal.server.persist.BeanPersisterFactory;
import io.ebeaninternal.server.persist.dml.DmlBeanPersisterFactory;
/**
* Creates BeanManagers.
*/
public class BeanManagerFactory {
final BeanPersisterFactory persisterFactory;
public BeanManagerFactory(DatabasePlatform dbPlatform) {
persisterFactory = new DmlBeanPersisterFactory(dbPlatform);
}
public BeanManager create(BeanDescriptor desc) {
return new BeanManager<>(desc, persisterFactory.create(desc));
}
}