Method Summary |
|
public boolean | contains(Object entity) Check if the instance belongs to the current persistence context. |
public Query | createNamedQuery(String name) Create an instance of Query for executing a named query (in EJBQL or native SQL). |
public Query | createNativeQuery(String sqlString) Create an instance of Query for executing a native SQL query. |
public Query | createNativeQuery(String sqlString, Class resultClass) Create an instance of Query for executing
a native SQL query. |
public Query | createNativeQuery(String sqlString, String resultSetMapping) Create an instance of Query for executing
a native SQL query. |
public Query | createQuery(String ejbqlString) Create an instance of Query for executing an EJBQL query. |
public Object | find(String entityName, Object primaryKey) Find by primary key. |
public T | find(Class<T> entityClass, Object primaryKey) Find by primary key. |
public void | flush() Synchronize the persistence context with the underlying database. |
public T | merge(T entity) Merge the state of the given entity into the current persistence context,
using the unqualified class name as the entity name. |
public void | persist(Object entity) Make an instance managed, using the unqualified class name as the entity name. |
public void | refresh(Object entity) Refresh the state of the instance from the
database. |
public void | remove(Object entity) Remove the instance. |