org.teiid.query.sql.proc
Class RaiseErrorStatement

java.lang.Object
  extended by org.teiid.query.sql.proc.Statement
      extended by org.teiid.query.sql.proc.RaiseErrorStatement
All Implemented Interfaces:
java.lang.Cloneable, LanguageObject, ExpressionStatement

public class RaiseErrorStatement
extends Statement
implements ExpressionStatement

This class represents a error assignment statement in the storedprocedure language. It extends the Statement that could part of a Block. This this object holds and error message.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
 
Field Summary
 
Fields inherited from class org.teiid.query.sql.proc.Statement
TYPE_ASSIGNMENT, TYPE_BREAK, TYPE_COMMAND, TYPE_CONTINUE, TYPE_DECLARE, TYPE_ERROR, TYPE_IF, TYPE_LOOP, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_WHILE
 
Constructor Summary
RaiseErrorStatement()
          Constructor for RaiseErrorStatement.
RaiseErrorStatement(Expression message)
          Constructor for RaiseErrorStatement.
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 RaiseErrorStatement clone()
          Deep clone statement to produce a new identical statement.
 boolean equals(java.lang.Object obj)
           
 java.lang.Class<?> getExpectedType()
           
 Expression getExpression()
           
 int getType()
          Return type of statement to make it easier to build switch statements by statement type.
 int hashCode()
           
 void setExpression(Expression expression)
           
 
Methods inherited from class org.teiid.query.sql.proc.Statement
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RaiseErrorStatement

public RaiseErrorStatement()
Constructor for RaiseErrorStatement.


RaiseErrorStatement

public RaiseErrorStatement(Expression message)
Constructor for RaiseErrorStatement.

Parameters:
message - The error message
Method Detail

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.

Specified by:
acceptVisitor in interface LanguageObject
Parameters:
visitor - Visitor being used

getExpression

public Expression getExpression()
Specified by:
getExpression in interface ExpressionStatement

setExpression

public void setExpression(Expression expression)
Specified by:
setExpression in interface ExpressionStatement

getType

public int getType()
Description copied from class: Statement
Return type of statement to make it easier to build switch statements by statement type.

Specified by:
getType in class Statement
Returns:
Type from TYPE constants
See Also:
AssignmentStatement.getType()

clone

public RaiseErrorStatement clone()
Description copied from class: Statement
Deep clone statement to produce a new identical statement.

Specified by:
clone in interface LanguageObject
Specified by:
clone in class Statement
Returns:
Deep clone

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getExpectedType

public java.lang.Class<?> getExpectedType()
Specified by:
getExpectedType in interface ExpressionStatement


Copyright © 2010. All Rights Reserved.