java.lang.Object
org.pgcodekeeper.core.database.base.schema.Argument
All Implemented Interfaces:
Serializable, IArgument, IHashable
Direct Known Subclasses:
PgAbstractFunction.PgArgument

public class Argument extends Object implements IArgument, Serializable, IHashable
Represents a function argument with its mode, name, data type, and default value. Used for storing parameter information for functions, procedures, and aggregates across different database types.
See Also:
  • Constructor Details

  • Method Details

    • getDataType

      public String getDataType()
      Specified by:
      getDataType in interface IArgument
    • getDefaultExpression

      public String getDefaultExpression()
      Specified by:
      getDefaultExpression in interface IArgument
    • setDefaultExpression

      public void setDefaultExpression(String defaultExpression)
      Specified by:
      setDefaultExpression in interface IArgument
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface IArgument
    • setReadOnly

      public void setReadOnly(boolean isReadOnly)
      Specified by:
      setReadOnly in interface IArgument
    • getMode

      public ArgMode getMode()
      Specified by:
      getMode in interface IArgument
    • getName

      public String getName()
      Specified by:
      getName in interface IArgument
    • appendDeclaration

      public void appendDeclaration(StringBuilder sbString, boolean includeDefaultValue, boolean includeArgName, UnaryOperator<String> quoter)
      Description copied from interface: IArgument
      Appends the argument declaration to a StringBuilder.
      Specified by:
      appendDeclaration in interface IArgument
      Parameters:
      sbString - the StringBuilder to append to
      includeDefaultValue - whether to include the default value
      includeArgName - whether to include the argument name
      quoter - quoter for arguments
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getCopy

      public Argument getCopy()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Specified by:
      computeHash in interface IHashable
      Parameters:
      hasher - the hasher instance to use for hash computation