|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.addon.jpacontainer.provider.LocalEntityProvider<T>
com.vaadin.addon.jpacontainer.provider.MutableLocalEntityProvider<T>
com.vaadin.addon.jpacontainer.provider.jndijta.MutableEntityProvider<T>
T - public class MutableEntityProvider<T>
An entity provider implementation that uses JTA transactions and JPA context
provided by the application server. To provide a generic non EJB provider
this class gets references to both UserTransaction and
EntityManager via JNDI lookup.
| Constructor Summary | |
|---|---|
MutableEntityProvider(Class<T> entityClass)
|
|
MutableEntityProvider(Class<T> entityClass,
JndiAddresses jndiAddresses)
|
|
| Method Summary | |
|---|---|
javax.persistence.EntityManager |
getEntityManager()
Gets the entity manager. |
JndiAddresses |
getJndiAddresses()
|
boolean |
isEntitiesDetached()
If this method returns true, all entities returned from this entity provider are explicitly detached from the persistence context before returned, regardless of whether the persistence context is extended or transaction-scoped. |
protected void |
runInTransaction(Runnable operation)
If MutableLocalEntityProvider.isTransactionsHandledByProvider() is true,
operation will be executed inside a transaction that is
commited after the operation is completed. |
void |
setJndiAddresses(JndiAddresses addresses)
|
| Methods inherited from class com.vaadin.addon.jpacontainer.provider.MutableLocalEntityProvider |
|---|
addEntity, addListener, fireEntityProviderChangeEvent, isFireEntityProviderChangeEvent, isTransactionsHandledByProvider, removeEntity, removeListener, setFireEntityProviderChangeEvents, setTransactionsHandledByProvider, updateEntity, updateEntityProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.addon.jpacontainer.EntityProvider |
|---|
containsEntity, getAllEntityIdentifiers, getEntity, getEntityCount, getEntityIdentifierAt, getEntityManagerProvider, getFirstEntityIdentifier, getIdentifier, getLastEntityIdentifier, getLazyLoadingDelegate, getNextEntityIdentifier, getPreviousEntityIdentifier, getQueryModifierDelegate, refresh, refreshEntity, setEntitiesDetached, setEntityManager, setEntityManagerProvider, setLazyLoadingDelegate, setQueryModifierDelegate |
| Constructor Detail |
|---|
public MutableEntityProvider(Class<T> entityClass)
public MutableEntityProvider(Class<T> entityClass,
JndiAddresses jndiAddresses)
| Method Detail |
|---|
public boolean isEntitiesDetached()
EntityProviderIf this method returns false, the entities returned may be managed or detached, depending on the scope of the persistence context.
The default value is implementation specific.
isEntitiesDetached in interface EntityProvider<T>isEntitiesDetached in class LocalEntityProvider<T>EntityProvider.setEntitiesDetached(boolean)protected void runInTransaction(Runnable operation)
MutableLocalEntityProviderMutableLocalEntityProvider.isTransactionsHandledByProvider() is true,
operation will be executed inside a transaction that is
commited after the operation is completed. Otherwise,
operation will just be executed.
runInTransaction in class MutableLocalEntityProvider<T>operation - the operation to run (must not be null).public javax.persistence.EntityManager getEntityManager()
LocalEntityProvider
getEntityManager in interface EntityProvider<T>getEntityManager in class LocalEntityProvider<T>public void setJndiAddresses(JndiAddresses addresses)
setJndiAddresses in interface JndiJtaProvider<T>addresses - JNDI addresses that the provider should uses to lookup
UserTransaction and EntityManagerpublic JndiAddresses getJndiAddresses()
getJndiAddresses in interface JndiJtaProvider<T>UserTransaction and EntityManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||