请输入您要查询的百科知识:

 

词条 Oracle TopLink
释义

  1. History

  2. Key Features

  3. Key Components

      EclipseLink Core and API    Object-Relational(JPA 2.0) Component    SDO Component    Database Web Services Component    TopLink Grid  

  4. TopLink Operations (Insert, Update, Delete)

      Insert    Update    Delete  

  5. Development Tools

  6. Supported Database Platforms

  7. See also

  8. References

  9. External links

Oracle TopLink is mapping and persistence framework for Java developers. TopLink is produced by Oracle and is a part of Oracle's OracleAS, WebLogic, and OC4J servers.[1] It is an object-persistence and object-transformation framework. TopLink provides development tools and run-time functionalities that ease the development process and help increase functionality. Persistent object-oriented data is stored in relational databases which helps build high-performance applications. Storing data in either XML (Extensible Markup Language) or relational databases is made possible by transforming it from object-oriented data.

A rich user-interface is possible on TopLink with the help of TopLink Mapping Workbench. This Mapping Workbench makes it possible to carry out the following with ease.

  • Graphical mapping of an object model to data model.
  • Generation of data model from its object model and vice versa.
  • Auto-mapping of any existing data models and object models.

Oracle's JDeveloper IDE provides easy integration of these functionalities provided by the Mapping Workbench.

With the use of TopLink, users can stay more focused on their primary cause and let TopLink handle the integration of persistence and object transformation into their application. Designing, implementing and deploying process is accelerated as TopLink supports a variety of data sources and formats such as Relational database, Object-relational database, Enterprise information system (EIS), XML and many others.

{{Infobox software|name = Oracle TopLink|developer = Oracle Corporation|latest release version = Oracle TopLink 12c (12.1.3)|title = Oracle TopLink|programming language = Java|operating system = Cross-platform|platform = Java Virtual Machine|license = Oracle License|website = {{URL|http://www.oracle.com/technetwork/middleware/toplink/overview/index.html}}}}

History

Toplink was originally developed by The Object people in Smalltalk. It was ported to Java in 1996-1998 and called "TopLink for Java". In 2002,TopLink was acquired by Oracle Corporation and was developed under the Oracle Fusion Middleware product. The TopLink code was donated to the Eclipse Foundation and the EclipseLink project was born in 2007.[1] The EclipseLink now provides the functionality of TopLink. Sun Microsystems selected EclipseLink in March 2008, as the implementation for the JPA 2.0, JSR 317 reference. A number of versions of TopLink have been released since and the latest version 12c (12.1.3) is available for free Download.[2]

Key Features

  • Rapidly build high-performance enterprise applications that are scalable and maintainable.
  • Extensive mapping support using relational, object-relational data type and XML.
  • Advanced query capability including native SQL, Java Persistence Query Language (JPQL) and EclipseLink Expressions framework.
  • RESTful Services
  • Just-in-time reading.
  • Tenant Isolation
  • NoSQL
  • Various Optimistic and pessimistic locking policies and options.
  • JSON
  • Integration with commonly used application servers and databases.
  • External Metadata Sources
  • TopLink Grid.[1]

Key Components

EclipseLink Core and API

The runtime component of TopLink is provided by the EclipseLink Core. This API provides direct access to the runtime, which is embedded into the application. Persistence behavior is enabled by making application calls that invoke EclipseLink API to perform these functionalities which provides safe access to shared databases.[3]

Import the following class to use extended functionality of EclipseLink.

Object-Relational(JPA 2.0) Component

The binding of Java classes to XML schemas is possible with the help of Object-XML, which is an EclipseLink component. By implementing JAXB, mapping information is provided through annotations. It also provides manipulation of XML.[3]

SDO Component

The Service Data Objects (SDO) provides with the use of SDO API, use dynamic objects to customize and manipulate XML, use of static data objects and conversion of XML Schema.[3]

Database Web Services Component

Database Web Services (DBWS) facilitates access to relational databases with the help of web service. A database access can be made without the need to write a Java code. The XML SOAP Messages and the databases are connected by the runtime component of DBWS which uses EclipseLink.[3]

TopLink Grid

TopLink Grid is an integration mechanism that provides connection between Oracle Coherence and EclipseLink. An application generally interacts with the relational database, which is its primary database. But with TopLink the application can store data on the Coherence grid called as JPA on the grid.[4]

TopLink Grid functionality can be used only if the user has license for Oracle Coherence. This functionality is provided by:

To get support for TopLink Grid and EclipseLink, users also need to import the following package of classes.

TopLink Operations (Insert, Update, Delete)

Database operations like Insert, Update and Delete can also be performed in TopLink. The changes made to the database are reflected in the Oracle Coherence cache. In Java Persistence API, an entity is a persistence class.Using TopLink, a number of performance features for writing large amounts of data can be implemented. Batch writing, stored procedure support, parameter binding, statement ordering and other features are offered to satisfy database constraints.

The basic operations are

Insert

The EntityManager method persist(Object entity) is used to add an instance and marks it for insertion into the database.

entityManager.getTransaction().begin();

Employee newEmployee = new Employee(5);

entityManager.persist(newEmployee);

entityManager.getTransaction().commit();

On completion of the transaction, the newEmployee data will be inserted into the database.[5]

Update

Updating an entity means simply reading the transaction and updating the properties of this entity. Updating the Employee LastName can be done as follows.[5]

entityManager.getTransaction().begin();

Employee existingEmployee = entityManager.find(Employee.class, 5);

existingEmployee.setLastName("NewLastName");

entityManager.getTransaction().commit();

Delete

Deleting an entity is the opposite of Insertion and can be one using remove(Object entity) method of the EntityManager.

entityManager.getTransaction().begin();

Employee existingEmployee = entityManager.find(Employee.class, 5);

entityManager.remove(existingEmployee);

entityManager.getTransaction().commit();

The EntityManager method flush() deletes the entity on completion of the transaction.[5]

Development Tools

Users can use most of the tools in the market and use TopLink along with it. But the following toots provide special integration with TopLink.

  • Oracle JDeveloper
  • Oracle Enterprise Pack for Eclipse
  • Eclipse
  • NetBeans

Supported Database Platforms

DatabaseJava Class
Apache Derbyorg.eclipse.persistence.platform.database.DerbyPlatform
Attunityorg.eclipse.persistence.platform.database.AttunityPlatform
dBASEorg.eclipse.persistence.platform.database.DBasePlatform
Firebirdorg.eclipse.persistence.platform.database.FirebirdPlatform
H2org.eclipse.persistence.platform.database.H2Platform
HyperSQLDatabase(HSQL)org.eclipse.persistence.platform.database.HSQLPlatform
IBM Cloudscapeorg.eclipse.persistence.platform.database.CloudscapePlatform
IBM DB2 Mainframeorg.eclipse.persistence.platform.database.DB2MainframePlatform
Microsoft Accessorg.eclipse.persistence.platform.database.AccessPlatformPlatform
Microsoft SQLServerorg.eclipse.persistence.platform.database.SQLServerPlatform
MySQLorg.eclipse.persistence.platform.database.MySQLPlatform

See also

{{Portal|Java (programming language)}}
  • EclipseLink
  • Hibernate (framework)
  • Apache Cayenne
  • IBATIS

References

1. ^{{Cite web|title = Java Persistence/TopLink - Wikibooks, open books for an open world|url = https://en.wikibooks.org/wiki/Java_Persistence/TopLink|website = en.wikibooks.org|access-date = 2016-02-07}}
2. ^{{Cite web|title = Oracle TopLink Software Downloads|url = http://www.oracle.com/technetwork/middleware/toplink/downloads/index.html|website = www.oracle.com|access-date = 2016-02-08}}
3. ^{{Cite web|url = https://docs.oracle.com/middleware/1212/toplink/OTLCG.pdf|title = Oracle Documentation|date = |access-date = |website = |publisher = |last = |first = }}
4. ^{{Cite web|title = Oracle® Fusion Middleware Integrating Oracle Coherence|url = http://docs.oracle.com/middleware/1213/coherence/integrate/tlg_integrate.htm#COHIG4652|website = docs.oracle.com|access-date = 2016-02-08}}
5. ^{{Cite web|title = TopLink JPA: How to Create, Modify and Delete an Entity|url = http://www.oracle.com/technetwork/middleware/ias/create-modify-delete-097533.html|website = www.oracle.com|access-date = 2016-02-08}}

External links

  • Oracle TopLink Official Home
  • Oracle TopLink Quick Tour
  • [https://community.oracle.com/community/fusion_middleware/application_server/toplink_jpa Oracle TopLink Forum]
  • Oracle TopLink Wiki
  • [https://glassfish.dev.java.net/javaee5/persistence/ TopLink Essentials Home]
  • [https://web.archive.org/web/20070927222857/http://www.nabble.com/java.net---glassfish-persistence-f13455.html TopLink Essentials Mailing List]
  • [https://web.archive.org/web/20060513072101/http://toplink.waldura.com/Main Unofficial TopLink Wiki]
  • Master the New Persistence Paradigm with JPA
{{Java Persistence API}}{{Java (Sun)}}{{DEFAULTSORT:Toplink}}

5 : Java platform|Object-relational mapping|Oracle software|Persistence frameworks|Oracle acquisitions

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/20 19:28:38