Class Helpers

java.lang.Object
io.github.torand.fastersql.statement.Helpers

public final class Helpers extends Object
Provides statement utility functions.
  • Method Details

    • paramMarkers

      public static String paramMarkers(long count)
      Generates a string with comma separated statement parameter markers.
      Parameters:
      count - the number of parameter markers.
      Returns:
      the generated parameter marker string.
    • unwrapOptional

      public static Object unwrapOptional(Object obj)
      Returns the wrapped object if specified object is an optional, else returns the object itself.
      Parameters:
      obj - the object.
      Returns:
      the unwrapped object.
    • unwrapSuppliers

      @SafeVarargs public static <T> Collection<T> unwrapSuppliers(Supplier<T>... suppliers)
      Returns a collection of non-null values produces by the specified suppliers.
      Type Parameters:
      T - the supplier value type.
      Parameters:
      suppliers - the suppliers.
      Returns:
      the collection of supplied values.