Style Intelligence v12.0

inetsoft.uql.jdbc
Class JDBCDataSource

java.lang.Object
  extended by inetsoft.uql.XDataSource
      extended by inetsoft.uql.jdbc.JDBCDataSource
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class JDBCDataSource
extends XDataSource

JDBC data source represents a SQL database. It records JDBC URL and driver class.

See Also:
Serialized Form

Field Summary
static String ACCESS
          Access data source.
static int CATALOG_SCHEMA_OPTION
          Table name option as catalog.schema.table.
static String CLOUDSCAPE
          Cloudscape jdbc data source.
static String DB2
          Db2 jdbc data source.
static int DEFAULT_OPTION
           
static String HIVE
          Hadoop Hive JDBC data source.
static String INFORMIX
          Informix jdbc data source.
static String INGRES
          Ingres jdbc data source.
static int JDBC_ACCESS
          Access data source.
static int JDBC_CLOUDSCAPE
          Cloudscape jdbc data source.
static int JDBC_DB2
          Db2 jdbc data source.
static int JDBC_HIVE
          Hadoop Hive JDBC data source.
static int JDBC_INFORMIX
          Informix jdbc data source.
static int JDBC_INGRES
          Ingres jdbc data source.
static int JDBC_LUCIDDB
          LucidDB jdbc data source.
static int JDBC_MYSQL
          My SQL jdbc data source.
static int JDBC_OBIEE
          Oracle BI data source.
static int JDBC_ODBC
          Normal jdbc odbc data source.
static int JDBC_ORACLE
          Oracle jdbc data source.
static int JDBC_POSTGRESQL
          PostgreSQL jdbc data source.
static int JDBC_SQLANYWHERE
          SQL anywhere jdbc data source.
static int JDBC_SQLSERVER
          SQL server data source.
static int JDBC_SYBASE
          Sybase jdbc data source.
static String LUCIDDB
          LucidDB jdbc data source.
static String MYSQL
          My SQL jdbc data source.
static String OBIEE
          Oracle BI data source.
static String ODBC
          Normal jdbc odbc data source.
static String ORACLE
          Oracle jdbc data source.
static String POSTGRESQL
          PostgreSQL jdbc data source.
static int SCHEMA_OPTION
          Table name option as schema.table.
static String SQLANYWHERE
          SQL anywhere jdbc data source.
static String SQLSERVER
          SQL server data source.
static String SYBASE
          Sybase jdbc data source.
static int TABLE_OPTION
          Table name option as table.
 
Fields inherited from class inetsoft.uql.XDataSource
CORBA, DOMAIN_DB2, DOMAIN_NONE, DOMAIN_ORACLE, DOMAIN_SQL, DOMAIN_SQLSERVER, EJB, JDBC, OBJECT, SAP, SOAP, TEXT, XML, XMLA
 
Constructor Summary
JDBCDataSource()
          Create a JDBC data source.
 
Method Summary
 void addDatasource(JDBCDataSource datasource)
          Add additional connection.
 boolean checkDatabaseType(int type)
          Check if the database is a special type.
 boolean containDatasource(String name)
          Check if additional connection exists.
 boolean equals(Object obj)
          Check if equals another object.
 JDBCDataSource getBaseDatasource()
           
 int getDatabaseType()
          Get the database type.
 String getDatabaseTypeString()
           
 JDBCDataSource getDataSource(String name)
          Get additional datasource by special name.
 String[] getDataSourceNames()
          Get names of additional connections.
 String getDefaultDatabase()
          Get the default database name.
 int getDomainType()
          Get the domain type associated with this datasource.
 String getDriver()
          Get the JDBC driver class full name.
 String getIdentity()
          Identity of an datasource.
 int getMaxCursor()
          Get the max cursor number the database allow to proceed at the same time.
 UserVariable[] getParameters()
          Get the data source connection parameters.
 String getPassword()
          Get the used user password.
 String getProductName()
          Get the used product id.
 String getProductVersion()
          Get the product version.
 String[] getSystemCatalogs()
          Get a list of the catalogs this datasource uses for system tables.
 String[] getSystemSchemas()
          Get a list of the schemas this datasource uses for system tables.
 int getTableNameOption()
          Get the table name option.
 int getTransactionIsolation()
          Get the transaction isolation level.
 String getURL()
          Get the JDBC URL of the JDBC data source.
 String getURL(boolean runtime)
          Get the JDBC URL of the JDBC data source.
 String getUser()
          Get the used user id.
 boolean isAnsiJoin()
          Check whether to use the ANSI join syntax for inner and outer joins.
 boolean isMVEnabled()
          Return if materialized view is allowed to create on this datasource.
 boolean isRequireLogin()
          Check if this data soure requires user login.
 boolean isRequireSave()
          Check if this data soure requires save user and password.
 void parseXML(Element root)
          Parse the XML element that contains information on this data source.
 void removeDatasource(String name)
          Remove additional connection.
 void renameDatasource(String oname, String nname)
          Rename additional datasource.
 void setAnsiJoin(boolean ansi)
          Set whether to use the ANSI join syntax for inner and outer joins.
 void setBaseDatasource(JDBCDataSource base)
           
 void setDatabaseType(int type)
          Set the database type.
 void setDefaultDatabase(String dbname)
          Set the default database name.
 void setDriver(String driver)
          Set the JDBC driver class full name.
 void setMVEnabled(boolean enabled)
           
 void setPassword(String password)
          Set the user password.
 void setProductName(String product)
          Set the product id.
 void setProductVersion(String version)
          Set the product version.
 void setRequireLogin(boolean login)
          Set whether this data source requires user login during connection.
 void setRequireSave(boolean save)
          Set whether this data source requires save user and password.
 void setTableNameOption(int option)
          Set the table name option.
 void setTransactionIsolation(int level)
          Set the transaction isolation level.
 void setURL(String url)
          Set the JDBC URL of the JDBC data source.
 void setUser(String user)
          Set the user id.
 boolean supportsCancel()
          Check if the specified data source supports cancel.
 void writeXML(PrintWriter writer)
          Generate the XML segment to represent this data source.
 
Methods inherited from class inetsoft.uql.XDataSource
addFolder, clone, getDescription, getFolders, getFullName, getName, getRuntimeValue, getType, hashCode, removeFolder, removeFolders, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JDBC_ODBC

public static final int JDBC_ODBC
Normal jdbc odbc data source.

See Also:
Constant Field Values

JDBC_ORACLE

public static final int JDBC_ORACLE
Oracle jdbc data source.

See Also:
Constant Field Values

JDBC_SYBASE

public static final int JDBC_SYBASE
Sybase jdbc data source.

See Also:
Constant Field Values

JDBC_INFORMIX

public static final int JDBC_INFORMIX
Informix jdbc data source.

See Also:
Constant Field Values

JDBC_DB2

public static final int JDBC_DB2
Db2 jdbc data source.

See Also:
Constant Field Values

JDBC_MYSQL

public static final int JDBC_MYSQL
My SQL jdbc data source.

See Also:
Constant Field Values

JDBC_ACCESS

public static final int JDBC_ACCESS
Access data source.

See Also:
Constant Field Values

JDBC_SQLSERVER

public static final int JDBC_SQLSERVER
SQL server data source.

See Also:
Constant Field Values

JDBC_INGRES

public static final int JDBC_INGRES
Ingres jdbc data source.

See Also:
Constant Field Values

JDBC_CLOUDSCAPE

public static final int JDBC_CLOUDSCAPE
Cloudscape jdbc data source.

See Also:
Constant Field Values

JDBC_SQLANYWHERE

public static final int JDBC_SQLANYWHERE
SQL anywhere jdbc data source.

See Also:
Constant Field Values

JDBC_POSTGRESQL

public static final int JDBC_POSTGRESQL
PostgreSQL jdbc data source.

See Also:
Constant Field Values

JDBC_LUCIDDB

public static final int JDBC_LUCIDDB
LucidDB jdbc data source.

See Also:
Constant Field Values

JDBC_HIVE

public static final int JDBC_HIVE
Hadoop Hive JDBC data source.

See Also:
Constant Field Values

JDBC_OBIEE

public static final int JDBC_OBIEE
Oracle BI data source.

See Also:
Constant Field Values

ODBC

public static final String ODBC
Normal jdbc odbc data source.

See Also:
Constant Field Values

ORACLE

public static final String ORACLE
Oracle jdbc data source.

See Also:
Constant Field Values

SYBASE

public static final String SYBASE
Sybase jdbc data source.

See Also:
Constant Field Values

INFORMIX

public static final String INFORMIX
Informix jdbc data source.

See Also:
Constant Field Values

DB2

public static final String DB2
Db2 jdbc data source.

See Also:
Constant Field Values

MYSQL

public static final String MYSQL
My SQL jdbc data source.

See Also:
Constant Field Values

ACCESS

public static final String ACCESS
Access data source.

See Also:
Constant Field Values

SQLSERVER

public static final String SQLSERVER
SQL server data source.

See Also:
Constant Field Values

INGRES

public static final String INGRES
Ingres jdbc data source.

See Also:
Constant Field Values

CLOUDSCAPE

public static final String CLOUDSCAPE
Cloudscape jdbc data source.

See Also:
Constant Field Values

SQLANYWHERE

public static final String SQLANYWHERE
SQL anywhere jdbc data source.

See Also:
Constant Field Values

POSTGRESQL

public static final String POSTGRESQL
PostgreSQL jdbc data source.

See Also:
Constant Field Values

LUCIDDB

public static final String LUCIDDB
LucidDB jdbc data source. the suffix NONE represents the database only supports TRANSACTION_NONE isolation leveL

See Also:
Constant Field Values

HIVE

public static final String HIVE
Hadoop Hive JDBC data source.

See Also:
Constant Field Values

OBIEE

public static final String OBIEE
Oracle BI data source.

See Also:
Constant Field Values

CATALOG_SCHEMA_OPTION

public static final int CATALOG_SCHEMA_OPTION
Table name option as catalog.schema.table.

See Also:
Constant Field Values

SCHEMA_OPTION

public static final int SCHEMA_OPTION
Table name option as schema.table.

See Also:
Constant Field Values

TABLE_OPTION

public static final int TABLE_OPTION
Table name option as table.

See Also:
Constant Field Values

DEFAULT_OPTION

public static final int DEFAULT_OPTION
See Also:
Constant Field Values
Constructor Detail

JDBCDataSource

public JDBCDataSource()
Create a JDBC data source.

Method Detail

setDriver

public void setDriver(String driver)
Set the JDBC driver class full name.


getDriver

public String getDriver()
Get the JDBC driver class full name.


getMaxCursor

public int getMaxCursor()
Get the max cursor number the database allow to proceed at the same time.


setURL

public void setURL(String url)
Set the JDBC URL of the JDBC data source.


getURL

public String getURL()
Get the JDBC URL of the JDBC data source.


getURL

public String getURL(boolean runtime)
Get the JDBC URL of the JDBC data source.


setRequireLogin

public void setRequireLogin(boolean login)
Set whether this data source requires user login during connection.


isRequireLogin

public boolean isRequireLogin()
Check if this data soure requires user login.


setRequireSave

public void setRequireSave(boolean save)
Set whether this data source requires save user and password.


isRequireSave

public boolean isRequireSave()
Check if this data soure requires save user and password.


setDefaultDatabase

public void setDefaultDatabase(String dbname)
Set the default database name. If this option is not set, the connection uses the default database for the login.


getDefaultDatabase

public String getDefaultDatabase()
Get the default database name.


setUser

public void setUser(String user)
Set the user id.


getUser

public String getUser()
Get the used user id.


supportsCancel

public boolean supportsCancel()
Check if the specified data source supports cancel.


setMVEnabled

public void setMVEnabled(boolean enabled)

setPassword

public void setPassword(String password)
Set the user password.


getPassword

public String getPassword()
Get the used user password.


setProductName

public void setProductName(String product)
Set the product id.


getProductName

public String getProductName()
Get the used product id.


setProductVersion

public void setProductVersion(String version)
Set the product version.


getProductVersion

public String getProductVersion()
Get the product version.


setTransactionIsolation

public void setTransactionIsolation(int level)
Set the transaction isolation level.

Parameters:
level - one of the constants defined in java.sql.Connection.

getTransactionIsolation

public int getTransactionIsolation()
Get the transaction isolation level.

Returns:
isolation level or -1 if using driver default.

setTableNameOption

public void setTableNameOption(int option)
Set the table name option.

Parameters:
option - the selected table option.

getTableNameOption

public int getTableNameOption()
Get the table name option.

Returns:
the table name option.

setAnsiJoin

public void setAnsiJoin(boolean ansi)
Set whether to use the ANSI join syntax for inner and outer joins.


isAnsiJoin

public boolean isAnsiJoin()
Check whether to use the ANSI join syntax for inner and outer joins.


isMVEnabled

public boolean isMVEnabled()
Return if materialized view is allowed to create on this datasource.

Overrides:
isMVEnabled in class XDataSource

setDatabaseType

public void setDatabaseType(int type)
Set the database type.

Parameters:
type - a constant represents the database type.

getDatabaseType

public int getDatabaseType()
Get the database type.

Returns:
a constant represents the database type.

getDatabaseTypeString

public String getDatabaseTypeString()

getDomainType

public int getDomainType()
Get the domain type associated with this datasource. Return DOMAIN_NONE if this datasource does not support domain.

Overrides:
getDomainType in class XDataSource

checkDatabaseType

public boolean checkDatabaseType(int type)
Check if the database is a special type.

Parameters:
type - a constant represents the database type.

getParameters

public UserVariable[] getParameters()
Get the data source connection parameters.

Specified by:
getParameters in class XDataSource

equals

public boolean equals(Object obj)
Description copied from class: XDataSource
Check if equals another object.

Overrides:
equals in class XDataSource

parseXML

public void parseXML(Element root)
              throws Exception
Parse the XML element that contains information on this data source.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Overrides:
parseXML in class XDataSource
Throws:
Exception

writeXML

public void writeXML(PrintWriter writer)
Generate the XML segment to represent this data source.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Overrides:
writeXML in class XDataSource

getSystemSchemas

public String[] getSystemSchemas()
Get a list of the schemas this datasource uses for system tables.


getSystemCatalogs

public String[] getSystemCatalogs()
Get a list of the catalogs this datasource uses for system tables.


containDatasource

public boolean containDatasource(String name)
Check if additional connection exists.


addDatasource

public void addDatasource(JDBCDataSource datasource)
Add additional connection.


getDataSourceNames

public String[] getDataSourceNames()
Get names of additional connections.


getDataSource

public JDBCDataSource getDataSource(String name)
Get additional datasource by special name.


renameDatasource

public void renameDatasource(String oname,
                             String nname)
Rename additional datasource.


removeDatasource

public void removeDatasource(String name)
Remove additional connection.


setBaseDatasource

public void setBaseDatasource(JDBCDataSource base)

getBaseDatasource

public JDBCDataSource getBaseDatasource()

getIdentity

public String getIdentity()
Identity of an datasource.


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