jp.co.ogis_ri.citk.policytool.common.repository
クラス JpaGenericRepository<E extends AbstractModel<K>,K extends Serializable>

java.lang.Object
  上位を拡張 jp.co.ogis_ri.citk.policytool.common.repository.JpaGenericRepository<E,K>
型パラメータ:
E - エンティティ型.
K - 主キー型.
すべての実装されたインタフェース:
GenericRepository<E,K>
直系の既知のサブクラス:
JpaPolicyRepositoryImpl, JpaRealmRepositoryImpl

public abstract class JpaGenericRepository<E extends AbstractModel<K>,K extends Serializable>
extends Object
implements GenericRepository<E,K>

JPAによりエンティティに対する汎用的な処理を行うクラス.


フィールドの概要
protected  javax.persistence.EntityManager em
          EntityManager.
 
コンストラクタの概要
JpaGenericRepository()
          コンストラクタ.
 
メソッドの概要
 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()
          全てのエンティティを削除状態にする.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

em

protected javax.persistence.EntityManager em
EntityManager.

コンストラクタの詳細

JpaGenericRepository

public JpaGenericRepository()
コンストラクタ.

メソッドの詳細

findAll

public List<E> findAll()
インタフェース GenericRepository の記述:
エンティティを全件取得する.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の findAll
戻り値:
エンティティのリスト.

findById

public E findById(K id)
インタフェース GenericRepository の記述:
idでエンティティを検索する.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の findById
パラメータ:
id - id

persist

public void persist(E entity)
インタフェース GenericRepository の記述:
エンティティを永続化する.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の persist
パラメータ:
entity - エンティティ

merge

public E merge(E entity)
インタフェース GenericRepository の記述:
エンティティをアタッチ状態にする.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の merge
パラメータ:
entity - エンティティ

remove

public void remove(E entity)
インタフェース GenericRepository の記述:
エンティティを削除状態にする.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の remove
パラメータ:
entity - エンティティ

removeAll

public void removeAll()
インタフェース GenericRepository の記述:
全てのエンティティを削除状態にする.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の removeAll

reflesh

public void reflesh(E entity)
インタフェース GenericRepository の記述:
エンティティをリフレッシュにする.

定義:
インタフェース GenericRepository<E extends AbstractModel<K>,K extends Serializable> 内の reflesh
パラメータ:
entity - エンティティ


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