Class StringValueEncoder

  • All Implemented Interfaces:
    ValueEncoder<java.lang.String>

    public class StringValueEncoder
    extends java.lang.Object
    implements ValueEncoder<java.lang.String>
    Passes the string value from the server to the client and vice-versa without any translation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toClient​(java.lang.String value)
      Converts a value into a client-side representation.
      java.lang.String toValue​(java.lang.String clientValue)
      Converts a client-side representation, provided by ValueEncoder.toClient(Object), back into a server-side value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toClient

        public java.lang.String toClient​(java.lang.String value)
        Description copied from interface: ValueEncoder
        Converts a value into a client-side representation. The value should be parseable by ValueEncoder.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 interface ValueEncoder<java.lang.String>
        Parameters:
        value - to be encoded
        Returns:
        a string representation of the value, or the value's identity
      • toValue

        public java.lang.String toValue​(java.lang.String clientValue)
        Description copied from interface: ValueEncoder
        Converts a client-side representation, provided by ValueEncoder.toClient(Object), back into a server-side value.
        Specified by:
        toValue in interface ValueEncoder<java.lang.String>
        Parameters:
        clientValue - string representation of the value's identity
        Returns:
        the corresponding entity, or null if not found