org.guiceex.jpa
クラス EntityManagerFactoryHolder

java.lang.Object
  上位を拡張 org.guiceex.jpa.EntityManagerFactoryHolder

public class EntityManagerFactoryHolder
extends Object

EntityManagerFactoryインスタンスをpersistence-unit毎にstaticフィールドに保持します。

作成者:
matu◆AliceLAklI.

入れ子のクラスの概要
static class EntityManagerFactoryHolder.Name
          persistence.xmlのpersistence-unti名を取得する際に使用するクラスです。
 
コンストラクタの概要
EntityManagerFactoryHolder()
           
 
メソッドの概要
static void closeAll()
          全てのEntityManagerFactoryインスタンスのEntityManagerFactory.close() を呼び出してクローズします。
static EntityManagerFactory getEntityManagerFactory(String unitName, Map map)
          EntityManagerFactoryのファクトリメソッドです。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

EntityManagerFactoryHolder

public EntityManagerFactoryHolder()
メソッドの詳細

getEntityManagerFactory

public static EntityManagerFactory getEntityManagerFactory(String unitName,
                                                           Map map)
EntityManagerFactoryのファクトリメソッドです。 unitNameに応じたEntityManagerFactoryインスタンスを、 必要に応じて新規作成して返却します。

パラメータ:
unitName - persitence-unit名
map - プロパティのMap
戻り値:

closeAll

public static void closeAll()
全てのEntityManagerFactoryインスタンスのEntityManagerFactory.close() を呼び出してクローズします。



Copyright © 2007. All Rights Reserved.