<aside> ๐ก JPA๋ Java Persistence API์ ์ฝ์์ด๋ฉฐ, ์๋ฐ ORM ๊ธฐ์ ์ ๋ํ ํ์ค ๋ช ์ธ์ด๋ค.
</aside>
์ฆ, JPA๋ ์๋ฐ์์ ORM์ ์ฌ์ฉํ๊ธฐ ์ํ ํ์ค ์ธํฐํ์ด์ค๋ฅผ ๋ชจ์๋ ์งํฉ์ด๋ค.
jakarta.persistence
ํจํค์ง๋ฅผ ํตํด JPA์ ์ฌ๋ฌ ๋ช
์ธ๋ค์ ์ดํด๋ณผ ์ ์๋ค.
EntityManagerFacotry | ์ฌ๋ฌ๊ฐ์ง EntityManager instance๋ค์ ๊ด๋ฆฌํ๊ณ ๋ง๋๋ ์ฃผ์ฒด.(EntityManager |
---|---|
EntityManager | persistence object์ ๋ํ ์์์ฑ ์ฐ์ฐ์ ๋ด๋นํ๋ ์ฃผ์ฒด |
Entity | persistence object (as records in the database). @Entity ์ด๋ ธํ ์ด์ ์ด ์๋ ํด๋์ค๋ JPA ์ํฐํฐ ํด๋์ค๋ก ์ ์ํจ์ ์๋ฏธ |
EntityTransaction | ์์์ฑ ์ฐ์ฐ๋ค์ด ์ ์ง๋๋ ์ฃผ์ฒด. ๋ฐ๋ผ์ ๊ฐ๊ฐ์ EntityManage๋ EntityTransaction์ ๊ฐ๋๋ค.(one-to-one relation) |
Persistence | EntityManagerFactory instance๋ฅผ ์ป๊ธฐ ์ํด ์ฐ์ |
Query | This interface is implemented by each JPA vendor to obtain relational objects that meet the criteria. |
<aside> ๐ก ์์์ฑ ์ปจํ ์คํธ ์ฅ์
1์ฐจ ์บ์ ์ฒ๋ฆฌ
๋์ผ์ฑ ๋ณด์ฅ
ํธ๋์ญ์ ์ ์ง์ํ๋ ์ฐ๊ธฐ ์ง์ฐ
๋ณ๊ฒฝ ๊ฐ์ง
์ง์ฐ๋ก๋ฉ
</aside>