Class JpaCrudRepository<T extends IdAccessable>
java.lang.Object
io.extact.rms.application.persistence.jpa.JpaCrudRepository<T>
- All Implemented Interfaces:
GenericRepository<T>
- Direct Known Subclasses:
RentalItemJpaRepository
,ReservationJpaRepository
,UserAccountJpaRepository
public abstract class JpaCrudRepository<T extends IdAccessable>
extends Object
implements GenericRepository<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.extact.rms.application.persistence.GenericRepository
GenericRepository.ApiType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
エンティティを追加する。 実装クラスもしくはメソッドにValidateParam
をアノテートすることでメソッド実行前にValid
によりオブジェクトのValidationが実行される。void
エンティティを削除する。findAll()
永続化されているエンティティを全件取得するget
(int id) IDのエンティティを取得する。protected abstract jakarta.persistence.EntityManager
エンティティを更新する。
-
Constructor Details
-
JpaCrudRepository
public JpaCrudRepository()
-
-
Method Details
-
get
Description copied from interface:GenericRepository
IDのエンティティを取得する。- Specified by:
get
in interfaceGenericRepository<T extends IdAccessable>
- Parameters:
id
- ID- Returns:
- エンティティ。該当なしはnull
-
findAll
Description copied from interface:GenericRepository
永続化されているエンティティを全件取得する- Specified by:
findAll
in interfaceGenericRepository<T extends IdAccessable>
- Returns:
- エンティティの全件リスト。該当なしは空リスト
-
add
Description copied from interface:GenericRepository
エンティティを追加する。 実装クラスもしくはメソッドにValidateParam
をアノテートすることでメソッド実行前にValid
によりオブジェクトのValidationが実行される。- Specified by:
add
in interfaceGenericRepository<T extends IdAccessable>
- Parameters:
entity
- エンティティ
-
update
Description copied from interface:GenericRepository
エンティティを更新する。- Specified by:
update
in interfaceGenericRepository<T extends IdAccessable>
- Parameters:
entity
- 更新内容- Returns:
- 更新後エンティティ。更新対象が存在しない場合はnull
-
delete
Description copied from interface:GenericRepository
エンティティを削除する。- Specified by:
delete
in interfaceGenericRepository<T extends IdAccessable>
- Parameters:
entity
- 削除エンティティ
-
getEntityManage
protected abstract jakarta.persistence.EntityManager getEntityManage() -
getTargetClass
-