org.eclipse.datatools.connectivity.oda.spec.manifest
Class AggregateDefinition

java.lang.Object
  extended by org.eclipse.datatools.connectivity.oda.spec.manifest.AggregateDefinition

public class AggregateDefinition
extends java.lang.Object

Represents the definition of a contributed aggregate type, 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_CAN_IGNORE_DUPLS
           
static java.lang.String ATTR_CAN_IGNORE_NULLS
           
static java.lang.String ATTR_CLASS
           
static java.lang.String ATTR_DESC
           
static java.lang.String ATTR_ID
           
static java.lang.String ATTR_MAX_VARS
           
static java.lang.String ATTR_MIN_VARS
           
static java.lang.String ATTR_NAME
           
static java.lang.String ELEMENT_NAME
           
 
Method Summary
 boolean canIgnoreDuplicateValues()
          Indicates whether this aggregate type is capable of ignoring duplicate values of its input variable.
 boolean canIgnoreNullValues()
          Indicates whether this aggregate type is capable of ignoring null values of its input variable.
 CustomAggregate createExpression()
          Creates and returns an instance of CustomAggregate for use in an ODA aggregate projection specification, based on the class defined in the attribute specified in this definition.
 CustomAggregate createExpression(ExpressionVariable variable)
          Creates and returns an instance of CustomAggregate for use in an ODA aggregate projection specification, based on the class defined in the attribute specified in this definition.
 ExtensionContributor getContributor()
          Returns the contributor of this type of custom aggregate expression.
 java.lang.String getDeclaringExtensionId()
          Gets the unique id of the dynamicResultSets extension that declares this type of custom aggregate type.
 java.lang.String getDescription()
          Gets the brief translateable description, if any.
 java.lang.String getDisplayName()
          Gets the translateable name that can be used to refer to this particular aggregate type in dialogs presented to the user.
 java.lang.String getId()
          Gets the id that uniquely identifies this type of custom aggregate type within the contributing extension.
static java.lang.String getIdAttributeValue(org.eclipse.core.runtime.IConfigurationElement exprElement)
          For internal use only.
 java.lang.Integer getMaxInputVariables()
          Gets the maximum number of input source variables required by this expression type.
 java.lang.Integer getMinInputVariables()
          Gets the minimum number of input source variables required by this expression type.
 IValidator getValidator()
          Gets the concrete class that implements the IValidator to validate this expression.
 VariableRestrictions getVariableRestrictions()
          Gets the restriction info on the types of expression variable that can be applied with this type of aggregate expression.
 boolean supportsDataSetType(java.lang.String odaDataSourceId, java.lang.String odaDataSetId)
          Indicates whether this type of custom aggregate type supports the specified data set type of the specified data source type.
 boolean supportsUnboundedMaxInputVariables()
          Indicates whether this expression type has no upper limit on the number of input source variables.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_NAME

public static final java.lang.String ELEMENT_NAME
See Also:
Constant Field Values

ATTR_ID

public static final java.lang.String ATTR_ID
See Also:
Constant Field Values

ATTR_NAME

public static final java.lang.String ATTR_NAME
See Also:
Constant Field Values

ATTR_DESC

public static final java.lang.String ATTR_DESC
See Also:
Constant Field Values

ATTR_CLASS

public static final java.lang.String ATTR_CLASS
See Also:
Constant Field Values

ATTR_MIN_VARS

public static final java.lang.String ATTR_MIN_VARS
See Also:
Constant Field Values

ATTR_MAX_VARS

public static final java.lang.String ATTR_MAX_VARS
See Also:
Constant Field Values

ATTR_CAN_IGNORE_DUPLS

public static final java.lang.String ATTR_CAN_IGNORE_DUPLS
See Also:
Constant Field Values

ATTR_CAN_IGNORE_NULLS

public static final java.lang.String ATTR_CAN_IGNORE_NULLS
See Also:
Constant Field Values
Method Detail

getIdAttributeValue

public static java.lang.String getIdAttributeValue(org.eclipse.core.runtime.IConfigurationElement exprElement)
                                            throws OdaException
For internal use only.

Throws:
OdaException

createExpression

public CustomAggregate createExpression()
                                 throws OdaException
Creates and returns an instance of CustomAggregate for use in an ODA aggregate projection specification, based on the class defined in the attribute specified in this definition.

Returns:
an instance of CustomAggregate or its subclass
Throws:
OdaException

createExpression

public CustomAggregate createExpression(ExpressionVariable variable)
                                 throws OdaException
Creates and returns an instance of CustomAggregate for use in an ODA aggregate projection specification, based on the class defined in the attribute specified in this definition.

Parameters:
variable - the initial input source variable to set on the created instance; may be null
Returns:
an instance of CustomAggregate or its subclass
Throws:
OdaException

supportsDataSetType

public boolean supportsDataSetType(java.lang.String odaDataSourceId,
                                   java.lang.String odaDataSetId)
Indicates whether this type of custom aggregate type supports the specified data set type of the specified data source type.

Parameters:
odaDataSourceId - id of an ODA data source extension
odaDataSetId - id of an ODA data set defined within the data source extension
Returns:
true if this ODA data set type can be used with this type of custom aggregate type; false otherwise

getDeclaringExtensionId

public java.lang.String getDeclaringExtensionId()
Gets the unique id of the dynamicResultSets extension that declares this type of custom aggregate type.

Returns:
unique id of the declaring dynamicResultSets extension

getId

public java.lang.String getId()
Gets the id that uniquely identifies this type of custom aggregate type within the contributing extension.

Returns:
id of this type of custom aggregate type

getDisplayName

public java.lang.String getDisplayName()
Gets the translateable name that can be used to refer to this particular aggregate type in dialogs presented to the user. Defaults to the expression type id if no name is specified. The name should be unique within the extension.

Returns:
display name of this type of custom aggregate type

getDescription

public java.lang.String getDescription()
Gets the brief translateable description, if any.

Returns:
description text, or null if none

getContributor

public ExtensionContributor getContributor()
Returns the contributor of this type of custom aggregate expression.

Returns:
an instance of the ExtensionContributor that defines its scope and capabilities

getValidator

public IValidator getValidator()
                        throws OdaException
Gets the concrete class that implements the IValidator to validate this expression.

Returns:
an instance of the contributor's validator, or null if none is specified
Throws:
OdaException - if exception occurs in instantiating its defined validator class

getMinInputVariables

public java.lang.Integer getMinInputVariables()
Gets the minimum number of input source variables required by this expression type. The value may be greater than or equal to 0.

Returns:
an Integer for the minimum number of expected input variables

supportsUnboundedMaxInputVariables

public boolean supportsUnboundedMaxInputVariables()
Indicates whether this expression type has no upper limit on the number of input source variables.

Returns:
true if no upper limit on number of input variables; false otherwise

getMaxInputVariables

public java.lang.Integer getMaxInputVariables()
Gets the maximum number of input source variables required by this expression type.

Returns:
an Integer for the maximum number of expected input variables, or null if no upper limit on the maximum.
See Also:
#supportsUnboundedMaxInputVariables()}

canIgnoreDuplicateValues

public boolean canIgnoreDuplicateValues()
Indicates whether this aggregate type is capable of ignoring duplicate values of its input variable. Default value is false if none is specified in the extension.

Returns:
true if this aggregate type is capable of ignoring duplicate values of its target variable; false otherwise

canIgnoreNullValues

public boolean canIgnoreNullValues()
Indicates whether this aggregate type is capable of ignoring null values of its input variable. Default value is false if none is specified in the extension.

Returns:
true if this aggregate type is capable of ignoring null values of its input variable; false otherwise

getVariableRestrictions

public VariableRestrictions getVariableRestrictions()
Gets the restriction info on the types of expression variable that can be applied with this type of aggregate expression.

Returns:
an instance of VariableRestrictions