## org.eclipse.datatools.connectivity.oda.spec.manifest
Class VariableRestrictions

    java.lang.Object
      org.eclipse.datatools.connectivity.oda.spec.manifest.VariableRestrictions

    public class VariableRestrictions

extends java.lang.Object

Represents the restrictions on the types of expression variable that can be applied with an extension-defined expression, as specifed in an extension of the org.eclipse.datatools.connectivity.oda.dynamicResultSet extension point.

Since:
  3.2 (DTP 1.7)

Field Summary
`static java.lang.String` `ATTR_ODA_SCALAR_DATA_TYPE`
`static java.lang.String` `ATTR_RESULT_INSTANCE_TYPE`
`static java.lang.String` `ATTR_VARIABLE_TYPE`
`static java.lang.String` `ATTR_VARIABLE_TYPE_INSTANCE_OF`
`static java.lang.String` `ATTR_VARIABLE_TYPE_QUERY_EXPR`
`static java.lang.String` `ATTR_VARIABLE_TYPE_RESULT_COLUMN`
`static java.lang.String` `SUB_ELEMENT_VARIABLE_RESTRICTION`
`static java.lang.String` `SUB_ELEMENT_VARIABLE_RESTRICTION_INSTANCE`
`static java.lang.String` `SUB_ELEMENT_VARIABLE_RESTRICTION_ODA_DATA_TYPE`

Method Summary
`java.lang.String[]` `getInstanceRestrictedTypes()` Gets the collection of class names of instance variables that can be applied with this expression.
`int[]` `getQueryExpressionRestrictedOdaDataTypes()` Gets the collection of ODA data type(s) of query expression variables that can be applied with this expression.
`ExpressionVariable.VariableType[]` `getRestrictedVariableTypes()` Returns the restrictions on the type of variables that can be applied with this type of expression.
`int[]` `getResultColumnRestrictedOdaDataTypes()` Gets the collection of ODA data type(s) of result set column variables that can be applied with this expression.
`boolean` `hasDataTypeRestrictions(ExpressionVariable.VariableType type)` Indicates whether this has any restrictions on the data type of the specified type of variable.
`boolean` `supportsClassType(ExpressionVariable.VariableType type, java.lang.String className)` Indicates whether this supports the specified class of the specified type of variable.
`boolean` `supportsOdaBooleanDataTypes(ExpressionVariable.VariableType varType)` A convenient method to indicate whether this supports the ODA boolean data type of the specified type of variable.
`boolean` `supportsOdaDataType(ExpressionVariable.VariableType varType, int odaDataType)` Indicates whether this supports the specified ODA data type of the specified type of variable.
`boolean` `supportsOdaDatetimeDataTypes(ExpressionVariable.VariableType varType)` A convenient method to indicate whether this supports all the ODA date and/or datetime data types of the specified type of variable.
`boolean` `supportsOdaNumericDataTypes(ExpressionVariable.VariableType varType)` A convenient method to indicate whether this supports all the ODA numeric data types of the specified type of variable.
`boolean` `supportsOdaStringDataTypes(ExpressionVariable.VariableType varType)` A convenient method to indicate whether this supports the ODA string/character data type of the specified type of variable.
`boolean` `supportsVariableType(ExpressionVariable.VariableType type)` Indicates whether the specified type of variable can be applied for evaluation with this expression type.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SUB_ELEMENT_VARIABLE_RESTRICTION

    public static final java.lang.String SUB_ELEMENT_VARIABLE_RESTRICTION

See Also:
  Constant Field Values

### ATTR_VARIABLE_TYPE

    public static final java.lang.String ATTR_VARIABLE_TYPE

See Also:
  Constant Field Values

### ATTR_VARIABLE_TYPE_RESULT_COLUMN

    public static final java.lang.String ATTR_VARIABLE_TYPE_RESULT_COLUMN

See Also:
  Constant Field Values

### ATTR_VARIABLE_TYPE_INSTANCE_OF

    public static final java.lang.String ATTR_VARIABLE_TYPE_INSTANCE_OF

See Also:
  Constant Field Values

### ATTR_VARIABLE_TYPE_QUERY_EXPR

    public static final java.lang.String ATTR_VARIABLE_TYPE_QUERY_EXPR

See Also:
  Constant Field Values

### SUB_ELEMENT_VARIABLE_RESTRICTION_ODA_DATA_TYPE

    public static final java.lang.String SUB_ELEMENT_VARIABLE_RESTRICTION_ODA_DATA_TYPE

See Also:
  Constant Field Values

### ATTR_ODA_SCALAR_DATA_TYPE

    public static final java.lang.String ATTR_ODA_SCALAR_DATA_TYPE

See Also:
  Constant Field Values

### SUB_ELEMENT_VARIABLE_RESTRICTION_INSTANCE

    public static final java.lang.String SUB_ELEMENT_VARIABLE_RESTRICTION_INSTANCE

See Also:
  Constant Field Values

### ATTR_RESULT_INSTANCE_TYPE

    public static final java.lang.String ATTR_RESULT_INSTANCE_TYPE

See Also:
  Constant Field Values

Method Detail

### supportsVariableType

    public boolean supportsVariableType(ExpressionVariable.VariableType type)

  Indicates whether the specified type of variable can be applied for evaluation with this expression type.

  Parameters:
    `type` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
  Returns:
    true if the specified variable type is supported by this type of custom expression; false otherwise

### getRestrictedVariableTypes

    public ExpressionVariable.VariableType[] getRestrictedVariableTypes()

  Returns the restrictions on the type of variables that can be applied with this type of expression.

  Returns:
    an array of `ExpressionVariable.VariableType` supported by this expression type

### hasDataTypeRestrictions

    public boolean hasDataTypeRestrictions(ExpressionVariable.VariableType type)

  Indicates whether this has any restrictions on the data type of the specified type of variable.

  Parameters:
    `type` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
  Returns:
    true if data type restrictions exists; false if this has no data type restrictions

### supportsOdaDataType

    public boolean supportsOdaDataType(ExpressionVariable.VariableType varType,
                                       int odaDataType)

  Indicates whether this supports the specified ODA data type of the specified type of variable.

  Parameters:
    `varType` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
    `odaDataType` - ODA scalar data type code
  Returns:
    true if the specified ODA data type is supported; false otherwise

### supportsOdaNumericDataTypes

    public boolean supportsOdaNumericDataTypes(ExpressionVariable.VariableType varType)

  A convenient method to indicate whether this supports all the ODA numeric data types of the specified type of variable.

  Parameters:
    `varType` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
  Returns:
    true if all ODA numeric data types are supported; false otherwise
  See Also:
    `#supportsOdaDataType(VariableType, int)`

### supportsOdaStringDataTypes

    public boolean supportsOdaStringDataTypes(ExpressionVariable.VariableType varType)

  A convenient method to indicate whether this supports the ODA string/character data type of the specified type of variable.

  Parameters:
    `varType` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
  Returns:
    true if the ODA string/character data type is supported; false otherwise
  See Also:
    `#supportsOdaDataType(VariableType, int)`

### supportsOdaDatetimeDataTypes

    public boolean supportsOdaDatetimeDataTypes(ExpressionVariable.VariableType varType)

  A convenient method to indicate whether this supports all the ODA date and/or datetime data types of the specified type of variable.

  Parameters:
    `varType` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
  Returns:
    true if all ODA date and/or time data types are supported; false otherwise
  See Also:
    `#supportsOdaDataType(VariableType, int)`

### supportsOdaBooleanDataTypes

    public boolean supportsOdaBooleanDataTypes(ExpressionVariable.VariableType varType)

  A convenient method to indicate whether this supports the ODA boolean data type of the specified type of variable.

  Parameters:
    `varType` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
  Returns:
    true if the ODA boolean data type is supported; false otherwise
  See Also:
    `#supportsOdaDataType(VariableType, int)`

### supportsClassType

    public boolean supportsClassType(ExpressionVariable.VariableType type,
                                     java.lang.String className)

  Indicates whether this supports the specified class of the specified type of variable.

  Parameters:
    `type` - the type of variable; its value must be one of the pre-defined `ExpressionVariable#VariableType`
    `className` - the type of instance variable
  Returns:
    true if the specified class is supported; false otherwise

### getResultColumnRestrictedOdaDataTypes

    public int[] getResultColumnRestrictedOdaDataTypes()

  Gets the collection of ODA data type(s) of result set column variables that can be applied with this expression. For example, a pattern matching expression may only be applicable to a result set column with a String data type.

  Returns:
    an array of ODA data type code(s) allowed; an empty array indicates this expression has no data type restrictions, i.e. all data types are compatible.

### getQueryExpressionRestrictedOdaDataTypes

    public int[] getQueryExpressionRestrictedOdaDataTypes()

  Gets the collection of ODA data type(s) of query expression variables that can be applied with this expression.

  Returns:
    An array of ODA data type code(s) allowed; an empty array indicates this expression has no data type restrictions, i.e. all data types are compatible.

### getInstanceRestrictedTypes

    public java.lang.String[] getInstanceRestrictedTypes()

  Gets the collection of class names of instance variables that can be applied with this expression.

  Returns:
    An array of class names allowed; an empty array indicates this expression has no type restrictions, i.e. all types are compatible.