Methods Summary |
---|
public void | bindAllParameters()PUBLIC:
Bind all arguments to any SQL statement.
setShouldBindAllParameters(true);
|
public oracle.toplink.essentials.internal.databaseaccess.Accessor | buildAccessor()INTERNAL:
Build and return an appropriate Accessor.
The default is a DatabaseAccessor.
return new DatabaseAccessor();
|
public void | cacheAllStatements()PUBLIC:
Cache all prepared statements, this requires full parameter binding as well.
setShouldCacheAllStatements(true);
|
public void | dontBindAllParameters()PUBLIC:
Do not bind all arguments to any SQL statement.
setShouldBindAllParameters(false);
|
public void | dontCacheAllStatements()PUBLIC:
Do not cache all prepared statements.
setShouldCacheAllStatements(false);
|
public void | dontOptimizeDataConversion()PUBLIC:
Disable driver level data conversion optimization.
This can be disabled as some drivers perform data conversion themselves incorrectly.
setShouldOptimizeDataConversion(false);
|
public void | dontUseByteArrayBinding()PUBLIC:
TopLink can be configured to use parameter binding for large binary data.
By default TopLink will print this data as hex through the JDBC binary excape clause.
Both binding and printing have various limits on all databases (e.g. 5k - 32k).
setUsesByteArrayBinding(false);
|
public void | dontUseNativeSQL()PUBLIC:
TopLink can be configured to use database-specific SQL grammar,
as opposed to the JDBC standard grammar.
This is because, unfortunately, some drivers to not support the full JDBC standard.
By default TopLink uses the JDBC SQL grammar.
setUsesNativeSQL(false);
|
public void | dontUseStreamsForBinding()PUBLIC:
TopLink can be configured to use streams to store large binary data.
setUsesStreamsForBinding(false);
|
public void | dontUseStringBinding()PUBLIC:
Do not bind strings of any size.
getPlatform().setStringBindingSize(0);
getPlatform().setUsesStringBinding(false);
|
protected boolean | driverIs(java.lang.String driverName)INTERNAL:
Return whether the specified driver is being used.
try {
return getDriverClassName().equals(driverName);
} catch (ValidationException e) {
// this exception will be thrown if we are using something other than a DefaultConnector
return false;
}
|
public java.lang.String | getConnectionString()PUBLIC:
Return the JDBC connection string.
This is a combination of the driver-specific URL header and the database URL.
return getDefaultConnector().getConnectionString();
|
public int | getCursorCode()ADVANCED:
Return the code for preparing cursored output
parameters in a stored procedure
return getPlatform().getCursorCode();
|
public java.lang.String | getDataSourceName()PUBLIC:
The data source name is required if connecting through ODBC (JDBC-ODBC, etc.).
This is the ODBC name given in the ODBC Data Source Administrator.
This is just the database part of the URL.
return getDatabaseURL();
|
public java.lang.String | getDatabaseName()PUBLIC:
The database name is required when connecting to databases that support
multiple databases within a single server instance (e.g. Sybase, SQL Server).
This is ONLY used when connecting through ODBC type JDBC drivers.
This is NEVER used with Oracle.
return properties.getProperty("database");
|
public java.lang.String | getDatabaseURL()PUBLIC:
The database URL is the JDBC URL for the database server.
The driver header is not be included in this URL
(e.g. "dbase files"; not "jdbc:odbc:dbase files").
return getDefaultConnector().getDatabaseURL();
|
protected oracle.toplink.essentials.sessions.DefaultConnector | getDefaultConnector()INTERNAL:
Return the connector that will instantiate the java.sql.Connection.
try {
return (DefaultConnector)getConnector();
} catch (ClassCastException e) {
throw ValidationException.invalidConnector(connector);
}
|
public java.lang.String | getDriverClassName()PUBLIC:
The driver class is the name of the Java class for the JDBC driver being used
(e.g. "sun.jdbc.odbc.JdbcOdbcDriver").
return getDefaultConnector().getDriverClassName();
|
public java.lang.String | getDriverURLHeader()PUBLIC:
The driver URL header is the string predetermined by the JDBC driver to be
part of the URL connection string, (e.g. "jdbc:odbc:").
This is required to connect to the database.
return getDefaultConnector().getDriverURLHeader();
|
public java.lang.String | getServerName()PUBLIC:
The server name is the name of the database instance.
This is ONLY required if using an ODBC JDBC driver
and overriding the server name specified in the ODBC
Data Source Administrator.
return properties.getProperty("server");
|
public boolean | getShouldBindAllParameters()PUBLIC:
Used to help bean introspection.
return shouldBindAllParameters();
|
public boolean | getShouldCacheAllStatements()PUBLIC:
Used to help bean introspection.
return shouldCacheAllStatements();
|
public boolean | getShouldOptimizeDataConversion()PUBLIC:
Used to help bean introspection.
return shouldOptimizeDataConversion();
|
public boolean | getShouldTrimStrings()PUBLIC:
Used to help bean introspection.
return shouldTrimStrings();
|
public int | getStatementCacheSize()PUBLIC:
If prepared statement caching is used, return the cache size.
The default is 50.
return getPlatform().getStatementCacheSize();
|
public int | getStringBindingSize()PUBLIC:
Used to help bean introspection.
return getPlatform().getStringBindingSize();
|
public int | getTransactionIsolation()PUBLIC:
Return the transaction isolation setting for the connection.
Return -1 if it has not been set.
return getPlatform().getTransactionIsolation();
|
public boolean | getUsesBinding()PUBLIC:
Used to help bean introspection.
return shouldUseByteArrayBinding();
|
public boolean | getUsesNativeSQL()PUBLIC:
Used to help bean introspection.
return shouldUseNativeSQL();
|
public boolean | getUsesNativeSequencing()PUBLIC:
Used to help bean introspection.
return shouldUseNativeSequencing();
|
public boolean | getUsesStreamsForBinding()PUBLIC:
Used to help bean introspection.
return shouldUseStreamsForBinding();
|
public boolean | getUsesStringBinding()PUBLIC:
Used to help bean introspection.
return getPlatform().usesStringBinding();
|
public void | handleTransactionsManuallyForSybaseJConnect()PUBLIC:
Force TopLink to manually begin transactions instead of using autoCommit.
Although autoCommit should be used, and work, under JDBC,
some drivers (e.g. Sybase JConnect)
do not correctly map autoCommit to transactions, so stored procedures
may not work correctly.
This property should only be used as a workaround for the
Sybase JConnect transaction problem.
getPlatform().setSupportsAutoCommit(false);
|
public boolean | isAnyOracleJDBCDriver()PUBLIC:
Return whether an Oracle JDBC driver is being used.
return oracleDriverIs("jdbc:oracle:");
|
public boolean | isCloudscapeJDBCDriver()PUBLIC:
Return whether a Cloudscape JDBC driver is being used.
return driverIs("COM.cloudscape.core.JDBCDriver");
|
public boolean | isDB2JDBCDriver()PUBLIC:
Return whether an IBM DB2 native client JDBC driver is being used.
return driverIs("COM.ibm.db2.jdbc.app.DB2Driver");
|
public boolean | isIntersolvSequeLinkDriver()PUBLIC:
Return whether an Intersolv SeqeLink JDBC driver is being used.
return driverIs("intersolv.jdbc.sequelink.SequeLinkDriver");
|
public boolean | isJConnectDriver()PUBLIC:
Return whether a Sybase JConnect JDBC driver is being used.
return driverIs("com.sybase.jdbc.SybDriver");
|
public boolean | isJDBCConnectDriver()PUBLIC:
Return whether a Borland JDBCConnect JDBC driver is being used.
return driverIs("borland.jdbc.Bridge.LocalDriver");
|
public boolean | isJDBCConnectRemoteDriver()PUBLIC:
Return whether a Borland JDBCConnect JDBC driver is being used.
return driverIs("borland.jdbc.Broker.RemoteDriver");
|
public boolean | isJDBCODBCBridge()PUBLIC:
Return whether a Sun/Merant JDBC-ODBC bridge driver is being used.
return driverIs("sun.jdbc.odbc.JdbcOdbcDriver");
|
public boolean | isOracle7JDBCDriver()PUBLIC:
Return whether an Oracle native 7.x OCI JDBC driver is being used.
return oracleDriverIs("jdbc:oracle:oci7:@");
|
public boolean | isOracleJDBCDriver()PUBLIC:
Return whether an Oracle 8.x native OCI JDBC driver is being used.
return oracleDriverIs("jdbc:oracle:oci8:@");
|
public boolean | isOracleServerJDBCDriver()PUBLIC:
Return whether an Oracle thin JDBC driver is being used.
return oracleDriverIs("jdbc:oracle:kprb:");
|
public boolean | isOracleThinJDBCDriver()PUBLIC:
Return whether an Oracle thin JDBC driver is being used.
return oracleDriverIs("jdbc:oracle:thin:@");
|
public boolean | isWebLogicOracleOCIDriver()PUBLIC:
Return whether a WebLogic Oracle OCI JDBC driver is being used.
return driverIs("weblogic.jdbc.oci.Driver");
|
public boolean | isWebLogicSQLServerDBLibDriver()PUBLIC:
Return whether a WebLogic SQL Server dblib JDBC driver is being used.
return driverIs("weblogic.jdbc.dblib.Driver");
|
public boolean | isWebLogicSQLServerDriver()PUBLIC:
Return whether a WebLogic SQL Server JDBC driver is being used.
return driverIs("weblogic.jdbc.mssqlserver4.Driver");
|
public boolean | isWebLogicSybaseDBLibDriver()PUBLIC:
Return whether a WebLogic Sybase dblib JDBC driver is being used.
return driverIs("weblogic.jdbc.dblib.Driver");
|
public boolean | isWebLogicThinClientDriver()PUBLIC:
Return whether a WebLogic thin client JDBC driver is being used.
return driverIs("weblogic.jdbc.t3Client.Driver");
|
public boolean | isWebLogicThinDriver()PUBLIC:
Return whether a WebLogic thin JDBC driver is being used.
return driverIs("weblogic.jdbc.t3.Driver");
|
public void | optimizeDataConversion()PUBLIC:
Enable driver level data conversion optimization.
This can be disabled as some drivers perform data conversion themselves incorrectly.
setShouldOptimizeDataConversion(true);
|
protected boolean | oracleDriverIs(java.lang.String urlPrefix)INTERNAL:
Return whether the specified Oracle JDBC driver is being used.
try {
if (getDriverURLHeader().length() != 0) {
return getDriverURLHeader().indexOf(urlPrefix) != -1;
} else {
return getDatabaseURL().indexOf(urlPrefix) != -1;
}
} catch (ValidationException e) {
// this exception will be thrown if we are using something other than a DefaultConnector
return false;
}
|
public void | setConnectionString(java.lang.String url)PUBLIC:
Set the JDBC connection string.
This is the full JDBC connect URL. Normally TopLink breaks this into two parts to
allow for the driver header to be automatically set, however sometimes it is easier just to set the
entire URL at once.
setDriverURLHeader("");
setDatabaseURL(url);
|
public void | setCursorCode(int cursorCode)ADVANCED:
Set the code for preparing cursored output
parameters in a stored procedure
getPlatform().setCursorCode(cursorCode);
|
public void | setDatabaseName(java.lang.String databaseName)PUBLIC:
The database name is required when connecting to databases that support
multiple databases within a single server instance (e.g. Sybase, SQL Server).
This is ONLY used when connecting through ODBC type JDBC drivers.
This is NEVER used with Oracle.
setProperty("database", databaseName);
|
public void | setDatabaseURL(java.lang.String databaseURL)PUBLIC:
The database URL is the JDBC URL for the database server.
The driver header should not be included in this URL
(e.g. "dbase files"; not "jdbc:odbc:dbase files").
getDefaultConnector().setDatabaseURL(databaseURL);
|
public void | setDefaultNullValue(java.lang.Class type, java.lang.Object value)PUBLIC:
The default value to substitute for database NULLs can be configured
on a per-class basis.
Example: login.setDefaultNullValue(long.class, new Long(0))
getPlatform().getConversionManager().setDefaultNullValue(type, value);
|
public void | setDriverClass(java.lang.Class driverClass)PUBLIC:
The driver class is the Java class for the JDBC driver to be used
(e.g. sun.jdbc.odbc.JdbcOdbcDriver.class).
setDriverClassName(driverClass.getName());
|
public void | setDriverClassName(java.lang.String driverClassName)PUBLIC:
The name of the JDBC driver class to be used
(e.g. "sun.jdbc.odbc.JdbcOdbcDriver").
getDefaultConnector().setDriverClassName(driverClassName);
|
public void | setDriverURLHeader(java.lang.String driverURLHeader)PUBLIC:
The driver URL header is the string predetermined by the JDBC driver to be
part of the URL connection string, (e.g. "jdbc:odbc:").
This is required to connect to the database.
getDefaultConnector().setDriverURLHeader(driverURLHeader);
|
public void | setODBCDataSourceName(java.lang.String dataSourceName)PUBLIC:
The data source name is required if connecting through ODBC (JDBC-ODBC, etc.).
This is the ODBC name given in the ODBC Data Source Administrator.
This is just the database part of the URL.
setDatabaseURL(dataSourceName);
|
public void | setServerName(java.lang.String name)PUBLIC:
The server name is the name of the database instance.
This is ONLY used when connecting through ODBC type JDBC drivers,
and only if the data source does not specify it already.
setProperty("server", name);
|
public void | setShouldBindAllParameters(boolean shouldBindAllParameters)PUBLIC:
Set whether to bind all arguments to any SQL statement.
getPlatform().setShouldBindAllParameters(shouldBindAllParameters);
|
public void | setShouldCacheAllStatements(boolean shouldCacheAllStatements)PUBLIC:
Set whether prepared statements should be cached.
getPlatform().setShouldCacheAllStatements(shouldCacheAllStatements);
|
public void | setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)ADVANCED:
This setting can be used if the application expects upper case
but the database does not return consistent case (e.g. different databases).
getPlatform().setShouldForceFieldNamesToUpperCase(shouldForceFieldNamesToUpperCase);
|
public static void | setShouldIgnoreCaseOnFieldComparisons(boolean shouldIgnoreCaseOnFieldComparisons)ADVANCED:
Allow for case in field names to be ignored as some databases are not case sensitive.
When using custom this can be an issue if the fields in the descriptor have a different case.
DatabasePlatform.setShouldIgnoreCaseOnFieldComparisons(shouldIgnoreCaseOnFieldComparisons);
|
public void | setShouldOptimizeDataConversion(boolean value)PUBLIC:
Set whether driver level data conversion optimization is enabled.
This can be disabled as some drivers perform data conversion themselves incorrectly.
getPlatform().setShouldOptimizeDataConversion(value);
|
public void | setShouldTrimStrings(boolean shouldTrimStrings)PUBLIC:
By default CHAR field values have trailing blanks trimmed, this can be configured.
getPlatform().setShouldTrimStrings(shouldTrimStrings);
|
public void | setStatementCacheSize(int size)PUBLIC:
If prepared statement caching is used this configures the cache size.
The default is 50.
getPlatform().setStatementCacheSize(size);
|
public void | setStringBindingSize(int stringBindingSize)PUBLIC:
Used to help bean introspection.
getPlatform().setStringBindingSize(stringBindingSize);
|
public void | setTableQualifier(java.lang.String qualifier)PUBLIC:
Set the default qualifier for all tables.
This can be the creator of the table or database name the table exists on.
This is required by some databases such as Oracle and DB2.
getPlatform().setTableQualifier(qualifier);
|
public void | setTransactionIsolation(int isolationLevel)PUBLIC:
Set the transaction isolation setting for the connection.
This is an optional setting. The default isolation level
set on the database will apply if it is not set here.
Use one of the TRANSACTION_* constants for valid input values.
Note: This setting will only take effect upon connection.
getPlatform().setTransactionIsolation(isolationLevel);
|
public void | setUsesByteArrayBinding(boolean value)PUBLIC:
TopLink can be configured to use parameter binding for large binary data.
By default TopLink will print this data as hex through the JDBC binary excape clause.
Both binding and printing have various limits on all databases (e.g. 5k - 32k).
getPlatform().setUsesByteArrayBinding(value);
|
public void | setUsesNativeSQL(boolean value)PUBLIC:
TopLink can be configured to use database specific sql grammar not JDBC specific.
This is because unfortunately some bridges to not support the full JDBC standard.
By default TopLink uses the JDBC sql grammar.
getPlatform().setUsesNativeSQL(value);
|
public void | setUsesStreamsForBinding(boolean value)PUBLIC:
TopLink can be configured to use streams to store large binary data.
This can improve the max size for reading/writing on some JDBC drivers.
getPlatform().setUsesStreamsForBinding(value);
|
public void | setUsesStringBinding(boolean usesStringBindingSize)PUBLIC:
Used to help bean introspection.
getPlatform().setUsesStringBinding(usesStringBindingSize);
|
public boolean | shouldBindAllParameters()PUBLIC:
Bind all arguments to any SQL statement.
return getPlatform().shouldBindAllParameters();
|
public boolean | shouldCacheAllStatements()PUBLIC:
Cache all prepared statements, this requires full parameter binding as well.
return getPlatform().shouldCacheAllStatements();
|
public boolean | shouldForceFieldNamesToUpperCase()ADVANCED:
Can be used if the app expects upper case but the database is not return consistent case, i.e. different databases.
return getPlatform().shouldForceFieldNamesToUpperCase();
|
public static boolean | shouldIgnoreCaseOnFieldComparisons()ADVANCED:
Allow for case in field names to be ignored as some databases are not case sensitive.
When using custom this can be an issue if the fields in the descriptor have a different case.
return DatabasePlatform.shouldIgnoreCaseOnFieldComparisons();
|
public boolean | shouldOptimizeDataConversion()PUBLIC:
Return if our driver level data conversion optimization is enabled.
This can be disabled as some drivers perform data conversion themselves incorrectly.
return getPlatform().shouldOptimizeDataConversion();
|
public boolean | shouldTrimStrings()PUBLIC:
By default CHAR field values have trailing blanks trimmed, this can be configured.
return getPlatform().shouldTrimStrings();
|
public boolean | shouldUseByteArrayBinding()PUBLIC:
TopLink can be configured to use parameter binding for large binary data.
By default TopLink will print this data as hex through the JDBC binary excape clause.
Both binding and printing have various limits on all databases (e.g. 5k - 32k).
return getPlatform().usesByteArrayBinding();
|
public boolean | shouldUseNativeSQL()PUBLIC:
TopLink can be configured to use database-specific SQL grammar,
as opposed to the JDBC standard grammar.
This is because, unfortunately, some drivers to not support the full JDBC standard.
By default TopLink uses the JDBC SQL grammar.
return getPlatform().usesNativeSQL();
|
public boolean | shouldUseNativeSequencing()PUBLIC:
TopLink can be configured to use a sequence table
or native sequencing to generate unique object IDs.
Native sequencing uses the ID generation service provided by the database
(e.g. SEQUENCE objects on Oracle and IDENTITY columns on Sybase).
By default a sequence table is used. Using a sequence table is recommended
as it supports preallocation.
(Native sequencing on Sybase/SQL Server/Informix does not support preallocation.
Preallocation can be supported on Oracle by setting the increment size of the
SEQUENCE object to match the preallocation size.)
return getPlatform().getDefaultSequence() instanceof NativeSequence;
|
public boolean | shouldUseStreamsForBinding()PUBLIC:
TopLink can be configured to use streams to store large binary data.
return getPlatform().usesStreamsForBinding();
|
public boolean | shouldUseStringBinding()PUBLIC:
TopLink can be configured to bind large strings.
return getPlatform().usesStringBinding();
|
public java.lang.String | toString()PUBLIC:
Print all of the connection information.
StringWriter stringWriter = new StringWriter();
PrintWriter writer = new PrintWriter(stringWriter);
writer.println("DatabaseLogin(");
writer.println("\t" + ToStringLocalization.buildMessage("platform", (Object[])null) + "=>" + getPlatform());
writer.println("\t" + ToStringLocalization.buildMessage("user_name", (Object[])null) + "=> \"" + getUserName() + "\"");
writer.print("\t");
getConnector().toString(writer);
if (getServerName() != null) {
writer.println("\t" + ToStringLocalization.buildMessage("server_name", (Object[])null) + "=> \"" + getServerName() + "\"");
}
if (getDatabaseName() != null) {
writer.println("\t" + ToStringLocalization.buildMessage("database_name", (Object[])null) + "=> \"" + getDatabaseName() + "\"");
}
writer.write(")");
return stringWriter.toString();
|
public void | useAccess()PUBLIC:
Set the database platform to be Access.
if (getPlatform().isAccess()) {
return;
}
DatabasePlatform newPlatform = new AccessPlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useByteArrayBinding()PUBLIC:
TopLink can be configured to use parameter binding for large binary data.
By default TopLink will print this data as hex through the JDBC binary excape clause.
Both binding and printing have various limits on all databases (e.g. 5k - 32k).
setUsesByteArrayBinding(true);
|
public void | useCloudscape()PUBLIC:
Set the database platform to be Cloudscape.
if (getPlatform().isCloudscape()) {
return;
}
DatabasePlatform newPlatform = new CloudscapePlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useCloudscapeDriver()PUBLIC:
Use the Cloudscape JDBC driver.
useCloudscape();
setDriverClassName("COM.cloudscape.core.JDBCDriver");
setDriverURLHeader("jdbc:cloudscape:");
|
public void | useDB2()PUBLIC:
Set the database platform to be DB2.
if (getPlatform().isDB2()) {
return;
}
DatabasePlatform newPlatform = new DB2Platform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useDB2JDBCDriver()PUBLIC:
Use the IBM DB2 native client interface.
useDB2();
setDriverClassName("COM.ibm.db2.jdbc.app.DB2Driver");
setDriverURLHeader("jdbc:db2:");
useStreamsForBinding();// Works best with IBM driver
|
public void | useDB2NetJDBCDriver()PUBLIC:
Use the IBM DB2 thin JDBC driver.
useDB2();
setDriverClassName("COM.ibm.db2.jdbc.net.DB2Driver");
setDriverURLHeader("jdbc:db2:");
useStreamsForBinding();// Works best with IBM driver
|
public void | useDBase()PUBLIC:
Set the database platform to be DBase.
if (getPlatform().isDBase()) {
return;
}
DatabasePlatform newPlatform = new DBasePlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useDataSource(java.lang.String dataSource)PUBLIC:
Specify the J2EE DataSource name to connect to.
Also enable external connection pooling.
setConnector(new JNDIConnector(dataSource));
useExternalConnectionPooling();
|
public void | useDefaultDriverConnect()PUBLIC:
Connect to the JDBC driver via DriverManager.
setConnector(new DefaultConnector());
|
public void | useDefaultDriverConnect(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)PUBLIC:
Connect to the JDBC driver via DriverManager.
setConnector(new DefaultConnector(driverClassName, driverURLHeader, databaseURL));
|
public void | useDerby()
if (getPlatform().isDerby()) {
return;
}
DatabasePlatform newPlatform = new DerbyPlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useDirectDriverConnect()PUBLIC:
Some JDBC drivers don't support connecting correctly (via DriverManager),
but do support connecting incorrectly (e.g. Castanet).
setConnector(new DirectConnector());
|
public void | useDirectDriverConnect(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)PUBLIC:
Some JDBC drivers don't support connecting correctly (via DriverManager),
but do support connecting incorrectly (e.g. Castanet).
setConnector(new DirectConnector(driverClassName, driverURLHeader, databaseURL));
|
public void | useExternalConnectionPooling()PUBLIC:
Use external connection pooling, such as WebLogic's JTS driver.
setUsesExternalConnectionPooling(true);
|
public void | useExternalTransactionController()PUBLIC:
Use an external transaction controller such as a JTS service
setUsesExternalTransactionController(true);
|
public void | useHSQL()PUBLIC:
Use the HSQL JDBC driver.
if (getPlatform().isHSQL()) {
return;
}
DatabasePlatform newPlatform = new HSQLPlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useHSQLDriver()PUBLIC:
Use the HSQL JDBC driver.
useHSQL();
setDriverClassName("org.hsqldb.jdbcDriver");
setDriverURLHeader("jdbc:hsqldb:");
|
public void | useINetSQLServerDriver()PUBLIC:
Use the i-net SQL Server JDBC driver.
setDriverClassName("com.inet.tds.TdsDriver");
setDriverURLHeader("jdbc:inetdae:");
|
public void | useInformix()PUBLIC:
Set the database platform to be Informix.
if (getPlatform().isInformix()) {
return;
}
DatabasePlatform newPlatform = new InformixPlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useIntersolvSequeLinkDriver()PUBLIC:
Use the Intersolv/Merant SequeLink JDBC driver.
setDriverClassName("intersolv.jdbc.sequelink.SequeLinkDriver");
setDriverURLHeader("jdbc:sequelink:");
|
public void | useJConnect50Driver()PUBLIC:
Use the Sybase JConnect JDBC driver.
useSybase();
setDriverClassName("com.sybase.jdbc2.jdbc.SybDriver");
setDriverURLHeader("jdbc:sybase:Tds:");
// JConnect does not support the JDBC SQL grammar
useNativeSQL();
|
public void | useJConnectDriver()PUBLIC:
Use the Sybase JConnect JDBC driver.
useSybase();
setDriverClassName("com.sybase.jdbc.SybDriver");
setDriverURLHeader("jdbc:sybase:Tds:");
// JConnect does not support the JDBC SQL grammar
useNativeSQL();
|
public void | useJDBC()PUBLIC:
Set the database platform to be JDBC.
DatabasePlatform newPlatform = new DatabasePlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useJDBCConnectDriver()PUBLIC:
Use the Borland JDBCConnect JDBC driver.
setDriverClassName("borland.jdbc.Bridge.LocalDriver");
setDriverURLHeader("jdbc:BorlandBridge:");
|
public void | useJDBCConnectRemoteDriver()PUBLIC:
Use the Borland JDBCConnect JDBC driver.
setDriverClassName("borland.jdbc.Broker.RemoteDriver");
setDriverURLHeader("jdbc:BorlandBridge:");
|
public void | useJDBCODBCBridge()PUBLIC:
User the Sun/Merant JDBC-ODBC bridge driver.
setDriverClassName("sun.jdbc.odbc.JdbcOdbcDriver");
setDriverURLHeader("jdbc:odbc:");
|
public void | useJTADataSource(java.lang.String dataSource)PUBLIC:
Specify the J2EE JTA enabled DataSource name to connect to.
Also enable external transaction control and connection pooling.
useDataSource(dataSource);
useExternalTransactionController();
|
public void | useMySQL()PUBLIC:
Set the database platform to be MySQL.
if (getPlatform().isMySQL()) {
return;
}
DatabasePlatform newPlatform = new MySQL4Platform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useNativeSQL()PUBLIC:
TopLink can be configured to use database-specific SQL grammar,
as opposed to the JDBC standard grammar.
This is because, unfortunately, some drivers to not support the full JDBC standard.
By default TopLink uses the JDBC SQL grammar.
setUsesNativeSQL(true);
|
public void | useNativeSequencing()PUBLIC:
TopLink can be configured to use a sequence table
or native sequencing to generate unique object IDs.
Native sequencing uses the ID generation service provided by the database
(e.g. SEQUENCE objects on Oracle and IDENTITY columns on Sybase).
By default a sequence table is used. Using a sequence table is recommended
as it supports preallocation.
(Native sequencing on Sybase/SQL Server/Informix does not support preallocation.
Preallocation can be supported on Oracle by setting the increment size of the
SEQUENCE object to match the preallocation size.)
if(!shouldUseNativeSequencing()) {
getPlatform().setDefaultSequence(new NativeSequence(getPlatform().getDefaultSequence().getName(),
getPlatform().getDefaultSequence().getPreallocationSize(),
getPlatform().getDefaultSequence().getInitialValue()));
}
|
public void | useOracle()PUBLIC:
Set the database platform to be Oracle.
if (getPlatform().isOracle()) {
return;
}
DatabasePlatform newPlatform = new OraclePlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useOracle7JDBCDriver()PUBLIC:
Use the Oracle 7.x native OCI JDBC driver.
useOracle();
setDriverClassName("oracle.jdbc.OracleDriver");
setDriverURLHeader("jdbc:oracle:oci7:@");
// Oracle works best with stream binding.
useByteArrayBinding();
useStreamsForBinding();
|
public void | useOracleJDBCDriver()PUBLIC:
Use the Oracle 8.x native OCI JDBC driver.
useOracle();
setDriverClassName("oracle.jdbc.OracleDriver");
setDriverURLHeader("jdbc:oracle:oci8:@");
// Oracle works best with stream binding.
useByteArrayBinding();
useStreamsForBinding();
|
public void | useOracleServerJDBCDriver()PUBLIC:
Use the Oracle server JDBC driver.
useOracle();
setDriverClassName("oracle.jdbc.OracleDriver");
setDriverURLHeader("jdbc:oracle:kprb:");
// Oracle works best with stream binding.
useByteArrayBinding();
|
public void | useOracleThinJDBCDriver()PUBLIC:
Use the Oracle thin JDBC driver.
useOracle();
setDriverClassName("oracle.jdbc.OracleDriver");
setDriverURLHeader("jdbc:oracle:thin:@");
// Oracle works best with stream binding.
useByteArrayBinding();
useStreamsForBinding();
|
public void | usePlatform(oracle.toplink.essentials.internal.databaseaccess.DatabasePlatform platform)ADVANCED:
Set the database platform to be custom platform.
super.usePlatform((Platform)platform);
|
public void | usePointBase()PUBLIC:
Set the database platform to be PointBase.
if (getPlatform().isPointBase()) {
return;
}
DatabasePlatform newPlatform = new PointBasePlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | usePointBaseDriver()PUBLIC:
Use the PointBase JDBC driver.
usePointBase();
setDriverClassName("com.pointbase.jdbc.jdbcUniversalDriver");
setDriverURLHeader("jdbc:pointbase:");
|
public void | useSQLServer()PUBLIC:
Set the database platform to be SQL Server.
if (getPlatform().isSQLServer()) {
return;
}
DatabasePlatform newPlatform = new SQLServerPlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useStreamsForBinding()PUBLIC:
TopLink can be configured to use streams to store large binary data.
setUsesStreamsForBinding(true);
|
public void | useStringBinding()PUBLIC:
Bind strings larger than 255 characters.
this.useStringBinding(255);
|
public void | useStringBinding(int size)PUBLIC:
Bind strings that are larger than the specified size.
Strings that are smaller will not be bound.
getPlatform().setStringBindingSize(size);
getPlatform().setUsesStringBinding(true);
|
public void | useSybase()PUBLIC:
Set the database platform to be Sybase.
if (getPlatform().isSybase()) {
return;
}
DatabasePlatform newPlatform = new SybasePlatform();
getPlatform().copyInto(newPlatform);
setPlatform(newPlatform);
|
public void | useWebLogicDriverCursoredOutputCode()PUBLIC:
Set the prepare cursor code to what the WebLogic
Oracle OCI JDBC driver expects.
setCursorCode(1111);
|
public void | useWebLogicJDBCConnectionPool(java.lang.String poolName)PUBLIC:
Set a WebLogic JDBC connection pool (a pool must be defined for the entity beans that are to be deployed)
setDriverClassName("weblogic.jdbc.jts.Driver");
setConnectionString("jdbc:weblogic:jts:" + poolName);
|
public void | useWebLogicOracleOCIDriver()PUBLIC:
Use the WebLogic Oracle OCI JDBC driver.
useOracle();
setDriverClassName("weblogic.jdbc.oci.Driver");
setDriverURLHeader("jdbc:weblogic:oracle:");
// WebLogic has a bug converting dates to strings, which our optimizations require.
dontOptimizeDataConversion();
useWebLogicDriverCursoredOutputCode();
|
public void | useWebLogicSQLServerDBLibDriver()PUBLIC:
Use the WebLogic SQL Server dblib JDBC driver.
useSQLServer();
setDriverClassName("weblogic.jdbc.dblib.Driver");
setDriverURLHeader("jdbc:weblogic:mssqlserver:");
// WebLogic has a bug converting dates to strings, which our optimizations require.
dontOptimizeDataConversion();
|
public void | useWebLogicSQLServerDriver()PUBLIC:
Use the WebLogic SQL Server JDBC driver.
useSQLServer();
setDriverClassName("weblogic.jdbc.mssqlserver4.Driver");
setDriverURLHeader("jdbc:weblogic:mssqlserver4:");
// WebLogic has a bug converting dates to strings, which our optimizations require.
dontOptimizeDataConversion();
|
public void | useWebLogicSybaseDBLibDriver()PUBLIC:
Use the WebLogic Sybase dblib JDBC driver.
useSybase();
setDriverClassName("weblogic.jdbc.dblib.Driver");
setDriverURLHeader("jdbc:weblogic:sybase:");
// WebLogic has a bug converting dates to strings, which our optimizations require.
dontOptimizeDataConversion();
|
public void | useWebLogicThinClientDriver()PUBLIC:
Use the WebLogic thin client JDBC driver.
setDriverClassName("weblogic.jdbc.t3Client.Driver");
setDriverURLHeader("jdbc:weblogic:t3Client:");
|
public void | useWebLogicThinDriver()PUBLIC:
Use the WebLogic thin JDBC driver.
setDriverClassName("weblogic.jdbc.t3.Driver");
setDriverURLHeader("jdbc:weblogic:t3:");
|