Interface Converter<T>

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    RowAsJsonConverter

    public interface Converter<T>
    extends java.io.Serializable
    • Method Detail

      • setup

        default void setup()
      • getKeyFromResult

        java.lang.String getKeyFromResult​(java.sql.ResultSet result)
      • getTimestampFromResult

        default long getTimestampFromResult​(java.sql.ResultSet result)
      • asKeyValues

        default java.util.List<KeyValue<?>> asKeyValues​(EntityDescriptor entityDescriptor,
                                                        java.util.List<AttributeDescriptor<?>> attributes,
                                                        long stamp,
                                                        java.sql.ResultSet result)
        Convert single row of result to KeyValues. The code must not call ResultSet.next().
        Parameters:
        entityDescriptor - entity descriprot
        attributes - the attributes to search the result for
        stamp - timestamp
        result - result to convert single line from
        Returns:
        converted KeyValues.
      • getValueBytes

        default byte[] getValueBytes​(java.sql.ResultSet result,
                                     AttributeDescriptor<T> attributeDescriptor)