org.jboss.seam.ui.converter
Class EntityConverter
java.lang.Object
org.jboss.seam.ui.converter.EntityConverter
- All Implemented Interfaces:
- java.io.Serializable, javax.faces.convert.Converter
@Name(value="org.jboss.seam.ui.EntityConverter")
@Scope(value=CONVERSATION)
@Install(precedence=0)
@Converter
@BypassInterceptors
public class EntityConverter
- extends java.lang.Object
- implements javax.faces.convert.Converter, java.io.Serializable
Allows conversion of an entity to/from a key which can be written to a page.
Support is provided for JPA (by default) and Hibernate (with the session
specified in components.xml)
- See Also:
- Serialized Form
Method Summary |
void |
create()
|
java.lang.Object |
getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent cmp,
java.lang.String value)
|
java.lang.String |
getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent cmp,
java.lang.Object value)
|
org.jboss.seam.core.Expressions.ValueExpression |
getEntityManager()
|
org.jboss.seam.core.Expressions.ValueExpression |
getSession()
|
void |
setEntityManager(org.jboss.seam.core.Expressions.ValueExpression entityManager)
|
void |
setSession(org.jboss.seam.core.Expressions.ValueExpression session)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityConverter
public EntityConverter()
create
@Create
public void create()
getAsString
@Transactional
public java.lang.String getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent cmp,
java.lang.Object value)
throws javax.faces.convert.ConverterException
- Specified by:
getAsString
in interface javax.faces.convert.Converter
- Throws:
javax.faces.convert.ConverterException
getAsObject
@Transactional
public java.lang.Object getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent cmp,
java.lang.String value)
throws javax.faces.convert.ConverterException
- Specified by:
getAsObject
in interface javax.faces.convert.Converter
- Throws:
javax.faces.convert.ConverterException
getEntityManager
public org.jboss.seam.core.Expressions.ValueExpression getEntityManager()
setEntityManager
public void setEntityManager(org.jboss.seam.core.Expressions.ValueExpression entityManager)
getSession
public org.jboss.seam.core.Expressions.ValueExpression getSession()
setSession
public void setSession(org.jboss.seam.core.Expressions.ValueExpression session)
Copyright © 2008. All Rights Reserved.