|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectjp.go.nict.langrid.dao.hibernate.HibernateDaoContext
public class HibernateDaoContext
Hibernate版DaoContext。
| コンストラクタの概要 | |
|---|---|
HibernateDaoContext()
|
|
| メソッドの概要 | ||
|---|---|---|
static void |
addEntityClass(List<Class<?>> additionalEntities)
|
|
|
addEntityListener(Class<T> clazz,
EntityListener<T> listener)
エンティティリスナを登録する。 |
|
void |
addTransactionListener(TransactionListener listener)
セッションリスナを登録する。 |
|
void |
beginTransaction()
トランザクションを開始する。 |
|
void |
commitTransaction()
トランザクションをコミットする。 |
|
void |
fireUpdate(Serializable id,
Object entity,
String[] modifiedFields)
更新イベントを発生させる。 |
|
long |
generateSequence()
シーケンス値を生成する。 |
|
org.hibernate.Session |
getSession()
セッションを取得する。 |
|
int |
getTransactionNestCount()
トランザクションの入れ子の個数を返す。 |
|
|
loadEntity(Class<T> clazz,
Serializable id)
クラスと永続化IDがわかっている際に、エンティティをロードする。 |
|
void |
mergeEntity(Object entity)
エンティティをマージする。 |
|
void |
refreshEntity(Object entity)
エンティティをリフレッシュする。 |
|
|
removeEntityListener(Class<T> clazz,
EntityListener<T> listener)
エンティティリスナを削除する。 |
|
void |
removeTransactionListener(TransactionListener listener)
セッションリスナを削除する。 |
|
void |
rollbackTransaction()
トランザクションをロールバックする。 |
|
void |
updateEntity(Object entity)
エンティティをアップデートする。 |
|
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public HibernateDaoContext()
| メソッドの詳細 |
|---|
public <T> void addEntityListener(Class<T> clazz,
EntityListener<T> listener)
DaoContext の記述:
DaoContext 内の addEntityListenerT - リスナが扱うエンティティの型clazz - エンティティのクラスlistener - エンティティリスナ
public <T> void removeEntityListener(Class<T> clazz,
EntityListener<T> listener)
DaoContext の記述:
DaoContext 内の removeEntityListenerT - リスナが扱うエンティティの型clazz - エンティティのクラスlistener - エンティティリスナ
public void fireUpdate(Serializable id,
Object entity,
String[] modifiedFields)
id - IDentity - エンティティmodifiedFields - 更新されたフィールドの名前public void addTransactionListener(TransactionListener listener)
DaoContext の記述:
DaoContext 内の addTransactionListenerlistener - リスナpublic void removeTransactionListener(TransactionListener listener)
DaoContext の記述:
DaoContext 内の removeTransactionListenerlistener - リスナ
public void beginTransaction()
throws ConnectException,
DaoException
DaoContext の記述:
DaoContext 内の beginTransactionConnectException - データベースに接続できない
DaoException - 処理に失敗した
public void commitTransaction()
throws DaoException
DaoContext の記述:
DaoContext 内の commitTransactionDaoException - 処理に失敗した
public void rollbackTransaction()
throws DaoException
DaoContext の記述:
DaoContext 内の rollbackTransactionDaoException - 処理に失敗したpublic int getTransactionNestCount()
DaoContext の記述:
DaoContext 内の getTransactionNestCount
public <T> T loadEntity(Class<T> clazz,
Serializable id)
throws DaoException
DaoContext の記述:
DaoContext 内の loadEntityT - エンティティの型clazz - エンティティのクラスid - 永続化ID
DaoException - 処理に失敗した
public void mergeEntity(Object entity)
throws DaoException
DaoContext の記述:
DaoContext 内の mergeEntityentity - マージするエンティティ
DaoException - 処理に失敗した
public void refreshEntity(Object entity)
throws DaoException
DaoContext の記述:
DaoContext 内の refreshEntityentity - リフレッシュするエンティティ
DaoException - 処理に失敗した
public void updateEntity(Object entity)
throws DaoException
DaoContext の記述:
DaoContext 内の updateEntityentity - アップデートするエンティティ
DaoException - 処理に失敗した
public long generateSequence()
throws DaoException
DaoExceptionpublic org.hibernate.Session getSession()
public static void addEntityClass(List<Class<?>> additionalEntities)
throws DaoException
DaoException
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||