void
|
close()
Closes the associated entityManger if it's open.
|
void
|
commit()
|
void
|
endTransaction()
Close any open transaction used on the current thread.
|
boolean
|
equalInDatastore(Object thisObj, Object thatObj)
True if the to objects represent the same object in the datastore.
|
<T>
T
|
find(T object)
Retrieves the object from the datastore.
|
List
|
findByNamedQuery(String name)
Executes a named query that does not take any parameters
|
List
|
findByNamedQuery(String name, Map<String, Object> namedParameters)
Executes a named query using a map of named parameters
|
<T>
T
|
findByPrimaryKey(Class<T> clazz, Object primaryKey)
|
EntityManager
|
getEntityManager()
|
boolean
|
isPersistent(Object entity)
Checks to see if the given object is persisted in the database
|
void
|
loadLazyRelations(Object entity)
Many one-to-many relations are lazy loaded in JPA.
|
<T>
T
|
merge(T entity)
Update an object in the database and bring it into the current transaction
|
void
|
persist(Object entity)
Insert an object into the database
|
void
|
remove(Object entity)
|
void
|
startTransaction()
Start a database transaction.
|
static
Map<String, Object>
|
toParameterMap(Object... args)
The findByNamedQuery method needs a Map of parameters.
|