Class CpoFunction

java.lang.Object
org.synchronoss.cpo.core.meta.bean.CpoFunctionBean
org.synchronoss.cpo.core.meta.domain.CpoFunction
All Implemented Interfaces:
Serializable

public class CpoFunction extends CpoFunctionBean
Runtime metadata for a single CPO function: extends CpoFunctionBean's name/expression/ description with the ordered list of CpoArguments bound to the function's positional bind markers.
Author:
dberry
See Also:
  • Constructor Details

    • CpoFunction

      public CpoFunction()
      Creates an empty instance.
  • Method Details

    • getArguments

      public List<CpoArgument> getArguments()
      Gets the arguments bound to this function's bind markers, in bind-marker order.
      Returns:
      the bound arguments
    • addArgument

      public void addArgument(CpoArgument argument)
      Appends an argument to this function's argument list. A no-op if argument is null.
      Parameters:
      argument - the argument to add
    • removeArgument

      public boolean removeArgument(CpoArgument argument)
      Removes an argument from this function's argument list.
      Parameters:
      argument - the argument to remove
      Returns:
      true if the argument was found and removed, false otherwise
    • removeArgument

      public boolean removeArgument(int index)
      Removes the argument at the given position in this function's argument list.
      Parameters:
      index - the position of the argument to remove
      Returns:
      true if index was in range and the argument was removed, false otherwise
    • parameterToString

      public String parameterToString(CpoFunction function)
      Builds a diagnostic string describing function's argument list: each argument's bound attribute Java type, for debugging/logging purposes.
      Parameters:
      function - the function whose arguments should be described, may be null
      Returns:
      a diagnostic description of the argument list, or " null function." if function is null
    • toString

      public String toString()

      Returns this function's name.

      Overrides:
      toString in class CpoFunctionBean
    • toStringFull

      public String toStringFull()
      Gets the full field-by-field string representation of this function, as produced by CpoFunctionBean.toString().
      Returns:
      the full string representation