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

All Superinterfaces:
  Routine, SQLObject

All Known Subinterfaces:
  BuiltInFunction, Method, UserDefinedFunction

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

public interface Function
extends Routine

A representation of the model object 'Function'. From 5WD-02-Foundation-2002-12 4.23 SQL-invoked routines ... If the SQL-invoked routine is an SQL-invoked function, then: - If the SQL-invoked routine is an SQL-invoked function, then an indication of whether the SQL-invoked function is an SQL-invoked method. - The <returns data type> of the SQL-invoked function. - If the <returns data type> simply contains <locator indication>, then an indication that the return value is a locator. - 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. - An indication of whether the SQL-invoked function is a null-call function.

The following features are supported:

- `Null Call`
- `Static`
- `Transform Group`
- `Type Preserving`
- `Mutator`
- `Return Table`
- `Return Scaler`
- `Return Cast`

See Also:
  `SQLRoutinesPackage.getFunction()`

Method Summary
`Parameter` `getReturnCast()` Returns the value of the 'Return Cast' containment reference.
`Parameter` `getReturnScaler()` Returns the value of the 'Return Scaler' containment reference.
`RoutineResultTable` `getReturnTable()` Returns the value of the 'Return Table' containment reference.
`java.lang.String` `getTransformGroup()` Returns the value of the 'Transform Group' attribute.
`boolean` `isMutator()` Returns the value of the 'Mutator' attribute.
`boolean` `isNullCall()` Returns the value of the 'Null Call' attribute.
`boolean` `isStatic()` Returns the value of the 'Static' attribute.
`boolean` `isTypePreserving()` Returns the value of the 'Type Preserving' attribute.
`void` `setMutator(boolean value)` Sets the value of the '`Mutator`' attribute.
`void` `setNullCall(boolean value)` Sets the value of the '`Null Call`' attribute.
`void` `setReturnCast(Parameter value)` Sets the value of the '`Return Cast`' containment reference.
`void` `setReturnScaler(Parameter value)` Sets the value of the '`Return Scaler`' containment reference.
`void` `setReturnTable(RoutineResultTable value)` Sets the value of the '`Return Table`' containment reference.
`void` `setStatic(boolean value)` Sets the value of the '`Static`' attribute.
`void` `setTransformGroup(java.lang.String value)` Sets the value of the '`Transform Group`' attribute.
`void` `setTypePreserving(boolean value)` Sets the value of the '`Type Preserving`' attribute.

Methods inherited from interface org.eclipse.datatools.modelbase.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.datatools.modelbase.sql.schema.SQLObject
`addEAnnotation, addEAnnotationDetail, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel`

Method Detail

### isNullCall

    public boolean isNullCall()

  Returns the value of the 'Null Call' attribute. From 5WD-02-Foundation-2002-12 11.50 ::= RETURNS NULL ON NULL INPUT | CALLED ON NULL INPUT If PROCEDURE is specified, then: - shall not be specified. if is not specified, then - CALLED ON NULL INPUT is implicit. If the SQL-invoked routine is an SQL-invoked function, then: - The SQL-invoked routine descriptor includes an indication of whether the SQL-invoked routine is a null-call function. 4.27 SQL-invoked routines A null-call function is an SQL-invoked function that is defined to return the null value if any of its input arguments is the null value. A null-call function is an SQL-invoked function whose specifies "RETURNS NULL ON NULL INPUT".

  Returns:
    the value of the 'Null Call' attribute.
  See Also:
    `setNullCall(boolean)`, `SQLRoutinesPackage.getFunction_NullCall()`

### setNullCall

    public void setNullCall(boolean value)

  Sets the value of the '`Null Call`' attribute.

  Parameters:
    `value` - the new value of the 'Null Call' attribute.
  See Also:
    `isNullCall()`

### isStatic

    public boolean isStatic()

  Returns the value of the 'Static' attribute. From 5WD-02-Foundation-2002-12 11.50 <dispatch clause> ::= STATIC DISPATCH If R is an SQL-invoked regular function and the <SQL parameter declaration list> contains an <SQL parameter declaration> that specifies a that is one of: 1) A user-defined type. 2) A collection type whose element type is a user-defined type. 3) A collection type whose element type is a reference type. 4) A reference type. then <dispatch clause> shall be specified. Otherwise, <dispatch clause> shall not be specified.

  Returns:
    the value of the 'Static' attribute.
  See Also:
    `setStatic(boolean)`, `SQLRoutinesPackage.getFunction_Static()`

### setStatic

    public void setStatic(boolean value)

  Sets the value of the '`Static`' attribute.

  Parameters:
    `value` - the new value of the 'Static' attribute.
  See Also:
    `isStatic()`

### getTransformGroup

    public java.lang.String getTransformGroup()

  Returns the value of the 'Transform Group' attribute. From 5WD-02-Foundation-2002-12 4.7.5 Transforms for user-defined types Transforms are SQL-invoked functions that are automatically invoked when values of user-defined types are transferred from SQL-environment to host languages or vice-versa. A transform is associated with a user-defined type. A transform identifies a list of transform groups of up to two SQL-invoked functions, called the transform functions, each identified by a group name. The group name of a transform group is an <identifier> such that no two transform groups for a transform have the same group name. The two transform functions are: - from-sql function : This SQL-invoked function maps the user-defined type value into a value of an SQL pre-defined type, and gets invoked whenever a user-defined type value is passed to a host language program or an external routine. - to-sql function : This SQL-invoked function maps a value of an SQL predefined type to a value of a user-defined type and gets invoked whenever a user-defined type value is supplied by a host language program or an external routine.

  Returns:
    the value of the 'Transform Group' attribute.
  See Also:
    `setTransformGroup(String)`, `SQLRoutinesPackage.getFunction_TransformGroup()`

### setTransformGroup

    public void setTransformGroup(java.lang.String value)

  Sets the value of the '`Transform Group`' attribute.

  Parameters:
    `value` - the new value of the 'Transform Group' attribute.
  See Also:
    `getTransformGroup()`

### isTypePreserving

    public boolean isTypePreserving()

  Returns the value of the 'Type Preserving' attribute.

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

  Returns:
    the value of the 'Type Preserving' attribute.
  See Also:
    `setTypePreserving(boolean)`, `SQLRoutinesPackage.getFunction_TypePreserving()`

### setTypePreserving

    public void setTypePreserving(boolean value)

  Sets the value of the '`Type Preserving`' attribute.

  Parameters:
    `value` - the new value of the 'Type Preserving' attribute.
  See Also:
    `isTypePreserving()`

### isMutator

    public boolean isMutator()

  Returns the value of the 'Mutator' attribute.

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

  Returns:
    the value of the 'Mutator' attribute.
  See Also:
    `setMutator(boolean)`, `SQLRoutinesPackage.getFunction_Mutator()`

### setMutator

    public void setMutator(boolean value)

  Sets the value of the '`Mutator`' attribute.

  Parameters:
    `value` - the new value of the 'Mutator' attribute.
  See Also:
    `isMutator()`

### getReturnTable

    public RoutineResultTable getReturnTable()

  Returns the value of the 'Return Table' containment reference.

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

  Returns:
    the value of the 'Return Table' containment reference.
  See Also:
    `setReturnTable(RoutineResultTable)`, `SQLRoutinesPackage.getFunction_ReturnTable()`

### setReturnTable

    public void setReturnTable(RoutineResultTable value)

  Sets the value of the '`Return Table`' containment reference.

  Parameters:
    `value` - the new value of the 'Return Table' containment reference.
  See Also:
    `getReturnTable()`

### getReturnScaler

    public Parameter getReturnScaler()

  Returns the value of the 'Return Scaler' containment reference.

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

  Returns:
    the value of the 'Return Scaler' containment reference.
  See Also:
    `setReturnScaler(Parameter)`, `SQLRoutinesPackage.getFunction_ReturnScaler()`

### setReturnScaler

    public void setReturnScaler(Parameter value)

  Sets the value of the '`Return Scaler`' containment reference.

  Parameters:
    `value` - the new value of the 'Return Scaler' containment reference.
  See Also:
    `getReturnScaler()`

### getReturnCast

    public Parameter getReturnCast()

  Returns the value of the 'Return Cast' containment reference.

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

  Returns:
    the value of the 'Return Cast' containment reference.
  See Also:
    `setReturnCast(Parameter)`, `SQLRoutinesPackage.getFunction_ReturnCast()`

### setReturnCast

    public void setReturnCast(Parameter value)

  Sets the value of the '`Return Cast`' containment reference.

  Parameters:
    `value` - the new value of the 'Return Cast' containment reference.
  See Also:
    `getReturnCast()`

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