package org.seasar.dao.impl;

import org.seasar.dao.DaoMetaDataFactory;
import org.seasar.dao.EntityManager;

/**
 * @author higa
 *
 */
public abstract class AbstractDao {

	private EntityManager entityManager_;
	
	public AbstractDao(DaoMetaDataFactory daoMetaDataFactory) {
		Class daoInterface = DaoMetaDataImpl.getDaoInterface(getClass());
		entityManager_ = new EntityManagerImpl(daoMetaDataFactory.getDaoMetaData(daoInterface));
	}

	public EntityManager getEntityManager() {
		return entityManager_;
	}
}
