|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DB2Routine
A representation of the model object 'DB2 Routine'. SQL Reference for Cross-Platform Development - v1.1 http://www7b.software.ibm.com/dmdd/library/techarticle/0206sqlref/0206sqlref.html Routines (Chapter 1. Concepts 9): A routine is an executable SQL object. There are two types of routines. Functions: A function is a routine that can be invoked from within other SQL statements and returns a value, or a table. A function is created with the CREATE FUNCTION statement. Procedures: A procedure (sometimes called a stored procedure) is a routine that can be called to perform operations that can include both host language statements and SQL statements.
The following features are supported:
Fenced
Threadsafe
Db Info
Implicit Schema
Federated
Parm Ccsid
Special Register
Change State
Debug Id
Program Type
Orig Schema Name
Orig Parm Sig
Extended Options
Routine Extensions
DB2ModelPackage.getDB2Routine()
Field Summary | |
---|---|
static int |
CLEAN
Pseudo-enumerated value for changeState. |
static int |
DIRTY
Pseudo-enumerated value for changeState. |
static int |
DIRTY_DDL
Pseudo-enumerated value for changeState. |
Method Summary | |
---|---|
int |
getChangeState()
Returns the value of the 'Change State' attribute. |
java.lang.String |
getDebugId()
Returns the value of the 'Debug Id' attribute. |
org.eclipse.emf.common.util.EList |
getExtendedOptions()
Returns the value of the 'Extended Options' containment reference list. |
java.lang.String |
getFenced()
Returns the value of the 'Fenced' attribute. |
java.lang.String |
getOrigParmSig()
Returns the value of the 'Orig Parm Sig' attribute. |
java.lang.String |
getOrigSchemaName()
Returns the value of the 'Orig Schema Name' attribute. |
java.lang.String |
getParmCcsid()
Returns the value of the 'Parm Ccsid' attribute. |
java.lang.String |
getProgramType()
Returns the value of the 'Program Type' attribute. |
org.eclipse.emf.common.util.EList |
getRoutineExtensions()
Returns the value of the 'Routine Extensions' reference list. |
java.lang.String |
getSpecialRegister()
Returns the value of the 'Special Register' attribute. |
java.lang.String |
getThreadsafe()
Returns the value of the 'Threadsafe' attribute. |
boolean |
isDbInfo()
Returns the value of the 'Db Info' attribute. |
boolean |
isFederated()
Returns the value of the 'Federated' attribute. |
boolean |
isImplicitSchema()
Returns the value of the 'Implicit Schema' attribute. |
void |
setChangeState(int value)
Sets the value of the ' Change State ' attribute. |
void |
setDbInfo(boolean value)
Sets the value of the ' Db Info ' attribute. |
void |
setDebugId(java.lang.String value)
Sets the value of the ' Debug Id ' attribute. |
void |
setFederated(boolean value)
Sets the value of the ' Federated ' attribute. |
void |
setFenced(java.lang.String value)
Sets the value of the ' Fenced ' attribute. |
void |
setImplicitSchema(boolean value)
Sets the value of the ' Implicit Schema ' attribute. |
void |
setOrigParmSig(java.lang.String value)
Sets the value of the ' Orig Parm Sig ' attribute. |
void |
setOrigSchemaName(java.lang.String value)
Sets the value of the ' Orig Schema Name ' attribute. |
void |
setParmCcsid(java.lang.String value)
Sets the value of the ' Parm Ccsid ' attribute. |
void |
setProgramType(java.lang.String value)
Sets the value of the ' Program Type ' attribute. |
void |
setSpecialRegister(java.lang.String value)
Sets the value of the ' Special Register ' attribute. |
void |
setThreadsafe(java.lang.String value)
Sets the value of the ' Threadsafe ' attribute. |
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.routines.Routine |
---|
getAuthorizationID, getCreationTS, getExternalName, getInputParameters, getLanguage, getLastAlteredTS, getOutputParameters, getParameters, getParameterStyle, getSchema, getSecurity, getSource, getSpecificName, getSqlDataAccess, isDeterministic, setAuthorizationID, setCreationTS, setDeterministic, setExternalName, setLanguage, setLastAlteredTS, setParameterStyle, setSchema, setSecurity, setSource, setSpecificName, setSqlDataAccess |
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject |
---|
addEAnnotation, addEAnnotationDetail, getComments, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, getPrivileges, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel |
Methods inherited from interface org.eclipse.emf.ecore.sdo.EDataObject |
---|
getInstanceProperties |
Methods inherited from interface commonj.sdo.DataObject |
---|
createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, delete, get, get, get, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getBytes, getBytes, getBytes, getChar, getChar, getChar, getContainer, getContainmentProperty, getDataGraph, getDataObject, getDataObject, getDataObject, getDate, getDate, getDate, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getSequence, getSequence, getSequence, getShort, getShort, getShort, getString, getString, getString, getType, isSet, isSet, isSet, set, set, set, setBigDecimal, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBigInteger, setBoolean, setBoolean, setBoolean, setByte, setByte, setByte, setBytes, setBytes, setBytes, setChar, setChar, setChar, setDataObject, setDataObject, setDataObject, setDate, setDate, setDate, setDouble, setDouble, setDouble, setFloat, setFloat, setFloat, setInt, setInt, setInt, setList, setList, setList, setLong, setLong, setLong, setShort, setShort, setShort, setString, setString, setString, unset, unset, unset |
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement |
---|
getName, setName |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
---|
getEAnnotations |
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject |
---|
addEAnnotation, addEAnnotationDetail, getComments, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, getPrivileges, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel |
Methods inherited from interface org.eclipse.emf.ecore.sdo.EDataObject |
---|
getInstanceProperties |
Methods inherited from interface commonj.sdo.DataObject |
---|
createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, delete, get, get, get, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getBytes, getBytes, getBytes, getChar, getChar, getChar, getContainer, getContainmentProperty, getDataGraph, getDataObject, getDataObject, getDataObject, getDate, getDate, getDate, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getSequence, getSequence, getSequence, getShort, getShort, getShort, getString, getString, getString, getType, isSet, isSet, isSet, set, set, set, setBigDecimal, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBigInteger, setBoolean, setBoolean, setBoolean, setByte, setByte, setByte, setBytes, setBytes, setBytes, setChar, setChar, setChar, setDataObject, setDataObject, setDataObject, setDate, setDate, setDate, setDouble, setDouble, setDouble, setFloat, setFloat, setFloat, setInt, setInt, setInt, setList, setList, setList, setLong, setLong, setLong, setShort, setShort, setShort, setString, setString, setString, unset, unset, unset |
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement |
---|
getName, setName |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
---|
getEAnnotations |
Field Detail |
---|
static final int CLEAN
setChangeState(int);
,
Constant Field Valuesstatic final int DIRTY_DDL
setChangeState(int);
,
Constant Field Valuesstatic final int DIRTY
setChangeState(int);
,
Constant Field ValuesMethod Detail |
---|
java.lang.String getFenced()
setFenced(String)
,
DB2ModelPackage.getDB2Routine_Fenced()
void setFenced(java.lang.String value)
Fenced
' attribute.
value
- the new value of the 'Fenced' attribute.getFenced()
java.lang.String getThreadsafe()
setThreadsafe(String)
,
DB2ModelPackage.getDB2Routine_Threadsafe()
void setThreadsafe(java.lang.String value)
Threadsafe
' attribute.
value
- the new value of the 'Threadsafe' attribute.getThreadsafe()
boolean isDbInfo()
From the DB2 SQL Reference for Cross-Platform Development v1.1 http://www7b.software.ibm.com/dmdd/library/techarticle/0206sqlref/0206sqlref.html CREATE PROCEDURE (External): NO DBINFO or DBINFO Specifies whether additional status information is passed to the procedure when it is invoked. The default is NO DBINFO. NO DBINFO Additional information is not passed. DBINFO An additional argument is passed when the procedure is invoked. The argument is a structure that contains information such as the name of the current server, the application run-time authorization ID and identification of the version and release of the database manager that invoked the procedure. See "Database information in external routines (DBINFO)" on page 708 for further details. DBINFO can be specified only if PARAMETER STYLE DB2SQL is specified. Parameter passing for external functions or procedures written in C or COBOL This input argument is set by the database manager before invoking the program. It is only present if the CREATE FUNCTION statement for the routine specifies the DBINFO keyword. The argument is a structure whose definition is described in "Database information in external routines (DBINFO)" on page 708. The dbinfo argument is input only and any changes to the argument value made by the program are ignored by the database manager upon return from the program. From the v8.1 UDB documentation for external UDFs and stored procedures: Specifies whether specific information known by DB2 is passed to the stored procedure when it is invoked as an additional invocation-time argument (DBINFO) or not (NO DBINFO). NO DBINFO is the default. DBINFO is not supported for LANGUAGE OLE (SQLSTATE 42613). It is also not supported for PARAMETER STYLE JAVA or DB2GENERAL. If DBINFO is specified, a structure containing the following information is passed to the stored procedure: - Data base name - the name of the currently connected database. - Application ID - unique application ID which is established for each connection to the database. - Application Authorization ID - the application run-time authorization ID. - Code page - identifies the database code page. - Database version/release - identifies the version, release and modification level of the database server invoking the stored procedure. - Platform - contains the server's platform type. The DBINFO structure is common for all external routines and contains additional fields that are not relevant to procedures. CREATE PROCEDURE (External) From the os390 v7 SQL reference: Specifies whether specific information known by DB2 is passed to the stored procedure when it is invoked. NO DBINFO Additional information is not passed. NO DBINFO is the default. DBINFO An additional argument is passed when the stored procedure is invoked. The argument is a structure that contains information such as the application run-time authorization ID, the schema name, the name of a table or column that the procedure might be inserting into or updating, and identification of the database server that invoked the procedure. For details about the argument and its structure, see DB2 Application Programming and SQL Guide. DBINFO can be specified only if PARAMETER STYLE DB2SQL is specified. From the as400 SQL v5r1 SQL reference: DBINFO Indicates that the database manager should pass a structure containing status information to the function. Table 24 in the SQL reference contains a description of the DBINFO structure. Detailed information about the DBINFO structure can be found in include file SQLUDF in QSYSINC.H. DBINFO is only allowed with PARAMETER STYLE DB2SQL.
setDbInfo(boolean)
,
DB2ModelPackage.getDB2Routine_DbInfo()
void setDbInfo(boolean value)
Db Info
' attribute.
value
- the new value of the 'Db Info' attribute.isDbInfo()
boolean isImplicitSchema()
From the DB2 SQL Reference for Cross-Platform Development v1.1 http://www7b.software.ibm.com/dmdd/library/techarticle/0206sqlref/0206sqlref.html The routine name is implicitly or explicitly qualified with a schema name. If the routine is created without a schema, then it is created with an implicit schema. The implicit schema name is determined as follows: - For distinct type names, the database manager searches the SQL path and selects the first schema in the SQL path such that the data type exists in the schema. - For procedure names, the database manager searches the SQL path and selects the first schema in the SQL path such that the schema contains a procedure with the same name and the same number of parameters. - For function names, the database manager uses the SQL path in conjunction with function resolution, as described under "Function resolution" on page 94.
setImplicitSchema(boolean)
,
DB2ModelPackage.getDB2Routine_ImplicitSchema()
void setImplicitSchema(boolean value)
Implicit Schema
' attribute.
value
- the new value of the 'Implicit Schema' attribute.isImplicitSchema()
boolean isFederated()
From UDB v8.1 SQL Reference Volume 2 FEDERATED or NOT FEDERATED This optional clause specifies whether or not federated objects can be used. If NOT FEDERATED is specified, federated objects cannot be used in any SQL statement in the function or procedure . Using a federated object will result in an error (SQLSTATE 55047).
setFederated(boolean)
,
DB2ModelPackage.getDB2Routine_Federated()
void setFederated(boolean value)
Federated
' attribute.
value
- the new value of the 'Federated' attribute.isFederated()
java.lang.String getParmCcsid()
From the DB2 SQL Reference for Cross-Platform Development v1.1 http://www7b.software.ibm.com/dmdd/library/techarticle/0206sqlref/0206sqlref.html The meaning of the environment Coded Character Set Identifier (CCSID) depends on the application server where the routine is executed. - On DB2 UDB for z/OS and OS/390, the environment CCSIDs are the CCSIDs for the table accessed in the containing SQL statement. - On DB2 UDB for iSeries, the environment CCSIDs are the CCSIDs associated with the job. - On DB2 UDB for LUW, the environment CCSIDs are the CCSIDs for the relational database. DB2 Universal Database for OS/390 and z/OS v7 SQL Ref: Every string used in an SQL operation has a CCSID. The CCSID identifies the manner in which the characters in the string are encoded. Strings can be encoded in ASCII, EBCDIC, or Unicode. Many of the times, the default CCSID is used
setParmCcsid(String)
,
DB2ModelPackage.getDB2Routine_ParmCcsid()
void setParmCcsid(java.lang.String value)
Parm Ccsid
' attribute.
value
- the new value of the 'Parm Ccsid' attribute.getParmCcsid()
java.lang.String getSpecialRegister()
For UDB, in BNF diagrams above the line, INHERIT SPECIAL REGISTERS is the default. For zSeries, v7+ there is both INHERIT SPECIAL REGISTERS Indicates that the values of special registers are inherited according to the rules listed in the table for characteristics of special registers in a user-defined function or stored procedure in Table 19 on page 92. DEFAULT SPECIAL REGISTERS Indicates that special registers are initialized to the default values, as indicated by the rules in the table for characteristics of special registers in a user-defined function or stored procedure in Table 19 on page 92.
setSpecialRegister(String)
,
DB2ModelPackage.getDB2Routine_SpecialRegister()
void setSpecialRegister(java.lang.String value)
Special Register
' attribute.
value
- the new value of the 'Special Register' attribute.getSpecialRegister()
int getChangeState()
"0"
.
This replaces the "dirty" and "dirtyDDL" attributes in the WSAD v6 and previous SQL models.
changeState is integer for to indicate DIRTY source, or just dirty DDL (where an external routine doesn't
need to be recompiled, just dropped and registered).
Rather than use an enumerated type which is not extendable in EMF, this will have a
pseudo-enumerated type so that the db2 routines can be extended to hold more state
information than just DIRTY (2) and DIRTY_DDL (1), and CLEAN (0). CLEAN will be the default
as the initial value is set to 0.
setChangeState(int)
,
DB2ModelPackage.getDB2Routine_ChangeState()
void setChangeState(int value)
Change State
' attribute.
value
- the new value of the 'Change State' attribute.getChangeState()
java.lang.String getDebugId()
setDebugId(String)
,
DB2ModelPackage.getDB2Routine_DebugId()
void setDebugId(java.lang.String value)
Debug Id
' attribute.
value
- the new value of the 'Debug Id' attribute.getDebugId()
java.lang.String getProgramType()
From DB2 OS390 v7 SQL Reference:
The stored procedure runs as a main routine. The default for PROGRAM TYPE depends on the value of special register CURRENT RULES. The default is:
setProgramType(String)
,
DB2ModelPackage.getDB2Routine_ProgramType()
void setProgramType(java.lang.String value)
Program Type
' attribute.
value
- the new value of the 'Program Type' attribute.getProgramType()
java.lang.String getOrigSchemaName()
setOrigSchemaName(String)
,
DB2ModelPackage.getDB2Routine_OrigSchemaName()
void setOrigSchemaName(java.lang.String value)
Orig Schema Name
' attribute.
value
- the new value of the 'Orig Schema Name' attribute.getOrigSchemaName()
java.lang.String getOrigParmSig()
setOrigParmSig(String)
,
DB2ModelPackage.getDB2Routine_OrigParmSig()
void setOrigParmSig(java.lang.String value)
Orig Parm Sig
' attribute.
value
- the new value of the 'Orig Parm Sig' attribute.getOrigParmSig()
org.eclipse.emf.common.util.EList getExtendedOptions()
DB2ExtendedOptions
.
DB2ModelPackage.getDB2Routine_ExtendedOptions()
org.eclipse.emf.common.util.EList getRoutineExtensions()
DB2RoutineExtension
.
Extensions for application specific needs. The DB2Model has no dependencies on whoever implements DB2RoutineExtension
DB2ModelPackage.getDB2Routine_RoutineExtensions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |