jp.co.ogis_ri.citk.policytool.common.repository
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable>

型パラメータ:
E - エンティティ型
K - 主キー型
既知のサブインタフェースの一覧:
PolicyRepository, RealmRepository
既知の実装クラスの一覧:
JpaGenericRepository, JpaPolicyRepositoryImpl, JpaRealmRepositoryImpl

public interface GenericRepository<E extends AbstractModel<K>,K extends Serializable>

エンティティに対する汎用的な処理を行うインタフェース(GenericDaoパターン).

作成者:
michio

メソッドの概要
 List<E> findAll()
          エンティティを全件取得する.
 E findById(K id)
          idでエンティティを検索する.
 E merge(E entity)
          エンティティをアタッチ状態にする.
 void persist(E entity)
          エンティティを永続化する.
 void reflesh(E entity)
          エンティティをリフレッシュにする.
 void remove(E entity)
          エンティティを削除状態にする.
 void removeAll()
          全てのエンティティを削除状態にする.
 

メソッドの詳細

findById

E findById(K id)
idでエンティティを検索する.

パラメータ:
id - id

findAll

List<E> findAll()
エンティティを全件取得する.

戻り値:
エンティティのリスト.

persist

void persist(E entity)
エンティティを永続化する.

パラメータ:
entity - エンティティ

merge

E merge(E entity)
エンティティをアタッチ状態にする.

パラメータ:
entity - エンティティ

remove

void remove(E entity)
エンティティを削除状態にする.

パラメータ:
entity - エンティティ

removeAll

void removeAll()
全てのエンティティを削除状態にする.


reflesh

void reflesh(E entity)
エンティティをリフレッシュにする.

パラメータ:
entity - エンティティ


Copyright © 2011-2012 OGIS-RI Co.,Ltd.. All Rights Reserved.