TFORMer SDK - JAVA  7.5
Public Member Functions | List of all members
DataSourceOdbc Class Reference

Specialized DataSource for ODBC data. More...

Public Member Functions

ComputedField addComputedField (String name) throws TFormerException
 Creates and adds a ComputedField to the DataSource. More...
 
DSFieldMapping addFieldMapping (String name) throws TFormerException
 Creates and adds a DSFieldMapping to the DataSource. More...
 
DataSourceParameter addParameter (String name) throws TFormerException
 Creates and adds a DataSourceParameter to the DataSource. More...
 
void dispose () throws TFormerException
 Releases the resources allocated by the instance. More...
 
void dump (PrintStream s) throws IOException, TFormerException
 Dumps the current instance into a text stream. More...
 
String getComment () throws TFormerException
 Gets the comment for the DataSource. More...
 
ComputedField getComputedField (String name) throws TFormerException
 Gets a ComputedField defined in the DataSource. More...
 
String getCopyColumnName () throws TFormerException
 Gets the CopyColumnName of the DataSource. More...
 
String getDescription () throws TFormerException
 Gets the description of the DataSource. More...
 
String getDsn () throws TFormerException
 Gets the DSN of the DataSourceOdbc. More...
 
DSFieldMapping getFieldMapping (String name) throws TFormerException
 Gets a DSFieldMapping defined in the DataSource. More...
 
ComputedField getFirstComputedField () throws TFormerException
 Gets the first ComputedField defined in the DataSource. More...
 
DSFieldMapping getFirstDSFieldMapping () throws TFormerException
 Gets the first DSFieldMapping defined in the DataSource. More...
 
DataSourceParameter getFirstParameter () throws TFormerException
 Gets the first DataSourceParameter defined in the DataSource. More...
 
String getName () throws TFormerException
 Gets the name of the DataSource. More...
 
DataSource getNext () throws TFormerException
 Gets the next DataSource instance defined in the Project. More...
 
int getNumberOfComputedFields () throws TFormerException
 Gets the number of ComputedFields defined in the DataSource. More...
 
int getNumberOfFieldMappings () throws TFormerException
 Gets the number of DSFieldMappings defined in the DataSource. More...
 
int getNumberOfParameters () throws TFormerException
 Gets the number of DataSourceParameters defined in the DataSource. More...
 
DataSourceParameter getParameter (String name) throws TFormerException
 Gets a DataSourceParameter defined in the DataSource. More...
 
String getPassword () throws TFormerException
 Gets the password for the database connection. More...
 
String getSqlSelect () throws TFormerException
 Gets the SQL SELECT statement of the DataSourceOdbc. More...
 
DataSourceType getType () throws TFormerException
 Gets the type of the DataSource. More...
 
String getUser () throws TFormerException
 Gets the user-name for the database connection. More...
 
boolean isDefault () throws TFormerException
 Gets a value indicating whether this object stores the default DataSource. More...
 
boolean isHandleEscapeSequences () throws TFormerException
 Gets if escape sequences should be translated on data retrieval or not. More...
 
void removeComputedField (ComputedField computedField) throws TFormerException
 Removes the ComputedField from the DataSource. More...
 
void removeComputedField (String name) throws TFormerException
 Removes the ComputedField from the DataSource. More...
 
void removeFieldMapping (DSFieldMapping fieldMapping) throws TFormerException
 Removes the DSFieldMapping from the DataSource. More...
 
void removeFieldMapping (String name) throws TFormerException
 Removes the DSFieldMapping from the DataSource. More...
 
void removeParameter (DataSourceParameter parameter) throws TFormerException
 Removes the DataSourceParameter from the DataSource. More...
 
void removeParameter (String name) throws TFormerException
 Removes the DataSourceParameter from the DataSource. More...
 
void setComment (String sComment) throws TFormerException
 Sets the comment for the DataSource. More...
 
void setCopyColumnName (String sCopyColumnName) throws TFormerException
 Sets the CopyColumnName of the DataSource. More...
 
void setDescription (String sDescription) throws TFormerException
 Sets the description of the DataSource. More...
 
void setDsn (String sDSN) throws TFormerException
 Sets the DSN of the DataSourceOdbc. More...
 
void setHandleEscapeSequences (boolean bEscapeSequences) throws TFormerException
 Sets if escape sequences should be translated on data retrieval or not. More...
 
void setName (String sName) throws TFormerException
 Sets the name of the DataSource. More...
 
void setPassword (String sPwd) throws TFormerException
 Sets the password for the database connection. More...
 
void setSqlSelect (String sSelect) throws TFormerException
 Sets the SQL SELECT statement of the DataSourceOdbc. More...
 
void setUser (String sUser) throws TFormerException
 Sets the user-name for the database connection. More...
 
String toString ()
 Returns a string representation of the instance. More...
 

Detailed Description

Specialized DataSource for ODBC data.

Overview

DataSourceOdbc is a specialized DataSource for importing data from an ODBC database. This class is used to manipulate existing DataSourceOdbc objects. To create a new DataSource use TFORMer Designer or Project.addDataSource.

The main properties to characterize a DataSourceOdbc are:

Modifying an Existing ODBC DataSource

Sample source code for modifying an existing ODBC-DataSource:

// Retrieve the global Project
// DataSources are defined in a Project or a global Project
Project project = repository.getGlobalProject ();
// Retrieve the DataSource by name
// Since we know the type of the DataSource, we can cast it to DataSourceOdbc
DataSourceOdbc dataSource = (DataSourceOdbc) (project.getDataSource ("ODBC"));
// Modify some DataSource properties
dataSource.setUser("");
dataSource.setPassword("");

Member Function Documentation

ComputedField addComputedField ( String  name) throws TFormerException
inherited

Creates and adds a ComputedField to the DataSource.

Parameters
nameThe name of the ComputedField
Returns
A new ComputedField
See also
ComputedField
DSFieldMapping addFieldMapping ( String  name) throws TFormerException
inherited

Creates and adds a DSFieldMapping to the DataSource.

Parameters
nameThe name of the DataField for which a DSFieldMapping should be created.
Returns
A new DSFieldMapping
DataSourceParameter addParameter ( String  name) throws TFormerException
inherited

Creates and adds a DataSourceParameter to the DataSource.

Parameters
nameThe name of the DataSourceParameter
Returns
A new DataSourceParameter
See also
DataSourceParameter
void dispose ( ) throws TFormerException
inherited

Releases the resources allocated by the instance.

Call this method in every case (even in case of exceptions) is this instance is not required anymore.

void dump ( PrintStream  s) throws IOException, TFormerException

Dumps the current instance into a text stream.

Parameters
sInstance of the stream
String getComment ( ) throws TFormerException
inherited

Gets the comment for the DataSource.

Returns
The comment for the DataSource
ComputedField getComputedField ( String  name) throws TFormerException
inherited

Gets a ComputedField defined in the DataSource.

Parameters
nameThe name of the ComputedField
Returns
A valid object instance or null
See also
ComputedField
String getCopyColumnName ( ) throws TFormerException
inherited

Gets the CopyColumnName of the DataSource.

Returns
The CopyColumnName of the DataSource
See also
DataSource
String getDescription ( ) throws TFormerException
inherited

Gets the description of the DataSource.

Returns
The description of the DataSource
String getDsn ( ) throws TFormerException

Gets the DSN of the DataSourceOdbc.

Returns
The DSN of the DataSourceOdbc
DSFieldMapping getFieldMapping ( String  name) throws TFormerException
inherited

Gets a DSFieldMapping defined in the DataSource.

Retrieves the DSFieldMapping for a given DataField name from the DataSource

Parameters
nameThe name of a DataField
Returns
A valid object instance or null
ComputedField getFirstComputedField ( ) throws TFormerException
inherited

Gets the first ComputedField defined in the DataSource.

Returns
The first ComputedField object in the list or null
See also
ComputedField
DSFieldMapping getFirstDSFieldMapping ( ) throws TFormerException
inherited

Gets the first DSFieldMapping defined in the DataSource.

Returns
The first DSFieldMapping in the list or null
DataSourceParameter getFirstParameter ( ) throws TFormerException
inherited

Gets the first DataSourceParameter defined in the DataSource.

Returns
The first DataSourceParameter defined in the DataSource or null
See also
DataSourceParameter
String getName ( ) throws TFormerException
inherited

Gets the name of the DataSource.

Returns
The name of the DataSource
DataSource getNext ( ) throws TFormerException
inherited

Gets the next DataSource instance defined in the Project.

A Project stores a list of DataSource objects. To retrieve the first DataSource in the Project see Project.getFirstDataSource.

Returns
null if there aren't other instances in the Project, otherwise a valid instance of this class (DataSourceCsv, DataSourceOdbc or DataSourceXml)
See also
Project
int getNumberOfComputedFields ( ) throws TFormerException
inherited

Gets the number of ComputedFields defined in the DataSource.

Returns
The number of ComputedFields defined in the DataSource
See also
ComputedField
int getNumberOfFieldMappings ( ) throws TFormerException
inherited

Gets the number of DSFieldMappings defined in the DataSource.

Returns
The number of DSFieldMappings defined in the DataSource
int getNumberOfParameters ( ) throws TFormerException
inherited

Gets the number of DataSourceParameters defined in the DataSource.

Returns
The number of DataSourceParameters defined in the DataSource
See also
DataSourceParameter
DataSourceParameter getParameter ( String  name) throws TFormerException
inherited

Gets a DataSourceParameter defined in the DataSource.

Parameters
nameThe name of the DataSourceParameter
Returns
A valid object instance or null
See also
DataSourceParameter
String getPassword ( ) throws TFormerException

Gets the password for the database connection.

Returns
The password for the DSN
String getSqlSelect ( ) throws TFormerException

Gets the SQL SELECT statement of the DataSourceOdbc.

Returns
The SQL SELECT statement of the DataSourceOdbc
DataSourceType getType ( ) throws TFormerException
inherited

Gets the type of the DataSource.

The DataSourceType is read-only, and is set on creation. It specifies the type of a DataSource (e.g. DataSourceOdbc, DataSourceCsv, DataSourceXml).

Returns
The DataSourceType of the DataSource
String getUser ( ) throws TFormerException

Gets the user-name for the database connection.

Returns
The user-name for the DSN
boolean isDefault ( ) throws TFormerException
inherited

Gets a value indicating whether this object stores the default DataSource.

Returns
true if this DataSource is the default DataSource.
See also
DataSource
boolean isHandleEscapeSequences ( ) throws TFormerException
inherited

Gets if escape sequences should be translated on data retrieval or not.

Returns
true if escape sequences should be translated.
See also
Escape Sequences, DataSource
void removeComputedField ( ComputedField  computedField) throws TFormerException
inherited

Removes the ComputedField from the DataSource.

Parameters
computedFieldThe ComputedField
See also
ComputedField
void removeComputedField ( String  name) throws TFormerException
inherited

Removes the ComputedField from the DataSource.

Parameters
nameThe name of the ComputedField
See also
ComputedField
void removeFieldMapping ( DSFieldMapping  fieldMapping) throws TFormerException
inherited

Removes the DSFieldMapping from the DataSource.

Parameters
fieldMappingThe DSFieldMapping
void removeFieldMapping ( String  name) throws TFormerException
inherited

Removes the DSFieldMapping from the DataSource.

Parameters
nameThe name of the DataField for which the mapping should be deleted
void removeParameter ( DataSourceParameter  parameter) throws TFormerException
inherited

Removes the DataSourceParameter from the DataSource.

Parameters
parameterThe DataSourceParameter
See also
DataSourceParameter
void removeParameter ( String  name) throws TFormerException
inherited

Removes the DataSourceParameter from the DataSource.

Parameters
nameThe name of the DataSourceParameter
See also
DataSourceParameter
void setComment ( String  sComment) throws TFormerException
inherited

Sets the comment for the DataSource.

Parameters
sCommentThe comment for the DataSource
void setCopyColumnName ( String  sCopyColumnName) throws TFormerException
inherited

Sets the CopyColumnName of the DataSource.

Parameters
sCopyColumnNameThe CopyColumnName of the DataSource
See also
DataSource
void setDescription ( String  sDescription) throws TFormerException
inherited

Sets the description of the DataSource.

Parameters
sDescriptionThe description of the DataSource
void setDsn ( String  sDSN) throws TFormerException

Sets the DSN of the DataSourceOdbc.

Parameters
sDSNThe DSN of the DataSourceOdbc
void setHandleEscapeSequences ( boolean  bEscapeSequences) throws TFormerException
inherited

Sets if escape sequences should be translated on data retrieval or not.

Parameters
bEscapeSequencestrue if escape sequences should be translated.
See also
Escape Sequences, DataSource
void setName ( String  sName) throws TFormerException
inherited

Sets the name of the DataSource.

Parameters
sNameThe name of the DataSource
void setPassword ( String  sPwd) throws TFormerException

Sets the password for the database connection.

Parameters
sPwdThe password for the DSN
void setSqlSelect ( String  sSelect) throws TFormerException

Sets the SQL SELECT statement of the DataSourceOdbc.

Parameters
sSelectThe SQL SELECT statement of the DataSourceOdbc
void setUser ( String  sUser) throws TFormerException

Sets the user-name for the database connection.

Parameters
sUserThe user-name for the DSN
String toString ( )
inherited

Returns a string representation of the instance.

Returns
A string representation of the instance

© 2006-2017 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Fri Nov 3 2017 07:59:14 for TFORMer SDK - JAVA with doxygen 1.8.9.1