org.jboss.seam.framework
public class EntityHome<E> extends Home<javax.persistence.EntityManager,E>
instance, newInstance| Constructor and Description |
|---|
EntityHome() |
| Modifier and Type | Method and Description |
|---|---|
void |
create()
Run on
EntityHome instantiation. |
E |
find()
Implementation of
find() for JPA |
javax.persistence.EntityManager |
getEntityManager()
The Seam Managed Persistence Context used by this Home component
|
protected String |
getEntityName()
Implementation of
getEntityName() for JPA |
protected String |
getPersistenceContextName()
The name the Seam component managing the Persistence Context.
|
boolean |
isManaged()
Returns true if the entity instance is managed
|
protected void |
joinTransaction()
Implementation of
joinTransaction() for
JPA. |
protected E |
loadInstance()
Utility method to load entity instance from the
EntityManager. |
String |
persist()
Persist unmanaged entity instance to the underlying database.
|
String |
remove()
Remove managed entity instance from the Persistence Context and the
underlying database.
|
void |
setEntityManager(javax.persistence.EntityManager entityManager)
The Seam Managed Persistence Context used by this Home component.
|
String |
update()
Flush any changes made to the managed entity instance to the underlying
database.
|
assignId, clearInstance, createdMessage, createInstance, deletedMessage, getCreatedMessage, getCreatedMessageKey, getDeletedMessage, getDeletedMessageKey, getEntityClass, getId, getInstance, getMessageKeyPrefix, getNewInstance, getSimpleEntityName, getUpdatedMessage, getUpdatedMessageKey, handleNotFound, initDefaultMessages, initInstance, isIdDefined, raiseAfterTransactionSuccessEvent, setCreatedMessage, setDeletedMessage, setEntityClass, setId, setInstance, setNewInstance, setUpdatedMessage, updatedMessageclearDirty, setDirty, setDirtygetPersistenceContext, setPersistenceContextaddCookie, addFacesMessage, addFacesMessageFromResourceBundle, createValueExpression, createValueExpression, debug, debug, error, error, evaluateValueExpression, evaluateValueExpression, failValidation, fatal, fatal, getApplicationContext, getBusinessProcessContext, getComponentInstance, getComponentInstance, getConversation, getConversationContext, getCookie, getEventContext, getEvents, getFacesContext, getFacesMessages, getIdentity, getLog, getMessages, getMethodContext, getPageContext, getRedirect, getSessionContext, getStatusMessages, getValidator, getValidator, info, info, interpolate, invalidateSession, isTransactionMarkedRollback, raiseAsynchronousEvent, raiseEvent, raiseTransactionSuccessEvent, render, sendHttpError, sendHttpError, trace, trace, validationFailed, validationSucceeded, warn, warnpublic void create()
create in class Home<javax.persistence.EntityManager,E>Home.create()@Transactional public boolean isManaged()
@Transactional public String update()
FacesMessage is added and a transaction
success event raised.Home.updatedMessage(),
Home.raiseAfterTransactionSuccessEvent()@Transactional public String persist()
FacesMessage is added and a transaction
success event raised.Home.createdMessage(),
Home.raiseAfterTransactionSuccessEvent()@Transactional public String remove()
FacesMessage is added and a transaction
success event raised.Home.deletedMessage(),
Home.raiseAfterTransactionSuccessEvent()@Transactional public E find()
find() for JPAfind in class Home<javax.persistence.EntityManager,E>Home.find()protected E loadInstance()
EntityManager.
Called by find().
getEntityClass(),
getId()protected void joinTransaction()
joinTransaction() for
JPA.joinTransaction in class Home<javax.persistence.EntityManager,E>public javax.persistence.EntityManager getEntityManager()
public void setEntityManager(javax.persistence.EntityManager entityManager)
protected String getPersistenceContextName()
getEntityManager() if your persistence context
is not named entityManager.getPersistenceContextName in class PersistenceController<javax.persistence.EntityManager>protected String getEntityName()
getEntityName() for JPAgetEntityName in class Home<javax.persistence.EntityManager,E>Home.getEntityName()Copyright © 2015 Seam Framework. All Rights Reserved.