Interface UserReferenceSerializer<T>

  • Type Parameters:
    T - the type into which to serialize the user reference (e.g. String)

    @Role
    public interface UserReferenceSerializer<T>
    Converts a UserReference into a serialized form (e.g. into a String representation).
    Since:
    12.2
    Version:
    $Id: 14c2cd8c4056e036ab8c6b66bf93deca96a7d1ca $
    • Field Detail

      • TYPE_STRING

        static final ParameterizedType TYPE_STRING
        Type instance for UserReferenceSerializer<String>.
        Since:
        14.1RC1
      • TYPE_DOCUMENT_REFERENCE

        static final ParameterizedType TYPE_DOCUMENT_REFERENCE
        Type instance for UserReferenceSerializer<DocumentReference>.
        Since:
        14.1RC1
    • Method Detail

      • serialize

        T serialize​(UserReference userReference)
        Parameters:
        userReference - the user reference to serialize
        Returns:
        the serialized representation
      • serialize

        default T serialize​(UserReference userReference,
                            Object... parameters)
        Parameters:
        userReference - the user reference to serialize
        parameters - optional parameters that have a meaning only for the specific serializer implementation used (for example a Document User Reference serializer might want to serialize the user reference relative to another entity reference passed as parameter)
        Returns:
        the serialized representation
        Since:
        14.1RC1