Interface TypeConverter<T,​E>

  • Type Parameters:
    T - Field type in the domain object.
    E - Field type in the protobuf object.
    All Known Implementing Classes:
    NullConverter

    public interface TypeConverter<T,​E>
    Interface for converting fields values if their types in the domain object and protobuf object different.
    • Method Detail

      • toDomainValue

        T toDomainValue​(E protoValue)
        Convert instance from protobuf object type to domain object type.
        Parameters:
        protoValue - Instance for conversion.
        Returns:
        converted data.
      • shouldAssignToProto

        boolean shouldAssignToProto​(T domainValue)
      • toProtobufValue

        E toProtobufValue​(T domainValue)
        Convert instance from domain object type to protobuf object type.
        Parameters:
        domainValue - Instance for conversion.
        Returns:
        converted data.