public class StoredProcedureDefinition extends DatabaseObjectDefinition
Modifier and Type | Field and Description |
---|---|
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 |
name, qualifier
Constructor and Description |
---|
StoredProcedureDefinition() |
Modifier and Type | Method and Description |
---|---|
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.
|
buildVPDCreationFunctionWriter, buildVPDCreationPolicyWriter, buildVPDDeletionWriter, clone, createDatabaseSchema, createDatabaseSchemaOnDatabase, createObject, createOnDatabase, dropDatabaseSchema, dropDatabaseSchemaOnDatabase, dropFromDatabase, dropObject, getDatabaseSchema, getFieldTypeDefinition, getFieldTypeDefinition, getFullName, getName, getQualifier, hasDatabaseSchema, postCreateObject, preDropObject, setName, setQualifier, shouldCreateDatabaseSchema, shouldCreateVPDCalls, toString
protected java.util.Vector variables
protected java.util.Vector statements
protected java.util.Vector arguments
protected java.util.Vector argumentTypes
protected static final java.lang.Integer IN
protected static final java.lang.Integer OUT
protected static final java.lang.Integer INOUT
public void addArgument(java.lang.String argumentName, java.lang.Class type)
public void addArgument(java.lang.String argumentName, java.lang.Class type, int size)
public void addArgument(java.lang.String argumentName, java.lang.String typeName)
public void addArgument(FieldDefinition argument)
public void addInOutputArgument(java.lang.String argumentName, java.lang.Class type)
public void addInOutputArgument(FieldDefinition argument)
public void addOutputArgument(java.lang.String argumentName, java.lang.Class type)
public void addOutputArgument(java.lang.String argumentName, java.lang.Class type, int size)
public void addOutputArgument(java.lang.String argumentName, java.lang.String typeName)
public void addOutputArgument(FieldDefinition argument)
public void addStatement(java.lang.String statement)
public void addVariable(java.lang.String variableName, java.lang.String typeName)
public void addVariable(FieldDefinition variable)
public java.io.Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationException
buildCreationWriter
in class DatabaseObjectDefinition
ValidationException
public java.io.Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, java.io.Writer writer) throws ValidationException
buildDeletionWriter
in class DatabaseObjectDefinition
ValidationException
public java.util.Vector getArguments()
public java.lang.String getCreationHeader()
public java.lang.String getDeletionHeader()
public int getFirstArgumentIndex()
public java.util.Vector getArgumentTypes()
public java.util.Vector getStatements()
public java.util.Vector getVariables()
protected void printArgument(FieldDefinition argument, java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws java.io.IOException
argument
- Stored procedure argument.writer
- Target writer where to write argument string.session
- Current session context.java.io.IOException
- When any IO problem occurs.protected void printInOutputArgument(FieldDefinition argument, java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws ValidationException
argument
- Stored procedure argument.writer
- Target writer where to write argument string.session
- Current session context.ValidationException
- When invalid or inconsistent data were found.protected void printOutputArgument(FieldDefinition argument, java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws ValidationException
argument
- Stored procedure argument.writer
- Target writer where to write argument string.session
- Current session context.ValidationException
- When invalid or inconsistent data were found.protected void printReturn(java.io.Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws ValidationException
ValidationException
public void setArguments(java.util.Vector arguments)
public void setStatements(java.util.Vector statements)
public void setVariables(java.util.Vector variables)