EclipseLink 2.0.0, build 'v20091127-r5931' API Reference

org.eclipse.persistence.tools.schemaframework
Class StoredProcedureDefinition

java.lang.Object
  extended by org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
      extended by org.eclipse.persistence.tools.schemaframework.StoredProcedureDefinition
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
StoredFunctionDefinition

public class StoredProcedureDefinition
extends DatabaseObjectDefinition

Purpose: Allow a semi-generic way of creating store procedures.

See Also:
Serialized Form

Field Summary
protected  java.util.Vector arguments
           
protected  java.util.Vector argumentTypes
           
protected static java.lang.Integer IN
           
protected static java.lang.Integer INOUT
           
protected static java.lang.Integer OUT
           
protected  java.util.Vector statements
           
protected  java.util.Vector variables
           
 
Fields inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
name, qualifier
 
Constructor Summary
StoredProcedureDefinition()
           
 
Method Summary
 void addArgument(FieldDefinition argument)
          The arguments are the names of the parameters to the procedure.
 void addArgument(java.lang.String argumentName, java.lang.Class type)
          The arguments are the names of the parameters to the procedure.
 void addArgument(java.lang.String argumentName, java.lang.Class type, int size)
          The arguments are the names of the parameters to the procedure.
 void addArgument(java.lang.String argumentName, java.lang.String typeName)
          The arguments are the names of the parameters to the procedure.
 void addInOutputArgument(FieldDefinition argument)
          The output arguments are used to get values back from the proc, such as cursors.
 void addInOutputArgument(java.lang.String argumentName, java.lang.Class type)
          The output arguments are used to get values back from the proc.
 void addOutputArgument(FieldDefinition argument)
          The output arguments are used to get values back from the proc, such as cursors.
 void addOutputArgument(java.lang.String argumentName, java.lang.Class type)
          The output arguments are used to get values back from the proc.
 void addOutputArgument(java.lang.String argumentName, java.lang.Class type, int size)
          The output arguments are used to get values back from the proc.
 void addOutputArgument(java.lang.String argumentName, java.lang.String typeName)
          The output arguments are used to get values back from the proc, such as cursors.
 void addStatement(java.lang.String statement)
          The statements are the SQL lines of code in procedure.
 void addVariable(FieldDefinition variable)
          The variables are the names of the declared variables used in the procedure.
 void addVariable(java.lang.String variableName, java.lang.String typeName)
          The variables are the names of the declared variables used in the procedure.
 java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Return the create table statement.
 java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer)
          INTERNAL: Return the drop table statement.
 java.util.Vector getArguments()
          The arguments are the names of the parameters to the procedure.
 java.util.Vector getArgumentTypes()
           
 java.lang.String getCreationHeader()
           
 java.lang.String getDeletionHeader()
           
 int getFirstArgumentIndex()
           
 java.util.Vector getStatements()
          The statements are the SQL lines of code in procedure.
 java.util.Vector getVariables()
          The variables are the names of the declared variables used in the procedure.
protected  void printArgument(FieldDefinition argument, java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session)
          Print the argument and its type.
protected  void printInOutputArgument(FieldDefinition argument, java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session)
          Print the argument and its type.
protected  void printOutputArgument(FieldDefinition argument, java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session)
          Print the argument and its type.
protected  void printReturn(java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session)
          Prints return for stored function, nothing to do for stored procedure
 void setArguments(java.util.Vector arguments)
          The arguments are the field defs of the parameters names and types to the procedure.
 void setStatements(java.util.Vector statements)
          The statements are the SQL lines of code in procedure.
 void setVariables(java.util.Vector variables)
          The variables are the field defs of the declared variables used in the procedure.
 
Methods inherited from class org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
clone, createObject, createOnDatabase, dropFromDatabase, dropObject, getFullName, getName, getQualifier, postCreateObject, setName, setQualifier, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

variables

protected java.util.Vector variables

statements

protected java.util.Vector statements

arguments

protected java.util.Vector arguments

argumentTypes

protected java.util.Vector argumentTypes

IN

protected static final java.lang.Integer IN

OUT

protected static final java.lang.Integer OUT

INOUT

protected static final java.lang.Integer INOUT
Constructor Detail

StoredProcedureDefinition

public StoredProcedureDefinition()
Method Detail

addArgument

public void addArgument(java.lang.String argumentName,
                        java.lang.Class type)
The arguments are the names of the parameters to the procedure.


addArgument

public void addArgument(java.lang.String argumentName,
                        java.lang.Class type,
                        int size)
The arguments are the names of the parameters to the procedure.


addArgument

public void addArgument(java.lang.String argumentName,
                        java.lang.String typeName)
The arguments are the names of the parameters to the procedure.


addArgument

public void addArgument(FieldDefinition argument)
The arguments are the names of the parameters to the procedure.


addInOutputArgument

public void addInOutputArgument(java.lang.String argumentName,
                                java.lang.Class type)
The output arguments are used to get values back from the proc.


addInOutputArgument

public void addInOutputArgument(FieldDefinition argument)
The output arguments are used to get values back from the proc, such as cursors.


addOutputArgument

public void addOutputArgument(java.lang.String argumentName,
                              java.lang.Class type)
The output arguments are used to get values back from the proc.


addOutputArgument

public void addOutputArgument(java.lang.String argumentName,
                              java.lang.Class type,
                              int size)
The output arguments are used to get values back from the proc.


addOutputArgument

public void addOutputArgument(java.lang.String argumentName,
                              java.lang.String typeName)
The output arguments are used to get values back from the proc, such as cursors.


addOutputArgument

public void addOutputArgument(FieldDefinition argument)
The output arguments are used to get values back from the proc, such as cursors.


addStatement

public void addStatement(java.lang.String statement)
The statements are the SQL lines of code in procedure.


addVariable

public void addVariable(java.lang.String variableName,
                        java.lang.String typeName)
The variables are the names of the declared variables used in the procedure.


addVariable

public void addVariable(FieldDefinition variable)
The variables are the names of the declared variables used in the procedure.


buildCreationWriter

public java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                          java.io.Writer writer)
                                   throws ValidationException
INTERNAL: Return the create table statement.

Specified by:
buildCreationWriter in class DatabaseObjectDefinition
Throws:
ValidationException

buildDeletionWriter

public java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                          java.io.Writer writer)
                                   throws ValidationException
INTERNAL: Return the drop table statement.

Specified by:
buildDeletionWriter in class DatabaseObjectDefinition
Throws:
ValidationException

getArguments

public java.util.Vector getArguments()
The arguments are the names of the parameters to the procedure.


getCreationHeader

public java.lang.String getCreationHeader()

getDeletionHeader

public java.lang.String getDeletionHeader()

getFirstArgumentIndex

public int getFirstArgumentIndex()

getArgumentTypes

public java.util.Vector getArgumentTypes()

getStatements

public java.util.Vector getStatements()
The statements are the SQL lines of code in procedure.


getVariables

public java.util.Vector getVariables()
The variables are the names of the declared variables used in the procedure.


printArgument

protected void printArgument(FieldDefinition argument,
                             java.io.Writer writer,
                             org.eclipse.persistence.internal.sessions.AbstractSession session)
                      throws java.io.IOException
Print the argument and its type.

Throws:
java.io.IOException

printInOutputArgument

protected void printInOutputArgument(FieldDefinition argument,
                                     java.io.Writer writer,
                                     org.eclipse.persistence.internal.sessions.AbstractSession session)
                              throws ValidationException
Print the argument and its type.

Throws:
ValidationException

printOutputArgument

protected void printOutputArgument(FieldDefinition argument,
                                   java.io.Writer writer,
                                   org.eclipse.persistence.internal.sessions.AbstractSession session)
                            throws ValidationException
Print the argument and its type.

Throws:
ValidationException

printReturn

protected void printReturn(java.io.Writer writer,
                           org.eclipse.persistence.internal.sessions.AbstractSession session)
                    throws ValidationException
Prints return for stored function, nothing to do for stored procedure

Throws:
ValidationException

setArguments

public void setArguments(java.util.Vector arguments)
The arguments are the field defs of the parameters names and types to the procedure.


setStatements

public void setStatements(java.util.Vector statements)
The statements are the SQL lines of code in procedure.


setVariables

public void setVariables(java.util.Vector variables)
The variables are the field defs of the declared variables used in the procedure.


EclipseLink 2.0.0, build 'v20091127-r5931' API Reference