Interface EntityFieldDbAdapter<T>

    • Method Detail

      • getTable

        DataTable getTable()
        Returns:
        the table this entity fields maps to
      • getTableFields

        java.util.stream.Stream<org.jooq.TableField<org.jooq.Record,​?>> getTableFields()
        Returns:
        the table fields this entity field maps to
      • getFirstTableField

        default org.jooq.TableField<org.jooq.Record,​?> getFirstTableField()
        Returns:
        the first table field that this entity field maps to
        Throws:
        java.lang.IllegalStateException - if there are no fields
      • getDbValues

        java.util.stream.Stream<java.lang.Object> getDbValues​(T value)
        Parameters:
        value - value of entity field to translate
        Returns:
        the values for the fields returned by getTableFields(), in the same order
      • getFirstDbValue

        default java.lang.Object getFirstDbValue​(T value)
        Parameters:
        value - value of entity field to translate
        Returns:
        the first value for the fields returned by getTableFields(), in field order
        Throws:
        java.lang.IllegalStateException - if there are no fields
      • getFromRecord

        T getFromRecord​(java.util.Iterator<java.lang.Object> valuesIterator)
        Composes the value of the entity field out of values of individual table fields. The iterator passed to this method is positioned at the value of the first field returned by getTableFields() and the following values correspond to the rest of the fields in the same order.
        Parameters:
        valuesIterator - iterator positioned at the start of values for getTableFields()
        Returns:
        the value of entity field composed out of DB values taken from the supplied iterator
      • isIdentityField

        default boolean isIdentityField()