com.crystaldecisions.sdk.occa.report.data
Class Connection

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.data.Connection
All Implemented Interfaces:
IConnection, IClone

public class Connection
extends java.lang.Object
implements IConnection, IClone

This object contains information about a data source connection and the tables that belong to it.

Whenever possible, use the IConnection interface to manipulate this object.

See Also:
IDatabase.setConnections(Connections)

Constructor Summary
Connection()
           
Connection(IConnection src)
           
 
Method Summary
 java.lang.Object clone(boolean deepClone)
           
 void close()
          Closes the data source connection.
 void copyTo(java.lang.Object destObject, boolean deepCopy)
           
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
          For internal use only.
 void doControllerModification(java.lang.Object newObject)
          For internal use only.
 void endElement(java.lang.String eleName, java.util.Map objState)
          For internal use only.
 void enumerateMembers(IMemberVisitor visitor)
          For internal use only.
 IConnectionInfo getConnectionInfo()
          Gets connection information about this data source, which may include the connection type and logon credentials, for example.
 ControllableMixin getControllableMixin()
          For internal use only.
 java.lang.String getDescription()
          Gets the description of this data source connection.
 java.lang.String getLocation()
          The location of the connection (for example, a URI).
 java.lang.String getName()
          Gets the connection name.
 Fields getParameters()
          Gets the stored procedure parameters.
 TableJoins getTableJoins()
          Gets the table joins that define how tbales used in the connection are linked.
 Tables getTables()
          Returns the tables that belong to the connection.
 boolean getTablesFetched()
          Returns whether the tables that belong to the connection have been fetched from the server.
 boolean hasContent(java.lang.Object srcCon)
           
 boolean isDirectlyControllable()
          For internal use only.
 boolean isMatch(IConnection connection_, boolean completeMatching)
          For internal use only.
 boolean isOpen()
          Tests whether this data source connection is currently open.
 void open()
          Opens the data source connection.
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
          For internal use only.
 void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt)
          For internal use only.
 void save(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void setConnectionInfo(IConnectionInfo connectionInfo)
          Sets connection information about this data source, which may include the connection type and logon credentials, for example.
 void setDescription(java.lang.String description)
          Sets the description of this data source connection.
 void setLocation(java.lang.String location)
          The location of the connection (for example, a URI).
 void setName(java.lang.String name)
          Sets the connection name.
 void setParameters(Fields parameters)
          Sets the stored procedure parameters.
 void setTableJoins(TableJoins TableJoins)
          Sets the table joins that define how tables used in the connection are linked.
 void setTables(Tables tables)
          Returns the tables that belong to the connection.
 void setTablesFetched(boolean tablesFetched)
          Sets whether the tables that belong to the connection have been fetched from the server.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
          For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection(IConnection src)

Connection

public Connection()
Method Detail

getConnectionInfo

public IConnectionInfo getConnectionInfo()
Description copied from interface: IConnection
Gets connection information about this data source, which may include the connection type and logon credentials, for example.

Specified by:
getConnectionInfo in interface IConnection
Returns:
an IConnectionInfo object
See Also:
IConnectionInfo

setConnectionInfo

public void setConnectionInfo(IConnectionInfo connectionInfo)
Description copied from interface: IConnection
Sets connection information about this data source, which may include the connection type and logon credentials, for example.

Specified by:
setConnectionInfo in interface IConnection
Parameters:
connectionInfo - an IConnectionInfo object
See Also:
IConnectionInfo

getDescription

public java.lang.String getDescription()
Description copied from interface: IConnection
Gets the description of this data source connection.

Specified by:
getDescription in interface IConnection
Returns:
a String description of the connnection

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: IConnection
Sets the description of this data source connection.

Specified by:
setDescription in interface IConnection
Parameters:
description - a String description of the connnection

getName

public java.lang.String getName()
Description copied from interface: IConnection
Gets the connection name.

Specified by:
getName in interface IConnection
Returns:
the name of this data source connection

setName

public void setName(java.lang.String name)
Description copied from interface: IConnection
Sets the connection name.

Specified by:
setName in interface IConnection
Parameters:
name - the name for the data source connection

getParameters

public Fields getParameters()
Description copied from interface: IConnection
Gets the stored procedure parameters.

Specified by:
getParameters in interface IConnection
Returns:
a collection of IParameterField objects

setParameters

public void setParameters(Fields parameters)
Description copied from interface: IConnection
Sets the stored procedure parameters.

Specified by:
setParameters in interface IConnection
Parameters:
parameters - a collection of IParameterField objects

isOpen

public boolean isOpen()
               throws ReportSDKExceptionBase
Description copied from interface: IConnection
Tests whether this data source connection is currently open.

Specified by:
isOpen in interface IConnection
Returns:
true if connected to the data source, false otherwise
Throws:
ReportSDKExceptionBase

open

public void open()
          throws ReportSDKExceptionBase
Description copied from interface: IConnection
Opens the data source connection.

Specified by:
open in interface IConnection
Throws:
ReportSDKExceptionBase

close

public void close()
           throws ReportSDKExceptionBase
Description copied from interface: IConnection
Closes the data source connection.

Specified by:
close in interface IConnection
Throws:
ReportSDKExceptionBase

getControllableMixin

public ControllableMixin getControllableMixin()
For internal use only.


doControllerModification

public void doControllerModification(java.lang.Object newObject)
                              throws ReportSDKException
For internal use only.

Throws:
ReportSDKException

isDirectlyControllable

public boolean isDirectlyControllable()
For internal use only.


enumerateMembers

public void enumerateMembers(IMemberVisitor visitor)
For internal use only.


isMatch

public boolean isMatch(IConnection connection_,
                       boolean completeMatching)
For internal use only.


clone

public java.lang.Object clone(boolean deepClone)

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)

hasContent

public boolean hasContent(java.lang.Object srcCon)

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)
For internal use only.


endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)
For internal use only.


startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)
For internal use only.


readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)
For internal use only.


save

public void save(XMLWriter writer,
                 XMLSerializationContext ctxt)
          throws java.io.IOException
For internal use only.

Throws:
java.io.IOException

save

public void save(XMLWriter writer,
                 java.lang.String sTag,
                 XMLSerializationContext ctxt)
          throws java.io.IOException
For internal use only.

Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException
For internal use only.

Throws:
java.io.IOException

getLocation

public java.lang.String getLocation()
Description copied from interface: IConnection
The location of the connection (for example, a URI).

Specified by:
getLocation in interface IConnection
Returns:
The location of the connection as a String.

getTableJoins

public TableJoins getTableJoins()
Description copied from interface: IConnection
Gets the table joins that define how tbales used in the connection are linked.

Specified by:
getTableJoins in interface IConnection
Returns:
a collection of ITableJoin objects
See Also:
ITableJoin

getTables

public Tables getTables()
Description copied from interface: IConnection
Returns the tables that belong to the connection. Use IConnection.getTablesFetched() to see if these tables and TableLinks have been fetched from the server.

Specified by:
getTables in interface IConnection
Returns:
The tables as a Tables object.

getTablesFetched

public boolean getTablesFetched()
Description copied from interface: IConnection
Returns whether the tables that belong to the connection have been fetched from the server.

Specified by:
getTablesFetched in interface IConnection
Returns:
true if the tables that belong to the connection have been fetched from the server, and false otherwise.

setLocation

public void setLocation(java.lang.String location)
Description copied from interface: IConnection
The location of the connection (for example, a URI).

Specified by:
setLocation in interface IConnection
Parameters:
location - The location of the connection as a String.

setTableJoins

public void setTableJoins(TableJoins TableJoins)
Description copied from interface: IConnection
Sets the table joins that define how tables used in the connection are linked.

Specified by:
setTableJoins in interface IConnection
Parameters:
TableJoins - a collection of ITableJoin objects
See Also:
ITableJoin

setTables

public void setTables(Tables tables)
Description copied from interface: IConnection
Returns the tables that belong to the connection. Use IConnection.getTablesFetched() to see if these tables and TableLinks have been fetched from the server.

Specified by:
setTables in interface IConnection
Parameters:
tables - The tables as a Table object.

setTablesFetched

public void setTablesFetched(boolean tablesFetched)
Description copied from interface: IConnection
Sets whether the tables that belong to the connection have been fetched from the server.

Specified by:
setTablesFetched in interface IConnection
Parameters:
tablesFetched - true if the tables that belong to the connection have been fetched from the server, and false otherwise.