Class SystemVariables


  • public class SystemVariables
    extends Object
    Encapsulates a set of a database's system variables.
    Author:
    Randall Hauch
    • Method Detail

      • setVariable

        public SystemVariables setVariable​(SystemVariables.Scope scope,
                                           String name,
                                           String value)
        Set the variable with the specified scope.
        Parameters:
        scope - the variable scope; may be null if the session scope is to be used
        name - the name of the variable; may not be null
        value - the variable value; may be null if the value for the named variable is to be removed
        Returns:
        this object for method chaining purposes; never null
      • getVariable

        public String getVariable​(String name,
                                  SystemVariables.Scope scope)
        Get the variable with the specified name and scope.
        Parameters:
        name - the name of the variable; may not be null
        scope - the variable scope; may not be null
        Returns:
        the variable value; may be null if the variable is not currently set
      • getVariable

        public String getVariable​(String name)
        Get the variable with the specified name, from the highest priority scope that contain it.
        Parameters:
        name - the name of the variable; may not be null
        Returns:
        the variable value; may be null if the variable is not currently set
      • variableName

        private String variableName​(String name)