void persist(
Object entity
)
Make an instance managed and persistent.
- Parameters:
entity
- entity instance
- Throws:
- EntityExistsException - if the entity already exists. (If the entity already exists, the
EntityExistsException
may be thrown when the persist operation is invoked, or theEntityExistsException
or anotherPersistenceException
may be thrown at flush or commit time.)- IllegalArgumentException - if the instance is not an entity
- TransactionRequiredException - if there is no transaction when invoked on a container-managed entity manager of that is of type
PersistenceContextType.TRANSACTION
- IllegalArgumentException - if the instance is not an entity
- Since:
- JPA 1.0