API Modifications
11g (11.1.1.0.1)
December 2008
This document describes the API modifications in Oracle TopLink as of 11g (11.1.1).
This document provides information on:
The following sections describe the API added as of 11g (11.1.1):
This package includes the classes that you can use to configure TopLink-specific options using annotations instead of project.xml and sessions.xml deployment XML files.
This package contains the classes that you can use with JPA to specify TopLink-specific options using JPA vendor extensions.
Use the ClassDescriptor method useSoftIdentityMap to select a soft identity map.
Use DescriptorQueryManager method setExpressionQueryCacheMaxSize(int) to set maximum query cache size for expressions.
The classes in this package provide query and expressions support that allows your TopLink-enabled application to take advantage of Oracle Spatial, the Oracle Enterprise Edition option that provides advanced spatial features to support high-end Geographical Information System (GIS) and Location Based Service (LBS) solutions.
Using TopLink, you can map persistent fields to an Oracle Spatial database schema and create and execute Oracle Spatial queries with all the ease of use that TopLink expressions provide.
You can use the following new Expression methods:
currentDateDate
leftTrim(Object)
like(Expresion, Expression)
Use the PropertyAssociation class as a generic association object to map hashtable or hashmap containers where the key and value primitives or independent objects.Use the ForeignReferenceMapping method setJoinFetch(int) to indicate whether the referenced object(s) should always be joined on read queries. A join-fetch can either use an ForeignReferenceMapping.INNER_JOIN or ForeignReferenceMapping.OUTER_JOIN.
Use the EnumTypeConverter converter to match a fixed number of database data values to a Java enum object value. Use this class when the values on the database and in the Java enum differ. To create an object type converter, simply specify the set of conversion value pairs. A default value and one-way conversion are also supported for legacy data situations.
You can add a StructConverter class to a DatabasePlatform to allow custom processing of advanced java.sql.Struct types that require some processing immediately before writing to the database or immediately after reading from the database.
This package provides the following new database platform classes:
DerbyPlatform
JavaDBPlatform
oracle.Oracle11Platform
PostgreSQLPlatform
This package also provides the oracle.toplink.platform.database.oracle.converters.JGeometryConverter class that TopLink uses to support Oracle Spatial (see also Section 1.4, "oracle.toplink.expressions.spatial.*").
This package provides the following new classes:
ColumnResult
ConstructorReportItem
DeleteAllQuery
EntityResult
FieldResult
ModifyAllQuery
ObjectBuildingQuery
ResultSetMappingQuery
SQLResult
SQLResultSetMapping
You can use the following new ObjectLevelReadQuery methods:
addNonFetchJoinedAttribute(Expression)
addNonFetchJoinedAttribute(String)
setIsReadOnly(boolean)
setShouldOuterJoinSubclasses(boolean)
You can use the following new ReportQuery methods:
addAttribute(String, Expression, Class)
beginAddingConstructorArguments(Class)
endAddingConstructorArguments
returnWithoutReportQueryResult
setHavingExpression(Expression)
You can use the following new StoredProcedureCall methods:
add*(.., int, String)
Use the new UniqueKeyConstraint class to define a unique key constraint on a database table.
By implementing the new DescriptorCustomizer interface, you can create a class to customize a specific ClassDescriptor using the toplink.descriptor.customizer.ENTITY property.
You can use the new XMLSessionConfigLoader methods:
setClassLoader(ClassLoader)
setSessionName(String)
setShouldCheckClassLoader(boolean)
setShouldLogin(boolean)
setShouldRefresh(boolean)
You can use SessionManager method getSession(XMLSessionConfigLoader) to load a TopLink session with a specific instance of XMLSessionConfigLoader.
You can use class SunAS9TransactionController to integrate with the Sun Application Server 9 transaction controller.
Use the classes in this package to perform static weaving of your persistent classes. Using the StaticWeaveAntTask, you can perform static weaving as part of your build process.
Use this class to acquire a JPA persistence provider instance for JPA outside of a Java EE container.
The following tables list the API removed as of 11g (11.1.1). In this release, you must use the replacement API indicated.
Table 1 changetracking (oracle.toplink.descriptors.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
|
. |
|
|
|
|
Table 2 databaseaccess (oracle.toplink.internal*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole class |
|
Table 4 mappings (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
Table 5 objectrelational (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole class |
|
Table 6 oraclespecific (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
None |
Footnote 1 oracle.toplink.oraclespecific.Oracle9Specific was moved to an internal package and renamed to oracle.toplink.internal.platform.database.oracle.Oracle9Specific. The replacement public API for oracle.toplink.oraclespecific.Oracle9Specific is oracle.toplink.platform.database.oracle.Oracle9Specific.
Footnote 2 oracle.toplink.oraclespecific.TopLinkXMLType was a miscellaneous class, which does not have a replacement API.
Table 7 publicinterface (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
|
|
Whole class |
|
Footnote 1 oracle.toplink.publicinterface.DatabaseSession was moved to an internal package and renamed to oracle.toplink.internal.sessions.DatabaseSessionImpl. The replacement public API for oracle.toplink.publicinterface.DatabaseSession is oracle.toplink.sessions.DatabaseSession.
Footnote 2 oracle.toplink.publicinterface.Session was moved to an internal package and renamed to oracle.toplink.internal.sessions.AbstractSessionImpl. The replacement public API for oracle.toplink.publicinterface.Session is oracle.toplink.sessions.Session.
Footnote 3 oracle.toplink.publicinterface.UnitOfWork was moved to an internal package and renamed to oracle.toplink.internal.sessionl.UnitOfWorkImpl. The replacement public API for oracle.toplink.publicinterface.UnitOfWork is oracle.toplink.sessions.UnitOfWork.
Table 9 entitymanager (oracle.toplink.sessions.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
All classes |
All methods |
JPA: see Section 5.1, "JPA Persistence Provider Implementation" |
Table 10 sessionconfiguration (oracle.toplink.tools.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
All methods |
None |
Table 11 xml (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole package |
|
|
|
Whole package |
|
|
|
Whole package |
|
|
|
Whole package |
|
|
|
Whole package |
|
Table 12 XMLCommandConverter (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole class |
None |
|
|
Whole class |
None |
|
|
Whole class |
None |
|
|
|
None |
|
|
|
None |
|
|
|
None |
Table 13 Remote Protocols (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
Whole package |
None |
|
|
Whole package |
None |
|
|
Whole package |
None |
|
|
References for any of |
None |
|
|
References for any of |
None |
|
|
Whole class |
None |
|
|
Whole class |
None |
|
|
Whole class |
None |
|
|
References for any of |
None |
The following tables list the API deprecated as of 11g (11.1.1). Oracle recommends that you use the replacement API indicated. Deprecated code may be removed in a future release.
|
Note: Because deprecated classes and moved classes have the same name, you may get compile errors if you useimport * to import classes from both the old package and the new package. To avoid these errors, use import with a fully qualified package name. |
Table 15 mappings (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
|
|
Table 16 descriptors (oracle.toplink.*)
| Class Name | Method Name | Replacement API |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following classes are removed in 11g (11.1.1):
OTSTransactionController
OTSSynchronizationListener
OracleSequenceDefinition (use SequenceObjectDefinition instead)
TimeTenSequenceDefinition (use SequenceObjectDefinition instead)
TopLinkXMLType
XMLCommandConverter
XMLSource
XMLResult
OrbixCORBAJNDIClusteringConfig
VisibrokerCORBAJNDIClusteringConfig
EJBJNDIClusteringConfig
oracle.toplink.jdo
You should consider the following miscellaneous API changes:
In 11g (11.1.1), TopLink uses eclipselink.jar to provide JPA 1.0 support. Refer to http://www.eclipse.org/eclipselink for more information.
In 11g (11.1.1), TopLink uses eclipselink.jar to provide SDO 2.0.1 support. Refer to http://www.eclipse.org/eclipselink for more information.
In 11g (11.1.1), session finalizers are disabled by default to improve performance.
To enable session finalizers, use Session method setIsFinalizersEnabled(true).
Any Session or ClassDescriptor method that returns Vector or Hashtable will eventually be changed to return List or Map, respectively. To future proof your application code, cast Vector and Hashtable return types to List or Map, respectively. For example, although the Javadoc for ClassDescriptor method getMappings is java.util.Vector, you should cast the returned value to List:
List mappings = (List) descriptor.getMappings();
Other changes that now return Map, include the following:
ClassDescriptor.getQueryKeys(); ClassDescriptor.getProperties(); DescriptorQueryManager.getQueries(); EISInteraction.getProperties(); Session.getProperties(); Session.getQueries(); getAttributesToAlwaysInclude(); getSpecialOperations(); getValuesToExclude();
Oracle TopLink API Modifications, 11g (11.1.1)
Copyright © 1997, 2008, Oracle. All rights reserved.
The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.
If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs.
Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.