## org.eclipse.datatools.modelbase.sql.routines
Interface Routine

All Superinterfaces:
  SQLObject

All Known Subinterfaces:
  BuiltInFunction, Function, Method, Procedure, UserDefinedFunction

All Known Implementing Classes:
  BuiltInFunctionImpl, FunctionImpl, MethodImpl, ProcedureImpl, RoutineImpl, UserDefinedFunctionImpl

public interface Routine
extends SQLObject

A representation of the model object 'Routine'. Reference: 5WD-02-Foundation-2002-12 4.27 SQL-invoked routines

The following features are supported:

- `Specific Name`
- `Language`
- `Parameter Style`
- `Deterministic`
- `Sql Data Access`
- `Creation TS`
- `Last Altered TS`
- `Authorization ID`
- `Security`
- `External Name`
- `Parameters`
- `Source`
- `Schema`

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.
`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.
`EList` `getOutputParameters()` Gets a list of OUT and INOUT parameters associated with this routine.
`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.
`Source` `getSource()` Returns the value of the 'Source' containment reference.
`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` `setSource(Source value)` Sets the value of the '`Source`' containment reference.
`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.datatools.modelbase.sql.schema.SQLObject
`addEAnnotation, addEAnnotationDetail, getComments, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel`

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 <specific name> , 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 clause> ::= 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 routine name> . <external body reference> ::= EXTERNAL [ NAME <external routine name> ] [ <parameter style clause> ] [ <transform group specification> ] [ <external security clause> ] from 4.27 SQL-invoked routines <external routine name> identifies a program written in some standard programming language other than SQL . from 5.4 Names and identifiers <external routine name> ::= <identifier> | <character string literal> An <external routine name> 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 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 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 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 Source getSource()

  Returns the value of the 'Source' containment reference.

  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.
  See Also:
    `setSource(Source)`, `SQLRoutinesPackage.getRoutine_Source()`

### setSource

    public void setSource(Source value)

  Sets the value of the '`Source`' containment reference.

  Parameters:
    `value` - the new value of the 'Source' containment reference.
  See Also:
    `getSource()`

### 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()`

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.