Class CreateProcedureCommand

  • All Implemented Interfaces:
    Cloneable, LanguageObject

    public class CreateProcedureCommand
    extends Command

    This class represents a update procedure in the storedprocedure language. It extends the Command and represents the command for Insert , Update and Delete procedures.

    • Constructor Detail

      • CreateProcedureCommand

        public CreateProcedureCommand()
        Constructor for CreateUpdateProcedureCommand.
      • CreateProcedureCommand

        public CreateProcedureCommand​(Block block)
        Constructor for CreateUpdateProcedureCommand.
        Parameters:
        block - The block on this command
    • Method Detail

      • getType

        public int getType()
        Return type of command to make it easier to build switch statements by command type.
        Specified by:
        getType in class Command
        Returns:
        The type of this command
      • getBlock

        public Block getBlock()
        Get the block on this command.
        Returns:
        The Block on this command
      • setBlock

        public void setBlock​(Block block)
        Set the block on this command.
        Parameters:
        block - The Block on this command
      • acceptVisitor

        public void acceptVisitor​(LanguageVisitor visitor)
        Description copied from interface: LanguageObject
        Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.
        Parameters:
        visitor - Visitor being used
      • clone

        public Object clone()
        Deep clone statement to produce a new identical statement.
        Specified by:
        clone in interface LanguageObject
        Specified by:
        clone in class Command
        Returns:
        Deep clone
      • equals

        public boolean equals​(Object obj)
        Compare two CreateUpdateProcedureCommand for equality. They will only evaluate to equal if they are IDENTICAL: the commandTypes are same and the block objects are equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - Other object
        Returns:
        True if equal
      • hashCode

        public int hashCode()
        Get hashcode for CreateUpdateProcedureCommand. WARNING: This hash code relies on the hash codes of the block and the procedure type of this command. Hash code is only valid after the command has been completely constructed.
        Overrides:
        hashCode in class Object
        Returns:
        Hash code
      • toString

        public String toString()
        Returns a string representation of an instance of this class.
        Overrides:
        toString in class Command
        Returns:
        String representation of object
      • getProjectedSymbols

        public List getProjectedSymbols()
        Get the ordered list of all elements returned by this query. These elements may be ElementSymbols or ExpressionSymbols but in all cases each represents a single column.
        Specified by:
        getProjectedSymbols in class Command
        Returns:
        Ordered list of SingleElementSymbol
      • getResultSetColumns

        public List<? extends Expression> getResultSetColumns()
        Overrides:
        getResultSetColumns in class Command
        Returns:
        null if unknown, empty if results are not returned, or the resultset columns
      • setResultSetColumns

        public void setResultSetColumns​(List<? extends Expression> resultSetColumns)
      • setProjectedSymbols

        public void setProjectedSymbols​(List projSymbols)
        Parameters:
        projSymbols -
      • getVirtualGroup

        public GroupSymbol getVirtualGroup()
      • setVirtualGroup

        public void setVirtualGroup​(GroupSymbol virtualGroup)
      • setUpdateType

        public void setUpdateType​(int type)
      • getUpdateType

        public int getUpdateType()
      • setReturnVariable

        public void setReturnVariable​(ElementSymbol symbol)