All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.alpharogroup.db.dao.jpa.EntityManagerDao Maven / Gradle / Ivy

There is a newer version: 6.6
Show newest version
package de.alpharogroup.db.dao.jpa;

import java.io.Serializable;

import javax.persistence.EntityManager;
import javax.persistence.Query;

import de.alpharogroup.db.dao.api.GenericDao;
import de.alpharogroup.db.entity.BaseEntity;

/**
 * The Interface {@link EntityManagerDao}.
 *
 * @param 
 *            the generic type of the entity object
 * @param 
 *            the generic type of the primary key
 */
public interface EntityManagerDao, PK extends Serializable> extends GenericDao {

	/**
	 * Persists the given entity.
	 *
	 * @param entity
	 *            the entity
	 */
	void create(T entity);

	/**
	 * Gets the entity manager.
	 *
	 * @return the entity manager
	 */
	EntityManager getEntityManager();

	/**
	 * Gets a {@link Query} from the given hql query.
	 *
	 * @param hqlQuery
	 *            the hql query
	 * @return the {@link Query}
	 */
	Query getQuery(String hqlQuery);

	/**
	 * Sets the entity manager.
	 *
	 * @param entityManager the new entity manager
	 */
	void setEntityManager(EntityManager entityManager);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy