Skip to content

TarasPavliuchyn/jpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Java Persistence - Module 1 - Basic Mapping – Practice

  1. Prepare a new project with JPA inside. Call it CarManagement.

  2. Create entity Car with the following fields: Long id, String model, Integer power.

  3. Create embeddable value type Engine with the following fields: String model, Integer volume.

Include it to the Car entity.

  1. Test basic read-write operations with the Car entity.

  2. Add new fields to the Car and Engine classes at your discretion. Try to use following annotations:

b. SecondaryTable

e. Enumeration (for example create CarType enum)

f. Convert (create some Converter)

  1. Create the following successors for the Car class: ElectricCar, OilCar, and HybridCar. Add some

specific fields for them. Try to use all three types of inheritance mapping.

  1. [Optional] Try to use both MySQL and PostgreSQL databases and both Hibernate and EclipseLink

  2. [Optional] Connect the object model and the tables via pure JDBC. The connection means simple

CRUD operations.

About

java persistence training

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published