|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDesignSessionUtilBase
org.eclipse.datatools.connectivity.oda.design.ui.designsession.DesignSessionUtil
public class DesignSessionUtil
An utility class to help an ODA host designer or an ODA driver's customized designer to manipulate ODA Design API objects during an ODA design session.
Method Summary | |
---|---|
static ElementNullability |
convertParameterNullability(int parameterNullability)
Converts the value of an ODA runtime parameter nullability to corresponding value used in an ODA design-time element definition. |
static ElementNullability |
convertResultColumnNullability(int columnNullability)
Converts the value of an ODA runtime result set column nullability to corresponding value used in an ODA design-time element definition. |
static Properties |
createDataSetNonPublicProperties(java.lang.String odaDataSourceId,
java.lang.String odaDataSetId,
java.util.Properties utilProps)
Creates an ODA design property collection for those given data set properties that are not defined in an ODA runtime extension manifest. |
static Properties |
createDataSetPublicProperties(java.lang.String odaDataSourceId,
java.lang.String odaDataSetId,
java.util.Properties utilProps)
Creates an ODA design property collection for the data set public properties defined in an ODA runtime extension manifest. |
static Properties |
createDataSourceNonPublicProperties(java.lang.String odaDataSourceId,
java.util.Properties utilProps)
Creates an ODA design property collection for those given data source properties that are not defined in an ODA runtime extension manifest. |
static Properties |
createDataSourcePublicProperties(java.lang.String odaDataSourceId,
java.util.Properties utilProps)
Creates an ODA design property collection for the data source public properties defined in an ODA runtime extension manifest. |
static OdaDesignSession |
createNewDataSetRequestSession(java.lang.String newDataSetName,
java.lang.String odaDataSetId,
DataSourceDesign dataSourceDesign)
Creates a new OdaDesignSession instance with a session request that contains a new data set design of the specified name and odaDataSetId, associated with the specified data source design instance. |
static Properties |
createNonPublicProperties(Property[] publicPropDefns,
java.util.Properties utilProps)
Convert given Properties collection that are not defined as public properties in an ODA runtime extension manifest, into an ODA design property collection. |
static Properties |
createPublicProperties(Property[] publicPropDefns,
java.util.Properties utilProps)
Convert specified public properties defined in an ODA runtime extension manifest, and corresponding values specified in the given Properties collection into an ODA design property collection. |
static java.util.Properties |
getEffectiveDataSourceProperties(DataSourceDesign dataSourceDesign)
|
static IConnectionProfile |
getLinkedProfile(DataSourceDesign dataSourceDesign)
Returns the connection profile instance externally referenced, i.e. |
static java.util.Map |
getProfileIdentifiers(java.lang.String odaDataSourceId,
java.io.File storageFile)
Returns a collection of identifiers of all connection profile instances for the given ODA data source extension type. |
static java.util.Map |
getProfileIdentifiersByCategory(java.lang.String categoryId,
java.io.File storageFile)
Returns a collection of identifiers of all connection profile instances under the specified profile category id. |
static boolean |
hasValidOdaDesignUIExtension(java.lang.String odaDataSourceId)
Indicates whether the given ODA data source type has implemented a valid org.eclipse.datatools.connectivity.oda.design.ui.dataSource
extension point. |
static DataSetParameters |
toDataSetParametersDesign(IParameterMetaData pmd)
Converts the contents of an ODA runtime parameters meta data to an ODA design-time DataSetParameters instance. |
static DataSetParameters |
toDataSetParametersDesign(IParameterMetaData pmd,
ParameterMode defaultMode)
Converts the contents of an ODA runtime parameters meta data to an ODA design-time DataSetParameters instance. |
static ElementNullability |
toElementNullability(int odaNullability)
Deprecated. As of 3.0.5, replaced by convertResultColumnNullability( int ) . |
static ParameterMode |
toParameterModeDesign(int runtimeParamMode)
Converts the specified ODA runtime parameter mode value to corresponding ODA design-time parameter mode value. |
static ParameterMode |
toParameterModeDesign(int runtimeParamMode,
ParameterMode defaultMode)
Converts the specified ODA runtime parameter mode value to corresponding ODA design-time parameter mode value. |
static ResultSetColumns |
toResultSetColumnsDesign(IResultSetMetaData md)
Converts the contents of an ODA runtime result set meta data to an ODA design-time ResultSetColumns instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Properties createDataSourcePublicProperties(java.lang.String odaDataSourceId, java.util.Properties utilProps) throws OdaException
odaDataSourceId
- an ODA extension data source element IDutilProps
- java.util.properties, such as those collected from a connection profile
OdaException
public static Properties createDataSetPublicProperties(java.lang.String odaDataSourceId, java.lang.String odaDataSetId, java.util.Properties utilProps) throws OdaException
odaDataSourceId
- an ODA extension data source element IDodaDataSetId
- an ODA extension data set element id;
may be null if the associated data source extension
supports only one type of data setutilProps
- collection of property name and value pairs
OdaException
public static Properties createPublicProperties(Property[] publicPropDefns, java.util.Properties utilProps)
publicPropDefns
- public properties defined in an ODA runtime extension manifestutilProps
- collection of property name and value pairs
public static Properties createDataSourceNonPublicProperties(java.lang.String odaDataSourceId, java.util.Properties utilProps) throws OdaException
odaDataSourceId
- an ODA extension data source element IDutilProps
- a java.util.Properties collection,
such as those collected from a connection profile
OdaException
public static Properties createDataSetNonPublicProperties(java.lang.String odaDataSourceId, java.lang.String odaDataSetId, java.util.Properties utilProps) throws OdaException
odaDataSourceId
- an ODA extension data source element IDodaDataSetId
- an ODA extension data set element id;
may be null if the associated data source extension
supports only one type of data setutilProps
- a java.util.Properties collection,
such as those collected from a connection profile
OdaException
public static Properties createNonPublicProperties(Property[] publicPropDefns, java.util.Properties utilProps)
publicPropDefns
- public properties defined in an ODA runtime extension manifestutilProps
- a java.util.Properties collection,
such as those collected from a connection profile
public static OdaDesignSession createNewDataSetRequestSession(java.lang.String newDataSetName, java.lang.String odaDataSetId, DataSourceDesign dataSourceDesign) throws OdaException
newDataSetName
- a unique name that identifies a data set
design instanceodaDataSetId
- an ODA data set element id;
may be null if the associated data source extension
supports only one type of data setdataSourceDesign
- the associated data source design instance
OdaException
- if specified arguments are invalidpublic static IConnectionProfile getLinkedProfile(DataSourceDesign dataSourceDesign) throws OdaException
dataSourceDesign
-
OdaException
- if referenced connection profile is not foundpublic static java.util.Properties getEffectiveDataSourceProperties(DataSourceDesign dataSourceDesign) throws OdaException
OdaException
public static boolean hasValidOdaDesignUIExtension(java.lang.String odaDataSourceId)
org.eclipse.datatools.connectivity.oda.design.ui.dataSource
extension point.
odaDataSourceId
- an ODA data source extension type's element id
public static java.util.Map getProfileIdentifiers(java.lang.String odaDataSourceId, java.io.File storageFile) throws OdaException
odaDataSourceId
- an ODA data source extension type's element idstorageFile
- a file that stores profile instances;
may be null, which means to use the
default DTP profiles storage file
Map
containing the instance Id
and display name of all existing profiles of the given odaDataSourceId.
The connection profiles' instance Id and display name
are stored as the key and value strings in the returned Map
instance.
Returns an empty collection if there are
no matching connection profiles found in given storageFile.
OdaException
- if error in reading from given storageFile,
or in processing the found profilespublic static java.util.Map getProfileIdentifiersByCategory(java.lang.String categoryId, java.io.File storageFile) throws OdaException
categoryId
- the unique id of a connection profile categorystorageFile
- a file that stores profile instances;
may be null, which means to use the
default DTP profiles storage file
Map
containing the instance Id
and display name of all existing profiles of the given odaDataSourceId.
The connection profiles' instance Id and display name
are stored as the key and value strings in the returned Map
instance.
Returns an empty collection if there are
no matching connection profiles found in given storageFile.
OdaException
- if error in reading from given storageFile,
or in processing the found profilespublic static ResultSetColumns toResultSetColumnsDesign(IResultSetMetaData md) throws OdaException
md
- ODA runtime result set meta data instance
OdaException
public static DataSetParameters toDataSetParametersDesign(IParameterMetaData pmd) throws OdaException
pmd
- ODA runtime parameters meta data instance
OdaException
public static DataSetParameters toDataSetParametersDesign(IParameterMetaData pmd, ParameterMode defaultMode) throws OdaException
pmd
- ODA runtime parameters meta data instancedefaultMode
- default design-time parameter mode to apply
if a parameter's mode is not recognized;
may be null for no default value
OdaException
public static ParameterMode toParameterModeDesign(int runtimeParamMode)
runtimeParamMode
- an ODA runtime parameter mode value
public static ParameterMode toParameterModeDesign(int runtimeParamMode, ParameterMode defaultMode)
runtimeParamMode
- an ODA runtime parameter mode valuedefaultMode
- default design-time parameter mode to apply
if specified runtimeParamMode is not recognized;
may be null for no default value
public static ElementNullability toElementNullability(int odaNullability)
convertResultColumnNullability( int )
.
odaNullability
- an ODA runtime nullability constant
public static ElementNullability convertResultColumnNullability(int columnNullability)
columnNullability
- an ODA IResultSetMetaData nullability constant
public static ElementNullability convertParameterNullability(int parameterNullability)
parameterNullability
- an ODA IParameterMetaData nullability constant
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |