org.jboss.seam.framework
Class Home<T,E>

java.lang.Object
  extended by org.jboss.seam.framework.Controller
      extended by org.jboss.seam.framework.PersistenceController<T>
          extended by org.jboss.seam.framework.MutableController<T>
              extended by org.jboss.seam.framework.Home<T,E>
All Implemented Interfaces:
Serializable, Mutable
Direct Known Subclasses:
EntityHome, HibernateEntityHome

@Scope(value=CONVERSATION)
public abstract class Home<T,E>
extends MutableController<T>

Base class for components which provide persistence operations to a managed entity instance. This class may be reused by either configuration or extension, and may be bound directly to a view, or accessed by some intermediate Seam component.

Author:
Gavin King
See Also:
Serialized Form

Field Summary
protected  E instance
           
protected  Expressions.ValueExpression newInstance
           
 
Constructor Summary
Home()
           
 
Method Summary
protected  void assignId(Object id)
           
 void clearInstance()
           
 void create()
           
protected  void createdMessage()
           
protected  E createInstance()
           
protected  void deletedMessage()
           
protected  E find()
           
 String getCreatedMessage()
           
protected  String getCreatedMessageKey()
           
 String getDeletedMessage()
           
protected  String getDeletedMessageKey()
           
 Class<E> getEntityClass()
           
protected abstract  String getEntityName()
           
 Object getId()
           
 E getInstance()
           
protected  String getMessageKeyPrefix()
           
 Expressions.ValueExpression getNewInstance()
           
protected  String getSimpleEntityName()
           
 String getUpdatedMessage()
           
protected  String getUpdatedMessageKey()
           
protected  E handleNotFound()
           
protected  void initInstance()
           
 boolean isIdDefined()
           
protected  void joinTransaction()
           
protected  void raiseAfterTransactionSuccessEvent()
           
 void setCreatedMessage(String createdMessage)
           
 void setDeletedMessage(String deletedMessage)
           
 void setEntityClass(Class<E> entityClass)
           
 void setId(Object id)
           
 void setInstance(E instance)
           
 void setNewInstance(Expressions.ValueExpression newInstance)
           
 void setUpdatedMessage(String updatedMessage)
           
protected  void updatedMessage()
           
 
Methods inherited from class org.jboss.seam.framework.MutableController
clearDirty, setDirty, setDirty
 
Methods inherited from class org.jboss.seam.framework.PersistenceController
getPersistenceContext, getPersistenceContextName, setPersistenceContext
 
Methods inherited from class org.jboss.seam.framework.Controller
addCookie, addFacesMessage, addFacesMessageFromResourceBundle, debug, debug, error, error, failValidation, fatal, fatal, getApplicationContext, getBusinessProcessContext, getComponentInstance, getComponentInstance, getConversation, getConversationContext, getCookie, getEventContext, getEvents, getFacesContext, getFacesMessages, getIdentity, getLog, getMessages, getMethodContext, getPageContext, getRedirect, getSessionContext, getValidator, getValidator, info, info, interpolate, invalidateSession, isTransactionMarkedRollback, raiseAsynchronousEvent, raiseEvent, raiseTransactionSuccessEvent, render, sendHttpError, sendHttpError, trace, trace, validationFailed, validationSucceeded, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected E instance

newInstance

protected Expressions.ValueExpression newInstance
Constructor Detail

Home

public Home()
Method Detail

updatedMessage

protected void updatedMessage()

deletedMessage

protected void deletedMessage()

createdMessage

protected void createdMessage()

create

@Create
public void create()

getInstance

@Transactional
public E getInstance()

clearInstance

public void clearInstance()

initInstance

protected void initInstance()

joinTransaction

protected void joinTransaction()

find

protected E find()

handleNotFound

protected E handleNotFound()

createInstance

protected E createInstance()

getEntityClass

public Class<E> getEntityClass()

setEntityClass

public void setEntityClass(Class<E> entityClass)

getId

public Object getId()

setId

public void setId(Object id)

assignId

protected void assignId(Object id)

isIdDefined

public boolean isIdDefined()

setInstance

public void setInstance(E instance)

getNewInstance

public Expressions.ValueExpression getNewInstance()

setNewInstance

public void setNewInstance(Expressions.ValueExpression newInstance)

getCreatedMessage

public String getCreatedMessage()

setCreatedMessage

public void setCreatedMessage(String createdMessage)

getDeletedMessage

public String getDeletedMessage()

setDeletedMessage

public void setDeletedMessage(String deletedMessage)

getUpdatedMessage

public String getUpdatedMessage()

setUpdatedMessage

public void setUpdatedMessage(String updatedMessage)

getMessageKeyPrefix

protected String getMessageKeyPrefix()

getCreatedMessageKey

protected String getCreatedMessageKey()

getUpdatedMessageKey

protected String getUpdatedMessageKey()

getDeletedMessageKey

protected String getDeletedMessageKey()

raiseAfterTransactionSuccessEvent

protected void raiseAfterTransactionSuccessEvent()

getSimpleEntityName

protected String getSimpleEntityName()

getEntityName

protected abstract String getEntityName()