Class TableScheme<T,​E>

java.lang.Object
bayern.steinbrecher.dbConnector.scheme.TableScheme<T,​E>
Type Parameters:
T - The type representing the whole table.
E - The type of an entry of the table.

public class TableScheme<T,​E>
extends java.lang.Object
Represents a table and all patterns for its required and optional columns.
Since:
0.1
  • Constructor Summary

    Constructors 
    Constructor Description
    TableScheme​(@NotNull java.lang.String tableName, @NotNull java.util.Collection<SimpleColumnPattern<?,​E>> requiredColumns, @NotNull java.util.Collection<ColumnPattern<?,​E>> optionalColumns, @NotNull java.util.function.Supplier<E> emptyEntrySupplier, @NotNull java.util.function.Function<java.util.stream.Stream<E>,​T> reducer)  
  • Method Summary

    Modifier and Type Method Description
    @NotNull java.util.Collection<ColumnPattern<?,​E>> getOptionalColumns()  
    @NotNull java.util.Collection<SimpleColumnPattern<?,​E>> getRequiredColumns()  
    @NotNull java.lang.String getTableName()  
    T parseFrom​(@NotNull java.util.List<java.util.List<java.lang.String>> queryResult)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TableScheme

      public TableScheme​(@NotNull @NotNull java.lang.String tableName, @NotNull @NotNull java.util.Collection<SimpleColumnPattern<?,​E>> requiredColumns, @NotNull @NotNull java.util.Collection<ColumnPattern<?,​E>> optionalColumns, @NotNull @NotNull java.util.function.Supplier<E> emptyEntrySupplier, @NotNull @NotNull java.util.function.Function<java.util.stream.Stream<E>,​T> reducer)
  • Method Details

    • parseFrom

      @NotNull public T parseFrom​(@NotNull @NotNull java.util.List<java.util.List<java.lang.String>> queryResult)
      Since:
      0.1
    • getTableName

      @NotNull public @NotNull java.lang.String getTableName()
      Since:
      0.1
    • getRequiredColumns

      @NotNull public @NotNull java.util.Collection<SimpleColumnPattern<?,​E>> getRequiredColumns()
      Since:
      0.1
    • getOptionalColumns

      @NotNull public @NotNull java.util.Collection<ColumnPattern<?,​E>> getOptionalColumns()
      Since:
      0.1
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
      Since:
      0.14