Interface SQLFunction

  • All Superinterfaces:
    Column
    All Known Implementing Classes:
    AbstractFunction, AggregateFunction, Avg, Count, Max, Min, Sum

    public interface SQLFunction
    extends Column
    Define the basic methods that classes that support SQL Functions need to implement for Classes that use them. This is intended to allow code to be written before functions are fully integrated with the DBAdaptors. As well as allowing for functions to expand as needed.
    Version:
    $Id: SQLFunction.java 1855244 2019-03-11 15:59:16Z tv $
    Author:
    Greg Monroe
    • Method Detail

      • getArgument

        Object getArgument​(int i)
        Returns the function parameters at index i. Should be null if parameter does not exist.
        Parameters:
        i - The 0 based parameter to get.
        Returns:
        The parameter. Null if one does not exist.
      • getColumn

        Column getColumn()
        Returns the column to which this function is applied.
        Returns:
        the column, not null.
        Throws:
        IllegalStateException - if the column cannot be determined.
      • getArguments

        Object[] getArguments()
        Return all the parameters as an object array. This allow for processing of the parameters in their original format rather than just in String format. E.g. a parameter might be specified as a Date object, or a Column object.
        Returns:
        Should return a valid Object array and not null. E.g. implementors should return new Object[0] if there are no parameters.
      • setArguments

        void setArguments​(Object... args)
        Sets the function specific arguments. Note, this should generally only be called by FunctionFactory.
        Parameters:
        args - The function specific arguments.