com.sap.sl.sdk.authoring.connection
Interface ConnectionFactory


public interface ConnectionFactory

Provides methods to create connections.

You create a ConnectionFactory instance by using SlContext.getService(Class).


Method Summary
 void close(SlResource resource)
          Releases the resource to avoid memory leak.
 OlapConnection createOlapConnection(java.lang.String name, java.lang.String dbms, java.lang.String networkLayer)
          Creates an OLAP connection.
 RelationalConnection createRelationalConnection(java.lang.String name, java.lang.String dbms, java.lang.String networkLayer)
          Creates a relational connection.
 

Method Detail

createRelationalConnection

RelationalConnection createRelationalConnection(java.lang.String name,
                                                java.lang.String dbms,
                                                java.lang.String networkLayer)
Creates a relational connection.

Every created resource must be released with the method close(SlResource) to avoid memory leak.

Parameters:
name - The name of the relational connection
dbms - The underlying database of the connection

For example, set the value to MS SQL Server 2008 to create a connection to the MS SQL Server 2008 database. See the "Connection Parameter Reference" section of the BI Semantic Layer Java SDK Developer Guide for a detailed list of supported parameters.

networkLayer - The underlying network layer of the connection

For example, set the value to JDBC Drivers to create a JDBC connection.

Returns:
A RelationalConnection object
Since:
14.0.5

createOlapConnection

OlapConnection createOlapConnection(java.lang.String name,
                                    java.lang.String dbms,
                                    java.lang.String networkLayer)
Creates an OLAP connection.

Every created resource must be released with the method close(SlResource) to avoid memory leak.

Parameters:
name - The name of the OLAP connection
dbms - The underlying database of the connection

For example, set the value to SAP BW 7.x to create a connection to the SAP Netweaver BI. See the "Connection Parameter Reference" section of the BI Semantic Layer Java SDK Developer Guide for a detailed list of supported parameters.

networkLayer - The underlying network layer of the connection

For example, set the value to SAP BICS Client to create the connection to SAP Netweaver BI 7.x.

Returns:
An OlapConnection object
Since:
14.0.5

close

void close(SlResource resource)
Releases the resource to avoid memory leak.

If a method is still using this resource after it has been closed, an SlException is raised.

The following methods also release this resource:

Parameters:
resource - The resource to release
Since:
14.0.5


© Copyright 2016 SAP SE or an SAP affiliate company. All rights reserved.