org.eclipse.datatools.connectivity.oda.util.manifest
Class DataSetType

java.lang.Object
  extended by org.eclipse.datatools.connectivity.oda.util.manifest.DataSetType

public class DataSetType
extends java.lang.Object

Defines a type of data set supported by the ODA data source extension. A data set definition has a unique id, display name and a set of driver-specific data type to ODA data type(s) mappings.


Method Summary
 DataTypeMapping getDataTypeMapping(int nativeDataTypeCode)
          Returns the data type mapping for the specified native data type code.
 DataTypeMapping getDataTypeMapping(java.lang.String nativeDataTypeName)
          Returns the data type mapping for the specified native data type name.
 DataTypeMapping[] getDataTypeMappings()
          Returns the data type mappings for the data set type, or an empty array if no mappings exist.
 int getDefaultOdaDataTypeCode(int nativeDataTypeCode)
          Returns the primary ODA scalar data type code that the specified native data type is mapped to.
 java.lang.String getDisplayName()
          Returns the display name of the ODA data set type element.
 Property[] getHiddenProperties()
          A convenience method to return an array of Property definition instances that represent the properties defined as hidden by this data set element.
 java.lang.String getID()
          Returns the ID which uniquely identifes the type of data set among all ODA data sets supported by the driver.
 Property[] getProperties()
          Returns an array of Property definition instances that represent all the properties defined by this data set element.
 java.util.Properties getPropertiesVisibility()
          Returns a Properties collecton of property visibilty settings.
 Property getProperty(java.lang.String propertyName)
          Returns the Property definition instance that matches the specified name in the list of properties defined by this data set element.
 java.lang.String getRelatedDataSetId()
          Deprecated. As of 3.1.2, replaced by getRelationships(int)
 java.util.List getRelationships(int relationshipType)
          Returns a list of data set relationships defined with the specified type.
 Property[] getVisibleProperties()
          A convenience method to return an array of Property definition instances that represent the properties defined as visible by this data set element.
 boolean isDeprecated()
          Indicates whether this data set type is defined to be deprecated.
 boolean isWrapper()
          Indicates whether this data set type is defined to be a wrapper.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getID

public java.lang.String getID()
Returns the ID which uniquely identifes the type of data set among all ODA data sets supported by the driver.

Returns:
the data set type name.

getDisplayName

public java.lang.String getDisplayName()
Returns the display name of the ODA data set type element. Defaults to element ID if no display name is specified. It can be used by the designer tool of an ODA consumer application to display a list of ODA data sets.

Returns:
The display name of the ODA data set element.

getDataTypeMapping

public DataTypeMapping getDataTypeMapping(int nativeDataTypeCode)
Returns the data type mapping for the specified native data type code.

Parameters:
nativeDataTypeCode - a native data type code.
Returns:
the data type mapping for the specified native type code, or null if there is no corresponding data type mapping defined in this data set type.

getDataTypeMapping

public DataTypeMapping getDataTypeMapping(java.lang.String nativeDataTypeName)
Returns the data type mapping for the specified native data type name.

Parameters:
nativeDataTypeName - a native data type name.
Returns:
the data type mapping for the specified native type name, or null if there is no corresponding data type mapping defined in this data set type.
Since:
3.0.3

getDataTypeMappings

public DataTypeMapping[] getDataTypeMappings()
Returns the data type mappings for the data set type, or an empty array if no mappings exist.

Returns:
the data type mappings for this data set type, or an empty array if no mappings exist.

getDefaultOdaDataTypeCode

public int getDefaultOdaDataTypeCode(int nativeDataTypeCode)
Returns the primary ODA scalar data type code that the specified native data type is mapped to.
If none or unknown native data type value (0) is specified, maps to an ODA String data type by default. If no default ODA data type mapping is defined by the driver for the specified native data type, returns Types.NULL for unknown ODA data type.

Returns:
the primary ODA scalar data type code; may be java.sql.Types.NULL if no mapping is found.

getProperties

public Property[] getProperties()
Returns an array of Property definition instances that represent all the properties defined by this data set element. The collection includes both top-level properties and those in a group, and could be defined as either visible or hidden.

Returns:
an array of all property definitions; an empty array is returned if no properties are defined.

getVisibleProperties

public Property[] getVisibleProperties()
A convenience method to return an array of Property definition instances that represent the properties defined as visible by this data set element. The collection includes both top-level properties and those in a group.

Returns:
an array of visible property definitions; an empty array is returned if no visible properties are defined.

getHiddenProperties

public Property[] getHiddenProperties()
A convenience method to return an array of Property definition instances that represent the properties defined as hidden by this data set element. The collection includes both top-level properties and those in a group.

Returns:
an array of hidden property definitions; an empty array is returned if no hidden properties are defined.

getProperty

public Property getProperty(java.lang.String propertyName)
Returns the Property definition instance that matches the specified name in the list of properties defined by this data set element.

Parameters:
propertyName - the name of a property
Returns:
the matching Property definition, or null if no match is found.

getPropertiesVisibility

public java.util.Properties getPropertiesVisibility()
Returns a Properties collecton of property visibilty settings.

Returns:
Properties with the property name as key, and its visibility setting as value. An empty collection if no property visibility is defined.

isDeprecated

public boolean isDeprecated()
Indicates whether this data set type is defined to be deprecated.

Returns:
true if this data set type is deprecated; false otherwise
Since:
3.0.3

isWrapper

public boolean isWrapper()
Indicates whether this data set type is defined to be a wrapper.

Since:
3.1.2

getRelatedDataSetId

public java.lang.String getRelatedDataSetId()
Deprecated. As of 3.1.2, replaced by getRelationships(int)

Gets the related oda data set element id, if specified. For backward compatibility, this returns the first related replacedBy id.

Returns:
the related oda data set element id, or null if none is specified.
Since:
3.0.3

getRelationships

public java.util.List getRelationships(int relationshipType)
Returns a list of data set relationships defined with the specified type.

Parameters:
relationshipType - constant for the type of relationship
Returns:
a list of specified type of relationships, or null if the specified relationshipType is not defined in this data set type.
Since:
3.1.2
See Also:
Relationship.TYPE_* constants}


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