Class JpaValueEncoder<E>
java.lang.Object
org.apache.tapestry5.internal.jpa.JpaValueEncoder<E>
- All Implemented Interfaces:
ValueEncoder<E>
-
Constructor Summary
ConstructorsConstructorDescriptionJpaValueEncoder
(javax.persistence.metamodel.EntityType<E> entity, EntityManagerManager entityManagerManager, String persistenceUnitName, PropertyAccess propertyAccess, TypeCoercer typeCoercer, org.slf4j.Logger logger) -
Method Summary
-
Constructor Details
-
JpaValueEncoder
public JpaValueEncoder(javax.persistence.metamodel.EntityType<E> entity, EntityManagerManager entityManagerManager, String persistenceUnitName, PropertyAccess propertyAccess, TypeCoercer typeCoercer, org.slf4j.Logger logger)
-
-
Method Details
-
toClient
Converts a value into a client-side representation. The value should be parseable byValueEncoder.toValue(String)
. In some cases, what is returned is an identifier used to locate the true object, rather than a string representation of the value itself.- Specified by:
toClient
in interfaceValueEncoder<E>
- Parameters:
value
- to be encoded- Returns:
- a string representation of the value, or the value's identity
-
toValue
Converts a client-side representation, provided byValueEncoder.toClient(Object)
, back into a server-side value.- Specified by:
toValue
in interfaceValueEncoder<E>
- Parameters:
clientValue
- string representation of the value's identity- Returns:
- the corresponding entity, or null if not found
-