org.eclipse.wst.rdb.internal.models.sql.routines
Interface Routine

All Superinterfaces:
org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.ENamedElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier, SQLObject
All Known Subinterfaces:
BuiltInFunction, Function, Method, Procedure, UserDefinedFunction
All Known Implementing Classes:
RoutineImpl

public interface Routine
extends SQLObject

A representation of the model object 'Routine'. From 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines An SQL-invoked routine is described by a routine descriptor. A routine descriptor includes: - The routine name of the SQL-invoked routine. - The specific name of the SQL-invoked routine. - The routine authorization identifier of the SQL-invoked routine. - The name of the language in which the body of the SQL-invoked routine is written. - For each of the SQL-invoked routine's SQL parameters, the , if it is specified, the , the ordinal position, and an indication of whether the SQL parameter is an input SQL parameter, an output SQL parameter, or both an input SQL parameter and an output SQL parameter. - An indication of whether the SQL-invoked routine is an SQL-invoked function or an SQL-invoked procedure. - If the SQL-invoked routine is an SQL-invoked procedure, then the maximum number of dynamic result sets. - An indication of whether the SQL-invoked routine is deterministic or possibly non-deterministic. - Indications of whether the SQL-invoked routine possibly modifies SQL-data, possibly reads SQL-data, possibly contains SQL, or does not possibly contain SQL. - If the SQL-invoked routine is an SQL-invoked function, then: * The of the SQL-invoked function. * If the simply contains , then an indication that the return value is a locator. * An indication of whether the SQL-invoked function is a null-call function. * An indication of whether the SQL-invoked function is an SQL-invoked method. - The creation timestamp. - The last-altered timestamp. - If the SQL-invoked routine is an SQL routine, then: * The SQL routine body of the SQL-invoked routine. * The SQL security characteristic of the SQL routine. - If the SQL-invoked routine is an external routine, then: * The external routine name of the external routine. * The of the external routine. * If the external routine specifies a , then an indication that it specifies a and the specified in the . If contains , then an indication that the specified in the has a locator indication. * The external security characteristic of the external routine. * The external routine authorization identifier of the external routine. * The effective SQL parameter list of the external routine. * For every SQL parameter whose contains , an indication that the SQL parameter is a locator parameter. - The schema name of the schema that includes the SQL-invoked routine. - If the SQL-invoked routine is an SQL-invoked method, then: * An indication of the user-defined type whose descriptor contains the corresponding method specification descriptor. * An indication of whether STATIC was specified. - An indication of whether the SQL-invoked routine is dependent on a user-defined type. - An indication as to whether or not the SQL-invoked routine requires a new savepoint level to be established when it is invoked. Not included: 4.27 SQL-invoked routines - The routine SQL-path of the SQL-invoked routine is not included because the SQL-path, which I read as CURRENT SCHEMA in DB2 land, of the current SQL-session. - If the SQL-invoked routine is an SQL-invoked function, then: * An indication of whether the SQL-invoked function is a type-preserving function or not. * An indication of whether the SQL-invoked function is a mutator function or not. * If the SQL-invoked function is a type-preserving function, then an indication of which parameter is the result parameter. - If the SQL-invoked routine is an external routine, then: * The external routine SQL-path of the external routine. * For every SQL parameter that has an associated from-sql function FSF, the specific name of FSF. * For every SQL parameter that has an associated to-sql function TSF, the specific name of TSF. * If the SQL-invoked routine is an external function and if it has a to-sql function TRF associated with the result, then the specific name of TRF.

The following features are supported:

See Also:
SQLRoutinesPackage.getRoutine()

Method Summary
 java.lang.String getAuthorizationID()
          Returns the value of the 'Authorization ID' attribute.
 java.lang.String getCreationTS()
          Returns the value of the 'Creation TS' attribute.
 java.lang.String getExternalName()
          Returns the value of the 'External Name' attribute.
 org.eclipse.emf.common.util.EList getInputParameters()
          Gets a list of IN and INOUT parameters associated with this routine.
 java.lang.String getLanguage()
          Returns the value of the 'Language' attribute.
 java.lang.String getLastAlteredTS()
          Returns the value of the 'Last Altered TS' attribute.
 org.eclipse.emf.common.util.EList getOutputParameters()
          Gets a list of OUT and INOUT parameters associated with this routine.
 org.eclipse.emf.common.util.EList getParameters()
          Returns the value of the 'Parameters' containment reference list.
 java.lang.String getParameterStyle()
          Returns the value of the 'Parameter Style' attribute.
 Schema getSchema()
          Returns the value of the 'Schema' reference.
 java.lang.String getSecurity()
          Returns the value of the 'Security' attribute.
 org.eclipse.emf.common.util.EList getSource()
          Returns the value of the 'Source' containment reference list.
 java.lang.String getSpecificName()
          Returns the value of the 'Specific Name' attribute.
 DataAccess getSqlDataAccess()
          Returns the value of the 'Sql Data Access' attribute.
 boolean isDeterministic()
          Returns the value of the 'Deterministic' attribute.
 void setAuthorizationID(java.lang.String value)
          Sets the value of the 'Authorization ID' attribute.
 void setCreationTS(java.lang.String value)
          Sets the value of the 'Creation TS' attribute.
 void setDeterministic(boolean value)
          Sets the value of the 'Deterministic' attribute.
 void setExternalName(java.lang.String value)
          Sets the value of the 'External Name' attribute.
 void setLanguage(java.lang.String value)
          Sets the value of the 'Language' attribute.
 void setLastAlteredTS(java.lang.String value)
          Sets the value of the 'Last Altered TS' attribute.
 void setParameterStyle(java.lang.String value)
          Sets the value of the 'Parameter Style' attribute.
 void setSchema(Schema value)
          Sets the value of the 'Schema' reference.
 void setSecurity(java.lang.String value)
          Sets the value of the 'Security' attribute.
 void setSpecificName(java.lang.String value)
          Sets the value of the 'Specific Name' attribute.
 void setSqlDataAccess(DataAccess value)
          Sets the value of the 'Sql Data Access' attribute.
 
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject
addEAnnotation, addEAnnotationDetail, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel
 
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.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getSpecificName

public java.lang.String getSpecificName()
Returns the value of the 'Specific Name' attribute. From 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines An SQL-invoked routine is uniquely identified by a , called the specific name of the SQLinvoked routine. Typically qualified with a schema name.
Returns:
the value of the 'Specific Name' attribute.
See Also:
setSpecificName(String), SQLRoutinesPackage.getRoutine_SpecificName()

setSpecificName

public void setSpecificName(java.lang.String value)
Sets the value of the 'Specific Name' attribute.
Parameters:
value - the new value of the 'Specific Name' attribute.
See Also:
getSpecificName()

getLanguage

public java.lang.String getLanguage()
Returns the value of the 'Language' attribute.

If the meaning of the 'Language' attribute isn't clear, there really should be more of a description here...

Since there are many languages, rather than constrain ourselves to an enumerated list which is difficult to subclass in the EMF environment, we have chosen to use strings. JAVA SQL PERL C ADA COBOL FORTRAN MUMPS PASCAL PLI and so on...
Returns:
the value of the 'Language' attribute.
See Also:
setLanguage(String), SQLRoutinesPackage.getRoutine_Language()

setLanguage

public void setLanguage(java.lang.String value)
Sets the value of the 'Language' attribute.
Parameters:
value - the new value of the 'Language' attribute.
See Also:
getLanguage()

getParameterStyle

public java.lang.String getParameterStyle()
Returns the value of the 'Parameter Style' attribute.

If the meaning of the 'Parameter Style' attribute isn't clear, there really should be more of a description here...

Paraphrased from 5WD-02-Foundation-2002-12 The spec only calls for two. Though it seems like an easy choice for enumeration as in the language attribute, other vendors have different styles and since enumeration is not good to subclass within the EMF tooling framework, a string representation is used. 11.50 SQL GENERAL. Used in stored procedures, user defined functions, and methods.
Returns:
the value of the 'Parameter Style' attribute.
See Also:
setParameterStyle(String), SQLRoutinesPackage.getRoutine_ParameterStyle()

setParameterStyle

public void setParameterStyle(java.lang.String value)
Sets the value of the 'Parameter Style' attribute.
Parameters:
value - the new value of the 'Parameter Style' attribute.
See Also:
getParameterStyle()

isDeterministic

public boolean isDeterministic()
Returns the value of the 'Deterministic' attribute. From 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines An SQL-invoked routine is either deterministic or possibly non-deterministic. An SQL-invoked function that is deterministic always returns the identical return value for a given list of SQL argument values. An SQLinvoked procedure that is deterministic always returns the identical values in its output and inout SQL parameters for a given list of SQL argument values. An SQL-invoked routine is possibly non-deterministic if it might produce nonidentical results when invoked with the identical list of SQL argument values.
Returns:
the value of the 'Deterministic' attribute.
See Also:
setDeterministic(boolean), SQLRoutinesPackage.getRoutine_Deterministic()

setDeterministic

public void setDeterministic(boolean value)
Sets the value of the 'Deterministic' attribute.
Parameters:
value - the new value of the 'Deterministic' attribute.
See Also:
isDeterministic()

getSqlDataAccess

public DataAccess getSqlDataAccess()
Returns the value of the 'Sql Data Access' attribute. The literals are from the enumeration DataAccess.

If the meaning of the 'Sql Data Access' attribute isn't clear, there really should be more of a description here...

5WD-02-Foundation-2002-12 11.50 ::= NO SQL | CONTAINS SQL | READS SQL DATA | MODIFIES SQL DATA (see DataAccess enumeration class)
Returns:
the value of the 'Sql Data Access' attribute.
See Also:
DataAccess, setSqlDataAccess(DataAccess), SQLRoutinesPackage.getRoutine_SqlDataAccess()

setSqlDataAccess

public void setSqlDataAccess(DataAccess value)
Sets the value of the 'Sql Data Access' attribute.
Parameters:
value - the new value of the 'Sql Data Access' attribute.
See Also:
DataAccess, getSqlDataAccess()

getCreationTS

public java.lang.String getCreationTS()
Returns the value of the 'Creation TS' attribute. From 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines An SQL-invoked routine is described by a routine descriptor. A routine descriptor includes: - The creation timestamp. Because there is no provision in the spec as to the format of the timestamp, it is left to the individual implementers to determine the format.
Returns:
the value of the 'Creation TS' attribute.
See Also:
setCreationTS(String), SQLRoutinesPackage.getRoutine_CreationTS()

setCreationTS

public void setCreationTS(java.lang.String value)
Sets the value of the 'Creation TS' attribute.
Parameters:
value - the new value of the 'Creation TS' attribute.
See Also:
getCreationTS()

getLastAlteredTS

public java.lang.String getLastAlteredTS()
Returns the value of the 'Last Altered TS' attribute. From 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines An SQL-invoked routine is described by a routine descriptor. A routine descriptor includes: - The last-altered timestamp. Because there is no provision in the spec as to the format of the timestamp, it is left to the individual implementers to determine the format.
Returns:
the value of the 'Last Altered TS' attribute.
See Also:
setLastAlteredTS(String), SQLRoutinesPackage.getRoutine_LastAlteredTS()

setLastAlteredTS

public void setLastAlteredTS(java.lang.String value)
Sets the value of the 'Last Altered TS' attribute.
Parameters:
value - the new value of the 'Last Altered TS' attribute.
See Also:
getLastAlteredTS()

getAuthorizationID

public java.lang.String getAuthorizationID()
Returns the value of the 'Authorization ID' attribute. From 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines An SQL-invoked routine has a routine authorization identifier, which is (directly or indirectly) the authorization identifier of the owner of the schema that contains the SQL-invoked routine at the time that the SQL-invoked routine is created.
Returns:
the value of the 'Authorization ID' attribute.
See Also:
setAuthorizationID(String), SQLRoutinesPackage.getRoutine_AuthorizationID()

setAuthorizationID

public void setAuthorizationID(java.lang.String value)
Sets the value of the 'Authorization ID' attribute.
Parameters:
value - the new value of the 'Authorization ID' attribute.
See Also:
getAuthorizationID()

getSecurity

public java.lang.String getSecurity()
Returns the value of the 'Security' attribute. From the below, typical values would be: "DEFINER", "INVOKER", "IMPLEMENTATION DEFINED" Since there are several implementation defined security designations, it is best to go with the string. From 5WD-02-Foundation-2002-12 11.50 ::= EXTERNAL SECURITY DEFINER | EXTERNAL SECURITY INVOKER | EXTERNAL SECURITY IMPLEMENTATION DEFINED 4.27 SQL-invoked routines If the SQL-invoked routine is an SQL routine, then the identifiers are determined according to the SQL security characteristic of the SQL-invoked routine: - If the SQL security characteristic is DEFINER , then: * If the routine authorization identifier is a user identifier, the user identifier is set to the routine authorization identifier and the role name is set to null. * Otherwise, the role name is set to the routine authorization identifier and the user identifier is set to null. - If the SQL security characteristic is INVOKER , then the identifiers remain unchanged. If the SQL-invoked routine is an external routine, then the identifiers are determined according to the external security characteristic of the SQL-invoked routine: - If the external security characteristic is DEFINER , then: * If the routine authorization identifier is a user identifier, then the user identifier is set to the routine authorization identifier and the role name is set to the null value. * Otherwise, the role name is set to the routine authorization identifier and the user identifier is set to the null value. - If the external security characteristic is INVOKER , then the identifiers remain unchanged. - If the external security characteristic is IMPLEMENTATION DEFINED , then the identifiers are set to implementation-defined values.
Returns:
the value of the 'Security' attribute.
See Also:
setSecurity(String), SQLRoutinesPackage.getRoutine_Security()

setSecurity

public void setSecurity(java.lang.String value)
Sets the value of the 'Security' attribute.
Parameters:
value - the new value of the 'Security' attribute.
See Also:
getSecurity()

getExternalName

public java.lang.String getExternalName()
Returns the value of the 'External Name' attribute. From 5WD-02-Foundation-2002-12 from 11.50 SQL-invoked routine: The external name of the routine descriptor is . ::= EXTERNAL [ NAME ] [ ] [ ] [ ] from 4.27 SQL-invoked routines identifies a program written in some standard programming language other than SQL . from 5.4 Names and identifiers ::= | An identifies an external routine.
Returns:
the value of the 'External Name' attribute.
See Also:
setExternalName(String), SQLRoutinesPackage.getRoutine_ExternalName()

setExternalName

public void setExternalName(java.lang.String value)
Sets the value of the 'External Name' attribute.
Parameters:
value - the new value of the 'External Name' attribute.
See Also:
getExternalName()

getParameters

public org.eclipse.emf.common.util.EList getParameters()
Returns the value of the 'Parameters' containment reference list. The list contents are of type Parameter. It is bidirectional and its opposite is 'Routine'.

If the meaning of the 'Parameters' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Parameters' containment reference list.
See Also:
SQLRoutinesPackage.getRoutine_Parameters(), Parameter.getRoutine()

getInputParameters

public org.eclipse.emf.common.util.EList getInputParameters()
Gets a list of IN and INOUT parameters associated with this routine.

Returns:
a list of IN and INOUT parameters associated with this routine.

getOutputParameters

public org.eclipse.emf.common.util.EList getOutputParameters()
Gets a list of OUT and INOUT parameters associated with this routine.

Returns:
a list of OUT and INOUT parameters associated with this routine.

getSource

public org.eclipse.emf.common.util.EList getSource()
Returns the value of the 'Source' containment reference list. The list contents are of type Source.

If the meaning of the 'Source' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Source' containment reference list.
See Also:
SQLRoutinesPackage.getRoutine_Source()

getSchema

public Schema getSchema()
Returns the value of the 'Schema' reference. It is bidirectional and its opposite is 'Routines'.

If the meaning of the 'Schema' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Schema' reference.
See Also:
setSchema(Schema), SQLRoutinesPackage.getRoutine_Schema(), Schema.getRoutines()

setSchema

public void setSchema(Schema value)
Sets the value of the 'Schema' reference.
Parameters:
value - the new value of the 'Schema' reference.
See Also:
getSchema()