Class RegexColumnPattern<T,​U,​K>

java.lang.Object
bayern.steinbrecher.dbConnector.scheme.ColumnPattern<T,​U>
bayern.steinbrecher.dbConnector.scheme.RegexColumnPattern<T,​U,​K>
Type Parameters:
T - The type of the column content.
U - The type of object to set the content of this column to.
K - The type of the key to distinguish the columns matching this pattern.

public class RegexColumnPattern<T,​U,​K>
extends ColumnPattern<T,​U>
Represents a ColumnPattern which may match a range of column names instead of a specific one like SimpleColumnPattern.
Since:
0.1
See Also:
SimpleColumnPattern
  • Constructor Summary

    Constructors 
    Constructor Description
    RegexColumnPattern​(@NotNull java.lang.String columnNamePattern, @NotNull ColumnParser<T> parser, @NotNull TriFunction<U,​K,​T,​U> setter, @NotNull java.util.function.Function<java.lang.String,​K> keyExtractor)
    Creates a column pattern possibly matching multiple column names.
  • Method Summary

    Modifier and Type Method Description
    protected U combineImpl​(U toSet, @NotNull java.lang.String columnName, T value)  

    Methods inherited from class bayern.steinbrecher.dbConnector.scheme.ColumnPattern

    combine, equals, getColumnNamePattern, getParser, hashCode, matches, toString

    Methods inherited from class java.lang.Object

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

    • RegexColumnPattern

      public RegexColumnPattern​(@NotNull @NotNull java.lang.String columnNamePattern, @NotNull @NotNull ColumnParser<T> parser, @NotNull @NotNull TriFunction<U,​K,​T,​U> setter, @NotNull @NotNull java.util.function.Function<java.lang.String,​K> keyExtractor)
      Creates a column pattern possibly matching multiple column names. This constructor may be used if RegexColumnPattern is an immutable type.
      Parameters:
      columnNamePattern - The pattern of column names to match.
      parser - The parser to convert values from and to a SQL representation.
      setter - The function used to set a parsed value to a given object. The setter should only return a new object of type RegexColumnPattern if the handed in one is immutable.
      keyExtractor - Extracts the key for a given column name matching this pattern.
      Since:
      0.1
      See Also:
      ColumnPattern(String, ColumnParser)
  • Method Details