EntityManager:
void persist(Object entity);
void remove(Object entity);
void flush();
T merge(T entity);
T find(Class entityClass,Object primaryKey)
Query:
Object getSingleResult();
List getResultList();
Query setParameter(int position,Object value);
Query setMaxResults(int maxResult);
int executeUpdate();
void persist(Object entity);
void remove(Object entity);
void flush();
T merge(T entity);
T find(Class entityClass,Object primaryKey)
Query:
Object getSingleResult();
List getResultList();
Query setParameter(int position,Object value);
Query setMaxResults(int maxResult);
int executeUpdate();