Skip Headers
Oracle® TopLink API Modifications
11g (11.1.1.0.1)
 

 

Oracle® TopLink

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:

1 New API in this Release

The following sections describe the API added as of 11g (11.1.1):

1.1 oracle.toplink.annotations.*

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.

1.2 oracle.toplink.config.*

This package contains the classes that you can use with JPA to specify TopLink-specific options using JPA vendor extensions.

1.3 oracle.toplink.descriptors.*

Use the ClassDescriptor method useSoftIdentityMap to select a soft identity map.

Use DescriptorQueryManager method setExpressionQueryCacheMaxSize(int) to set maximum query cache size for expressions.

1.4 oracle.toplink.expressions.spatial.*

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.

1.5 oracle.toplink.expressions.Expression

You can use the following new Expression methods:

  • currentDateDate

  • leftTrim(Object)

  • like(Expresion, Expression)

1.6 oracle.toplink.mappings.*

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.

1.7 oracle.toplink.mappings.converters.*

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.

1.8 oracle.toplink.platform.database.converters.*

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.

1.9 oracle.toplink.platform.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.*").

1.10 oracle.toplink.queryframework.*

This package provides the following new classes:

  • ColumnResult

  • ConstructorReportItem

  • DeleteAllQuery

  • EntityResult

  • FieldResult

  • ModifyAllQuery

  • ObjectBuildingQuery

  • ResultSetMappingQuery

  • SQLResult

  • SQLResultSetMapping

1.11 oracle.toplink.queryframework.*

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)

1.12 oracle.toplink.tools.schemaframework.*

Use the new UniqueKeyConstraint class to define a unique key constraint on a database table.

1.13 oracle.toplink.tools.sessionconfiguration.*

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)

1.14 oracle.toplink.tools.sessionmanagement.*

You can use SessionManager method getSession(XMLSessionConfigLoader) to load a TopLink session with a specific instance of XMLSessionConfigLoader.

1.15 oracle.toplink.transaction.sunas.*

You can use class SunAS9TransactionController to integrate with the Sun Application Server 9 transaction controller.

1.16 oracle.toplink.weaving.*

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.

1.17 oracle.toplink.PersistenceProvider

Use this class to acquire a JPA persistence provider instance for JPA outside of a Java EE container.

2 API Replaced in this Release

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

ChangeTracker

getTopLinkPropertyChangeListener

._persistence_getPropertyChangeListener

ChangeTracker

setTopLinkPropertyChangeListener(PropertyChangeListener)

_persistence_setPropertyChangeListener(PropertyChangeListener)


Table 2 databaseaccess (oracle.toplink.internal*)

Class Name Method Name Replacement API

.*Platform

Whole class

oracle.toplink.platform.database.*Platform


Table 3 jdo (oracle.toplink.*)

Class Name Method Name Replacement API

.jdo

Whole package

None


Table 4 mappings (oracle.toplink.*)

Class Name Method Name Replacement API

TypeConversionMapping

Whole class

.mappings.converters.TypeConversionConverter

ObjectTypeMapping

Whole class

.mappings.converters.ObjectTypeConverter

SerializedObjectMapping

Whole class

.mappings.converters.SerializedObjectConverter


Table 5 objectrelational (oracle.toplink.*)

Class Name Method Name Replacement API

Oracle8Platform

Whole class

oracle.toplink.platform.database.oracle.Oracle8Platform


Table 6 oraclespecific (oracle.toplink.*)

Class Name Method Name Replacement API

.oraclespecific.NCharacter

Whole class

.platform.database.oracle.NCharacter

.oraclespecific.NClob

Whole class

.platform.database.oracle.NClob

.oraclespecific.NClob

Whole class

.platform.database.oracle.NClob

.oraclespecific.Oracle8Platform

Whole class

.platform.database.oracle.Oracle8Platform

.oraclespecific.Oracle9Specific Foot 1 

Whole class

.platform.database.oracle.Oracle9Specific

.oraclespecific.TopLinkXMLType Foot 2 

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

DatabaseRow

Whole class

.sessions.DatabaseRecord

DatabaseSession Foot 1 

Whole class

.sessions.DatabaseSession

Descriptor

Whole class

.descriptors - ClassDescriptor, RelationalDescriptor

DescriptorEvent

Whole class

.descriptors.DescriptorEvent

DescriptorEventListener

Whole class

.descriptors - new interface will not extend old interface.

DescriptorEventManager

Whole class

.descriptors

DescriptorQueryManager

Whole class

.descriptors

InheritancePolicy

Whole class

.descriptors

Session Foot 2 

Whole class

.sessions.Session

UnitOfWork Foot 3 

Whole class

.sessions.UnitOfWork


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 8 sdk (oracle.toplink.*)

Class Name Method Name Replacement API

.sdk

Whole package

.eis


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

WASXMLLoader

All methods

None


Table 11 xml (oracle.toplink.*)

Class Name Method Name Replacement API

.xml

Whole package

.ox

.xmlstream

Whole package

.ox

.xml.tools

Whole package

.ox

.xml.xerces

Whole package

.ox

.xml.zip

Whole package

.ox


Table 12 XMLCommandConverter (oracle.toplink.*)

Class Name Method Name Replacement API

.remotecommand.XMLCommandConverter

Whole class

None

.transform.xml.XMLSource

Whole class

None

.transform.xml.XMLResult

Whole class

None

.internal.localization.i18n.ExceptionLocalizationResource

"error_loading_resources"

None

.internal.localization.i18n.ExceptionLocalizationResource

"error_parsing_resources"

None

.internal.localization.i18n.ExceptionLocalizationResource

"unexpect_argument"

None


Table 13 Remote Protocols (oracle.toplink.*)

Class Name Method Name Replacement API

.remote.corba.orbix

Whole package

None

.remote.corba.visibroker

Whole package

None

.remote.ejb

Whole package

None

.tools.sessionconfiguration.TopLinkSessionsFactory

References for any of JNDIClusteringService in orbix, visibroker and ejb packages.

None

.tools.sessionconfiguration.DTD2SessionConfigLoader

References for any of JNDIClusteringService in orbix, visibroker and ejb packages.

None

.tools.sessionconfiguration.model.clustering.VisibrokerCORBAJNDIClusteringConfig

Whole class

None

.tools.sessionconfiguration.model.clustering.OrbixCORBAJNDIClusteringConfig

Whole class

None

.tools.sessionconfiguration.model.clustering.EJBJNDIClusteringConfig

Whole class

None

.tools.sessionconfiguration.XMLSessionConfigProject

References for any of JNDIClusteringService in orbix, visibroker and ejb packages.

None


Table 14 EJB Mapping for BEA WebLogic 6.1

Class Name Method Name Replacement API

toplink-cmp-bean_name.xml

None

A warning will be added at the beginning of: internal.ejb.cmp.wls11.CMPDeployer.readTypeSpecificData()


3 API Deprecated in this Release

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 use import * 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

OneToOneMapping

useJoining

ForeignReferenceMapping.setJoinFetch(int)


Table 16 descriptors (oracle.toplink.*)

Class Name Method Name Replacement API

ClassDescriptor

addMultipleTableForeignKeyField

addForeignKeyFieldForMultipleTable


addMultipleTablePrimaryKeyField

addForeignKeyFieldForMultipleTable


addMultipleTablePrimaryKeyFieldName

addForeignKeyFieldNameForMultipleTable


addMultipleTableForeignKeyFieldName

addForeignKeyFieldNameForMultipleTable


4 API Removed in this Release

The following classes are removed in 11g (11.1.1):

5 Miscellaneous API Changes

You should consider the following miscellaneous API changes:

5.1 JPA Persistence Provider Implementation

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.

5.2 SDO Implemenatation

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.

5.3 Session Finalizers Disabled by Default

In 11g (11.1.1), session finalizers are disabled by default to improve performance.

To enable session finalizers, use Session method setIsFinalizersEnabled(true).

5.4 Vector and Hashtable Return Types Changed to List or Map

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.