|
Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.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_emfThe EntityManagerFactory from which EntityManager instances are obtained. |
protected java.lang.Class |
m_sEntityClassThe entity class that this CacheLoader is managing. |
protected java.lang.String |
m_sEntityNameName of the entity that this CacheLoader is managing. |
protected static java.util.Map |
s_mapFactoriesMap of all shared entity manager factories for all persistence units. |
| Constructor Summary | |
|---|---|
JpaCacheLoader(java.lang.String sEntityName, java.lang.String sEntityClassName, java.lang.String sUnitName)Constructor which accepts an entity name, class name, and persistence unit name. |
|
JpaCacheLoader(java.lang.String sEntityName, java.lang.String sEntityClassName, java.lang.String sUnitName, java.lang.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(java.lang.String sEntityName, java.lang.String sEntityClassName, java.lang.String sUnitName, java.lang.ClassLoader loader)Initialize this instance with the relevant metadata for the entity being stored. |
java.lang.Object |
load(java.lang.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. |
java.util.Map |
loadAll(java.util.Collection colKeys)Return the values associated with each the specified keys in the passed collection. |
| Field Detail |
|---|
protected static final java.util.Map s_mapFactories
protected java.lang.String m_sEntityName
protected java.lang.Class m_sEntityClass
protected javax.persistence.EntityManagerFactory m_emf
| Constructor Detail |
|---|
public JpaCacheLoader(java.lang.String sEntityName,
java.lang.String sEntityClassName,
java.lang.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(java.lang.String sEntityName,
java.lang.String sEntityClassName,
java.lang.String sUnitName,
java.lang.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 java.lang.Object load(java.lang.Object oKey)
load in interface CacheLoaderoKey - key whose associated value is to be returnedpublic java.util.Map loadAll(java.util.Collection colKeys)
loadAll in interface CacheLoadercolKeys - a collection of keys to load
protected void initialize(java.lang.String sEntityName,
java.lang.String sEntityClassName,
java.lang.String sUnitName,
java.lang.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()
|
Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||