Style Intelligence v12.0

inetsoft.uql
Interface XDataService

All Known Subinterfaces:
XRepository
All Known Implementing Classes:
RemoteEngine, XEngine

public interface XDataService

This interface defines the API of the runtime query engine. It can be used to find the query parameters and execute queries. An instance of of the XDataService can be obtained from the XFactory class.


Method Summary
 Object bind(Object uinfo)
          Connect to the data service.
 void close(Object session)
          Close an active session.
 void connect(Object session, String query, VariableTable params)
          Initialize a data source connection.
 void connect(Object session, XDataSource dx, VariableTable params)
          Initialize a data source connection.
 XNode execute(Object session, String query, VariableTable vars)
          Deprecated.  
 XNode execute(Object session, String query, VariableTable vars, boolean resetVariables)
          Deprecated.  
 XNode execute(Object session, String query, VariableTable vars, Principal user)
          Deprecated.  
 XNode execute(Object session, String query, VariableTable vars, Principal user, boolean resetVariables)
          Deprecated.  
 XNode execute(Object session, String query, VariableTable vars, Principal user, boolean resetVariables, inetsoft.util.DataCacheVisitor visitor)
          Execute the query and return the result set.
 XNode execute(Object session, XQuery xquery, VariableTable vars)
          Deprecated.  
 XNode execute(Object session, XQuery xquery, VariableTable vars, boolean resetVariables)
          Deprecated.  
 XNode execute(Object session, XQuery xquery, VariableTable vars, Principal user)
          Deprecated.  
 XNode execute(Object session, XQuery xquery, VariableTable vars, Principal user, boolean resetVariables)
          Deprecated.  
 XNode execute(Object session, XQuery xquery, VariableTable vars, Principal user, boolean resetVariables, inetsoft.util.DataCacheVisitor visitor)
          Execute the query and return the result set.
 UserVariable[] getConnectionParameters(Object session, String query)
          Get the parameters for a data source.
 UserVariable[] getConnectionParameters(Object session, XDataSource dx)
          Get the parameters for a data source.
 UserVariable[] getConnectionParameters(Object session, XQuery xquery)
          Get the parameters for a data source.
 XHandler getHandler(Object session, XDataSource dx, VariableTable params)
          Get the handler.
 UserVariable[] getQueryParameters(Object session, String query, boolean promptOnly)
          Get the parameters for a query.
 UserVariable[] getQueryParameters(Object session, XQuery xquery, boolean promptOnly)
          Get the parameters for a query.
 void testDataSource(Object session, XDataSource dx, VariableTable params)
          Test a data source connection.
 

Method Detail

bind

Object bind(Object uinfo)
            throws RemoteException,
                   AccessException
Connect to the data service.

Parameters:
uinfo - user info.
Returns:
session object.
Throws:
RemoteException
AccessException

getConnectionParameters

UserVariable[] getConnectionParameters(Object session,
                                       String query)
                                       throws RemoteException
Get the parameters for a data source. The parameters should be filled in and passed to the connect method. If the data source is already connected or the data source does not require any connection parameter, the method returns an empty array.

Parameters:
session - session object.
query - query name.
Returns:
list of variables, or null if no user variable is needed for the connection.
Throws:
RemoteException

getConnectionParameters

UserVariable[] getConnectionParameters(Object session,
                                       XQuery xquery)
                                       throws RemoteException
Get the parameters for a data source. The parameters should be filled in and passed to the connect method. If the data source is already connected or the data source does not require any connection parameter, the method returns an empty array.

Parameters:
session - session object.
xquery - query to get the connection parameters.
Returns:
list of variables, or null if no user variable is needed for the connection.
Throws:
RemoteException

getConnectionParameters

UserVariable[] getConnectionParameters(Object session,
                                       XDataSource dx)
                                       throws RemoteException
Get the parameters for a data source. The parameters should be filled in and passed to the connect method. If the data source is already connected or the data source does not require any connection parameter, the method returns an empty array.

Parameters:
session - session object.
dx - data source to get connection parameters.
Throws:
RemoteException

getQueryParameters

UserVariable[] getQueryParameters(Object session,
                                  String query,
                                  boolean promptOnly)
                                  throws RemoteException
Get the parameters for a query. The parameters should be filled in and passed to execute().

Parameters:
session - session object.
query - query name.
promptOnly - true if only include the user variables that are declared as 'Prompt User'.
Returns:
list of variables, or null if no user variable is needed for the query.
Throws:
RemoteException

getQueryParameters

UserVariable[] getQueryParameters(Object session,
                                  XQuery xquery,
                                  boolean promptOnly)
                                  throws RemoteException
Get the parameters for a query. The parameters should be filled in and passed to execute().

Parameters:
session - session object.
xquery - query to get parameters.
promptOnly - true if only include the user variables that are declared as 'Prompt User'.
Returns:
list of variables, or null if no user variable is needed for the query.
Throws:
RemoteException

testDataSource

void testDataSource(Object session,
                    XDataSource dx,
                    VariableTable params)
                    throws Exception
Test a data source connection. The data source connection is shared by a session.

Parameters:
session - session object.
dx - datasource.
params - connection parameters.
Throws:
Exception

connect

void connect(Object session,
             String query,
             VariableTable params)
             throws Exception
Initialize a data source connection. The data source connection is shared by a session. A connection does not have to be created directly. If a connection is not created by the time a query is executed, a connection will be created in the execute() call. However, it the data source uses any parameters to establish a connection, it is strongly recommended that the connection parameters and connection itself being made explicitly before any query is executed.

Parameters:
session - session object.
query - query name.
params - connection parameters.
Throws:
Exception

connect

void connect(Object session,
             XDataSource dx,
             VariableTable params)
             throws Exception
Initialize a data source connection. The data source connection is shared by a session.

Parameters:
session - session object.
dx - specified data source.
params - connection parameters.
Throws:
Exception

getHandler

XHandler getHandler(Object session,
                    XDataSource dx,
                    VariableTable params)
                    throws Exception
Get the handler.

Parameters:
session - the specified session object.
dx - the specified data source.
params - the specified variable table.
Throws:
Exception

execute

XNode execute(Object session,
              String query,
              VariableTable vars)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
query - query to execute.
vars - variable values for the query.
Throws:
Exception

execute

XNode execute(Object session,
              String query,
              VariableTable vars,
              boolean resetVariables)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
query - query to execute.
vars - variable values for the query.
resetVariables - true if should reset cached variables.
Throws:
Exception

execute

XNode execute(Object session,
              String query,
              VariableTable vars,
              Principal user)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
query - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
Throws:
Exception

execute

XNode execute(Object session,
              String query,
              VariableTable vars,
              Principal user,
              boolean resetVariables)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
query - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
resetVariables - true if should reset cached variables.
Throws:
Exception

execute

XNode execute(Object session,
              String query,
              VariableTable vars,
              Principal user,
              boolean resetVariables,
              inetsoft.util.DataCacheVisitor visitor)
              throws Exception
Execute the query and return the result set.

Parameters:
session - session object.
query - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
resetVariables - true if should reset cached variables.
visitor - used to process cache facility.
Throws:
Exception

execute

XNode execute(Object session,
              XQuery xquery,
              VariableTable vars)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
xquery - query to execute.
vars - variable values for the query.
Throws:
Exception

execute

XNode execute(Object session,
              XQuery xquery,
              VariableTable vars,
              boolean resetVariables)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
xquery - query to execute.
vars - variable values for the query.
resetVariables - true if should reset cached variables.
Throws:
Exception

execute

XNode execute(Object session,
              XQuery xquery,
              VariableTable vars,
              Principal user)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
xquery - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
Throws:
Exception

execute

XNode execute(Object session,
              XQuery xquery,
              VariableTable vars,
              Principal user,
              boolean resetVariables)
              throws Exception
Deprecated. 

Execute the query and return the result set.

Parameters:
session - session object.
xquery - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
resetVariables - true if should reset cached variables.
Throws:
Exception

execute

XNode execute(Object session,
              XQuery xquery,
              VariableTable vars,
              Principal user,
              boolean resetVariables,
              inetsoft.util.DataCacheVisitor visitor)
              throws Exception
Execute the query and return the result set.

Parameters:
session - session object.
xquery - query to execute.
vars - variable values for the query.
user - a Principal object that identifies the user executing the query.
resetVariables - true if should reset cached variables.
visitor - used to process cache facility.
Throws:
Exception

close

void close(Object session)
           throws RemoteException
Close an active session.

Parameters:
session - session object.
Throws:
RemoteException

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.