Java Reference
In-Depth Information
xsi:schemaLocation="http://xmlns.jcp.org/xml/
ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/
persistence_2_1.xsd">
<persistence-unit
name="chapter04PU"transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>com.packt.ch04.entities.Student</class>
<properties>
<property
name="javax.persistence.jdbc.url"value="jdbc:derby://localhost:1527/
ONLINEREGISTRATION"/>
<property
name="javax.persistence.jdbc.password"value="userapp"/>
<property
name="javax.persistence.jdbc.driver"value="org.apache.derby.jdbc.ClientDriver"/>
<property
name="javax.persistence.jdbc.user"value="userapp"/>
</properties>
</persistence-unit>
</persistence>
Concerning the manipulation of entities, JPA offers through the EntityManager in-
terface a set of methods to create, read, update, and delete the data (see the follow-
ing table).
The following table presents some methods for manipulating the entities:
Method
Description
This is used to save the entity passed as a parameter.
void per-
sist(Object o)
Search WWH ::




Custom Search