|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.tangosol.util.Base
com.tangosol.coherence.jpa.JpaCacheLoader
public class JpaCacheLoader
JPA implementation of the CacheLoader interface.
JpaCacheStore class for a full load and store implementation.
JpaCacheStore| Field Summary | |
|---|---|
protected javax.persistence.EntityManagerFactory |
m_emf
The EntityManagerFactory from which EntityManager instances are obtained. |
protected Class |
m_sEntityClass
The entity class that this CacheLoader is managing. |
protected String |
m_sEntityName
Name of the entity that this CacheLoader is managing. |
protected static Map |
s_mapFactories
Map of all shared entity manager factories for all persistence units. |
| Constructor Summary | |
|---|---|
JpaCacheLoader(String sEntityName,
String sEntityClassName,
String sUnitName)
Constructor which accepts an entity name, class name, and persistence unit name. |
|
JpaCacheLoader(String sEntityName,
String sEntityClassName,
String sUnitName,
ClassLoader loader)
Constructor which accepts an entity name, class name, persistence unit name, and classloader. |
|
| Method Summary | |
|---|---|
protected javax.persistence.EntityManager |
getEntityManager()
Creates and returns an EntityManager. |
protected void |
initialize(String sEntityName,
String sEntityClassName,
String sUnitName,
ClassLoader loader)
Initialize this instance with the relevant metadata for the entity being stored. |
Object |
load(Object oKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store. |
Map |
loadAll(Collection colKeys)
Return the values associated with each the specified keys in the passed collection. |
| Field Detail |
|---|
protected static final Map s_mapFactories
protected String m_sEntityName
protected Class m_sEntityClass
protected javax.persistence.EntityManagerFactory m_emf
| Constructor Detail |
|---|
public JpaCacheLoader(String sEntityName,
String sEntityClassName,
String sUnitName)
sEntityName - the JPA name of the entitysEntityClassName - the fully-qualified class name of the entitysUnitName - the name of the persistence unit
public JpaCacheLoader(String sEntityName,
String sEntityClassName,
String sUnitName,
ClassLoader loader)
sEntityName - the JPA name of the entitysEntityClassName - the fully-qualified class name of the entitysUnitName - the name of the persistence unitloader - the ClassLoader used to load the entity class| Method Detail |
|---|
public Object load(Object oKey)
load in interface CacheLoaderoKey - key whose associated value is to be returned
public Map loadAll(Collection colKeys)
loadAll in interface CacheLoadercolKeys - a collection of keys to load
protected void initialize(String sEntityName,
String sEntityClassName,
String sUnitName,
ClassLoader loader)
sEntityName - the JPA name of the entitysEntityClassName - the fully-qualified class name of the entitysUnitName - the name of the persistence unitloader - the ClassLoader used to load the entity classprotected javax.persistence.EntityManager getEntityManager()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||