Module eclipselink
Class StoredProcedureDefinition
java.lang.Object
org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition
org.eclipse.persistence.tools.schemaframework.StoredProcedureDefinition
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
StoredFunctionDefinition
Purpose: Allow a semi-generic way of creating stored procedures.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<FieldDefinition> protected static final Integerprotected static final Integerprotected static final Integerprotected List<FieldDefinition> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgument(String argumentName, Class<?> type) The arguments are the names of the parameters to the procedure.voidaddArgument(String argumentName, Class<?> type, int size) The arguments are the names of the parameters to the procedure.voidaddArgument(String argumentName, String typeName) The arguments are the names of the parameters to the procedure.voidaddArgument(FieldDefinition argument) The arguments are the names of the parameters to the procedure.voidaddCharacteristic(String characteristic) Add characteristic into the characteristics section of function/procedure.voidaddInOutputArgument(String argumentName, Class<?> type) The output arguments are used to get values back from the proc.voidaddInOutputArgument(FieldDefinition argument) The output arguments are used to get values back from the proc, such as cursors.voidaddOutputArgument(String argumentName, Class<?> type) The output arguments are used to get values back from the proc.voidaddOutputArgument(String argumentName, Class<?> type, int size) The output arguments are used to get values back from the proc.voidaddOutputArgument(String argumentName, String typeName) The output arguments are used to get values back from the proc, such as cursors.voidaddOutputArgument(FieldDefinition argument) The output arguments are used to get values back from the proc, such as cursors.voidaddStatement(String statement) The statements are the SQL lines of code in procedure.voidaddVariable(String variableName, String typeName) The variables are the names of the declared variables used in the procedure.voidaddVariable(FieldDefinition variable) The variables are the names of the declared variables used in the procedure.buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.The arguments are the names of the parameters to the procedure.The characteristic section in procedure.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intThe statements are the SQL lines of code in procedure.The variables are the names of the declared variables used in the procedure.protected voidprintArgument(FieldDefinition argument, Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.protected voidprintInOutputArgument(FieldDefinition argument, Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.protected voidprintOutputArgument(FieldDefinition argument, Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.protected voidprintReturn(Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) Deprecated, for removal: This API element is subject to removal in a future version.voidsetArguments(List<FieldDefinition> arguments) The arguments are the field defs of the parameters names and types to the procedure.voidsetStatements(List<String> statements) The statements are the SQL lines of code in procedure.voidsetVariables(List<FieldDefinition> 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
buildVPDCreationFunctionWriter, buildVPDCreationPolicyWriter, buildVPDDeletionWriter, clone, createDatabaseSchema, createDatabaseSchemaOnDatabase, createObject, createOnDatabase, dropDatabaseSchema, dropDatabaseSchemaOnDatabase, dropFromDatabase, dropObject, getDatabaseSchema, getFullName, getName, getQualifier, hasDatabaseSchema, postCreateObject, preDropObject, setName, setQualifier, shouldCreateDatabaseSchema, shouldCreateVPDCalls, toString
-
Field Details
-
variables
-
characteristics
-
statements
-
arguments
-
argumentTypes
-
IN
-
OUT
-
INOUT
-
-
Constructor Details
-
StoredProcedureDefinition
public StoredProcedureDefinition()
-
-
Method Details
-
addArgument
The arguments are the names of the parameters to the procedure. -
addArgument
The arguments are the names of the parameters to the procedure. -
addArgument
The arguments are the names of the parameters to the procedure. -
addArgument
The arguments are the names of the parameters to the procedure. -
addInOutputArgument
The output arguments are used to get values back from the proc. -
addInOutputArgument
The output arguments are used to get values back from the proc, such as cursors. -
addOutputArgument
The output arguments are used to get values back from the proc. -
addOutputArgument
The output arguments are used to get values back from the proc. -
addOutputArgument
The output arguments are used to get values back from the proc, such as cursors. -
addOutputArgument
The output arguments are used to get values back from the proc, such as cursors. -
addStatement
The statements are the SQL lines of code in procedure. -
addCharacteristic
Add characteristic into the characteristics section of function/procedure.- Parameters:
characteristic- the function/procedure characteristic
-
addVariable
The variables are the names of the declared variables used in the procedure. -
addVariable
The variables are the names of the declared variables used in the procedure. -
buildCreationWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildCreationWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the create table statement.- Specified by:
buildCreationWriterin classDatabaseObjectDefinition- Throws:
ValidationException
-
buildDeletionWriter
@Deprecated(forRemoval=true, since="4.0.9") public Writer buildDeletionWriter(org.eclipse.persistence.internal.sessions.AbstractSession session, Writer writer) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.INTERNAL: Return the drop table statement.- Specified by:
buildDeletionWriterin classDatabaseObjectDefinition- Throws:
ValidationException
-
getArguments
The arguments are the names of the parameters to the procedure. -
getCreationHeader
Deprecated, for removal: This API element is subject to removal in a future version. -
getDeletionHeader
Deprecated, for removal: This API element is subject to removal in a future version. -
getFirstArgumentIndex
public int getFirstArgumentIndex() -
getArgumentTypes
-
getStatements
The statements are the SQL lines of code in procedure. -
getCharacteristics
The characteristic section in procedure. E.g.COMMENT <string>,DETERMINISTIC,MODIFIES SQL DATA,NO SQL, ... . -
getVariables
The variables are the names of the declared variables used in the procedure. -
printArgument
@Deprecated(forRemoval=true, since="4.0.9") protected void printArgument(FieldDefinition argument, Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Print the argument and its type.- Parameters:
argument- Stored procedure argument.writer- Target writer where to write argument string.session- Current session context.- Throws:
IOException- When any IO problem occurs.
-
printInOutputArgument
@Deprecated(forRemoval=true, since="4.0.9") protected void printInOutputArgument(FieldDefinition argument, Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.Print the argument and its type.- Parameters:
argument- Stored procedure argument.writer- Target writer where to write argument string.session- Current session context.- Throws:
ValidationException- When invalid or inconsistent data were found.
-
printOutputArgument
@Deprecated(forRemoval=true, since="4.0.9") protected void printOutputArgument(FieldDefinition argument, Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.Print the argument and its type.- Parameters:
argument- Stored procedure argument.writer- Target writer where to write argument string.session- Current session context.- Throws:
ValidationException- When invalid or inconsistent data were found.
-
printReturn
@Deprecated(forRemoval=true, since="4.0.9") protected void printReturn(Writer writer, org.eclipse.persistence.internal.sessions.AbstractSession session) throws ValidationException Deprecated, for removal: This API element is subject to removal in a future version.Prints return for stored function, nothing to do for stored procedure- Throws:
ValidationException
-
setArguments
The arguments are the field defs of the parameters names and types to the procedure. -
setStatements
The statements are the SQL lines of code in procedure. -
setVariables
The variables are the field defs of the declared variables used in the procedure.
-