diff -Nru eclipselink-2.1.3/META-INF/MANIFEST.MF eclipselink-2.5.1/META-INF/MANIFEST.MF --- eclipselink-2.1.3/META-INF/MANIFEST.MF 2011-03-04 18:48:34.000000000 +0000 +++ eclipselink-2.5.1/META-INF/MANIFEST.MF 2013-09-18 00:51:04.000000000 +0000 @@ -1,11 +1,11 @@ Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 -Created-By: 16.3-b01 (Sun Microsystems Inc.) +Created-By: 23.6-b04 (Oracle Corporation) Specification-Title: Eclipse Persistence Services Source Specification-Vendor: Eclipse.org - EclipseLink Project -Specification-Version: 2.1.3 +Specification-Version: 2.5.1 Implementation-Title: org.eclipse.persistence Implementation-Vendor: Eclipse.org - EclipseLink Project -Implementation-Version: 2.1.3.v20110304-r9073 -Release-Designation: EclipseLink 2.1.3 +Implementation-Version: 2.5.1.v20130918-f2b9fc5 +Release-Designation: EclipseLink 2.5.1 diff -Nru eclipselink-2.1.3/META-INF/services/javax.annotation.processing.Processor eclipselink-2.5.1/META-INF/services/javax.annotation.processing.Processor --- eclipselink-2.1.3/META-INF/services/javax.annotation.processing.Processor 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/META-INF/services/javax.annotation.processing.Processor 2013-09-18 00:39:54.000000000 +0000 @@ -0,0 +1 @@ +org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor \ No newline at end of file diff -Nru eclipselink-2.1.3/OSGI-INF/l10n/bundle-src.properties eclipselink-2.5.1/OSGI-INF/l10n/bundle-src.properties --- eclipselink-2.1.3/OSGI-INF/l10n/bundle-src.properties 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/OSGI-INF/l10n/bundle-src.properties 2013-09-18 00:45:10.000000000 +0000 @@ -0,0 +1,4 @@ +#Source Bundle Localization +#Wed Sep 18 01:45:09 EDT 2013 +bundleVendor=Eclipse.org - EclipseLink Project +bundleName=EclipseLink Core Source diff -Nru eclipselink-2.1.3/about.html eclipselink-2.5.1/about.html --- eclipselink-2.1.3/about.html 2010-11-03 19:05:42.000000000 +0000 +++ eclipselink-2.5.1/about.html 2013-09-18 00:39:10.000000000 +0000 @@ -1,228 +1,216 @@ - - - - -About EclipseLink 2.1.0 - - -

EclipseLink 2.1.0

-

June 23rd, 2010

-

About

-

The EclipseLink project's - goal is to provide a complete persistence framework that is both comprehensive - and universal. It will run in any Java environment and read and write objects - to virtually any type of data source, including relational databases, and XML. - EclipseLink will focus on providing leading edge support, including advanced - feature extensions, for the dominant persistence standards for each target data - source; Java Persistence API (JPA) for relational databases, Java API for XML - Binding (JAXB) for XML, Service Data Objects (SDO), and Database Web services - (DBWS).

- -

For tips on getting started with EclipseLink, please see the following resources: -

- -

License

-

The Eclipse Foundation makes available all content in this plug-in ("Content"). - Unless otherwise indicated below, the Content is provided to you under the terms - and conditions of the Eclipse Public License Version 1.0 ("EPL") and - Eclipse Distribution License Version 1.0 (“EDL”). A copy of the EPL is available at - http://www.eclipse.org/legal/epl-v10.html - and a copy of the EDL is available at - http://www.eclipse.org/org/documents/edl-v10.php. For purposes of the EPL, "Program" - will mean the Content.

-

If you did not receive this Content directly from the Eclipse Foundation, the - Content is being redistributed by another party ("Redistributor") - and different terms and conditions may apply to your use of any object code - in the Content. Check the Redistributor’s license that was provided with - the Content. If no such license exists, contact the Redistributor. Unless otherwise - indicated below, the terms and conditions of the EPL and EDL still apply to any source - code in the Content and such source code may be obtained at http://www.eclipse.org.

-

Third Party Content

-

The Content includes items that have been sourced from third parties as set - out below. If you did not receive this Content directly from the Eclipse Foundation, - the following is provided for informational purposes only, and you should look - to the Redistributor’s license for terms and conditions of use.

- -
-

ASM v1.5.3

-
-

The EclipseLink Project includes ASM for the purpose of - byte code weaving. The AMS library is re-packaged within the source of the - project (org.persistence.eclipse.internal.libraries.asm.*) to avoid version - collisions with other usage of ASM. A custom patch has been added to the ASM - 1.5.3 source to handle an issue with other usages. This fix has - also been contributed back to the ASM project for inclusion in later projects. -

-

The source code is available within the project's subversion repository. - The binaries are distributed within the eclipselink.jar and in the org.eclipse.persistence.asm_2.1.0.v*.jar - bundle.

-

http://asm.objectweb.org/license.html

-

Copyright (c) 2000-2005 INRIA, France Telecom, All rights reserved.

-

Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met:

-
    -
  1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer.
  2. -
  3. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution.
  4. -
  5. Neither the name of the copyright holders nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission.
  6. -
-

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSEARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - BELIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ORCONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OFSUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER INCONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OFTHE POSSIBILITY OF SUCH DAMAGE.

-
-

ANTLR v3.0

-
-

The ANTLR library (license) - is included within EclipseLink Project to enable parsing of the Java Persistence - Query language (JP QL). The ANTLR library is re-packaged within the project - in the org.eclipse.persistence.internal.libraries.antlr.* packages.

-

The source is available with the project's subversion repository. The binaries - are distributed within the eclipselink.jar and in the org.eclipse.persistence.antlr_2.1.0.v*.jar - bundle.

-
-

Java Architecture for XML Binding (JAXB) v2.2

-
-

The JAXB libraries distributed - under CDDL v1.0 - are included within the EclipseLink Project to enable the MOXY component's - implementation of JAXB.

-

JAXB Libraries:

- -
-

Java Persistence (JPA) 1.0 - EJB 3.0

-
-

The Java Persistence API, included with EJB 3.0, is available for download - from the ejb-api - directory in the glassfish CVS repository.It is distributed under - CDDLv1.0 . The jar is being shipped as an OSGi bundle and is required - for compilation of some container based fuctionality.

-
-

-

Java Persistence (JPA) 2.0

-
-

EclipseLink is the Java Persistence (JPA) 2.0 Reference Implementation - (JSR 317). The JPA 2.0 - specification API is included in EclipseLink under the EPL and EDL licenses.

-
-

Java Mail v1.4.0

-
-

The Java Mail library (mail.jar) can be downloaded from java.sun.com - under CDDL - v1.0 and is included within the EclipseLink Project distribution - to support Web Services attachment handling in the MOXy component. It is only - required when using Java SE 5 (Java Mail is included in Java SE 6).

-
-

Java Activation Framework v1.1

-
-

The Java Activation Framework (activation.jar) is distributed with the JAXB - v2.2 under CDDL - v1.0 and is included within the EclipseLink Project distribution to support - Web Services attachment handling in the MOXy component. It is only required - when using Java SE 5 (The Java Activation Framework is included in Java SE - 6).

-
-

Streaming API for XML (StAX) v1.0.1

-
-

The Streaming API for XML (StAX) library (jsr173_1.0_api.jar) is distributed - with the JAXB v2.2 under - CDDL v1.0 - and is included within the EclipseLink Project distribution as an optional - XML processing approach in the MOXy component.

-
-

Service Data Objects (SDO) v2.1.1

-
-

The Service - Data Objects (SDO) API is distributed under a CDDLv1.0 and custom - license. It provides the standard API implemented by the EclipseLink Project's SDO component.

-
-

Java Connector v1.5

-
-

The JCA 1.5 API is available for download from the connector-api - directory in the glassfish CVS repository. It is distributed under - CDDLv1.0 .

-

This jar is being shipped and required by the Workbench only. When using - EclipseLink in a container where JCA integration is required that container - will provide the necessary API libraries.

-
-

Xerces v2.9.0

-
-

Xerces 2.9.0 is available from - the Xerces home page. It is distributed under - Apache 2.0.

-

This jar is shipped for the Workbench's use only in the reading and writing - of XML configuration files.

-
-

Java Servlet 2.4

-
-

The Java Servlet 2.4 specification - is distributed under the Apache 2.0 license. The source code is part of the Apache Tomcat project -

This jar is only required at design time for the DBWS Builder utility.

-
-

WSDL4j v1.6.2

-
-

WSDL4J 1.6.2 is available for download from the wsdl4j - project. It distributed under - CPLv1.0 .

-

This jar is only required at design time for the DBWS Builder utility.

-
-

- - + + + + +About EclipseLink 2.5 + + +

EclipseLink 2.5

+

Eclipse Kepler simultaneous release

+

Target Date - June 2013

+

About

+

The EclipseLink project's + goal is to provide a complete persistence framework that is both comprehensive + and universal. It will run in any Java environment and read and write objects + to virtually any type of data source, including relational databases, and XML. + EclipseLink will focus on providing leading edge support, including advanced + feature extensions, for the dominant persistence standards for each target data + source; Java Persistence API (JPA) for relational databases, Java API for XML + Binding (JAXB) for XML, Service Data Objects (SDO), and Database Web services + (DBWS).

+ +

For tips on getting started with EclipseLink, please see the following resources: +

+ +

License

+

The Eclipse Foundation makes available all content in this plug-in ("Content"). + Unless otherwise indicated below, the Content is provided to you under the terms + and conditions of the Eclipse Public License Version 1.0 ("EPL") and + Eclipse Distribution License Version 1.0 (“EDL”). A copy of the EPL is available at + http://www.eclipse.org/legal/epl-v10.html + and a copy of the EDL is available at + http://www.eclipse.org/org/documents/edl-v10.php. For purposes of the EPL, "Program" + will mean the Content.

+

If you did not receive this Content directly from the Eclipse Foundation, the + Content is being redistributed by another party ("Redistributor") + and different terms and conditions may apply to your use of any object code + in the Content. Check the Redistributor’s license that was provided with + the Content. If no such license exists, contact the Redistributor. Unless otherwise + indicated below, the terms and conditions of the EPL and EDL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org.

+

Third Party Content

+

The Content includes items that have been sourced from third parties as set + out below. If you did not receive this Content directly from the Eclipse Foundation, + the following is provided for informational purposes only, and you should look + to the Redistributor’s license for terms and conditions of use.

+ +
+

ASM v3.3.1

+
+

The EclipseLink Project includes ASM for the purpose of + byte code weaving. The AMS library is re-packaged within the source of the + project (org.persistence.eclipse.internal.libraries.asm.*) to avoid version + collisions with other usage of ASM. +

+

The source code is available within the project's subversion repository. + The binaries are distributed within the eclipselink.jar and in the org.eclipse.persistence.asm_*.jar + bundle.

+

http://asm.objectweb.org/license.html

+

Copyright (c) 2000-2005 INRIA, France Telecom, All rights reserved.

+

Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met:

+
    +
  1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer.
  2. +
  3. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution.
  4. +
  5. Neither the name of the copyright holders nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission.
  6. +
+

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSEARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BELIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ORCONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OFSUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER INCONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OFTHE POSSIBILITY OF SUCH DAMAGE.

+
+

ANTLR v3.2

+
+

The ANTLR library (license) + is included within EclipseLink Project to enable parsing of the Java Persistence + Query language (JP QL). The ANTLR library is re-packaged within the project + in the org.eclipse.persistence.internal.libraries.antlr.* packages.

+

The source is available with the project's subversion repository. The binaries + are distributed within the eclipselink.jar and in the org.eclipse.persistence.antlr_3.2.0.v*.jar + bundle.

+
+

Java Architecture for XML Binding (JAXB) v2.2

+
+

The JAXB libraries distributed + under CDDL v1.0 + are included within the EclipseLink Project to enable the MOXy component's + implementation of JAXB.

+

JAXB Libraries:

+ +
+

Java Persistence (JPA) 2.1

+
+

EclipseLink is the Java Persistence (JPA) 2.1 Reference Implementation + (JSR 338). The JPA 2.1 + specification API is included in EclipseLink under the EPL and EDL licenses.

+
+

Java Mail v1.4.0

+
+

The Java Mail library (mail.jar) can be downloaded from java.sun.com + under CDDL + v1.0 and is included within the EclipseLink Project distribution + to support Web Services attachment handling in the MOXy component. It is only + required when using Java SE 5 (Java Mail is included in Java SE 6).

+
+

Java Activation Framework v1.1

+
+

The Java Activation Framework (activation.jar) is distributed with the JAXB + v2.2 under CDDL + v1.0 and is included within the EclipseLink Project distribution to support + Web Services attachment handling in the MOXy component. It is only required + when using Java SE 5 (The Java Activation Framework is included in Java SE + 6).

+
+

Streaming API for XML (StAX) v1.0.1

+
+

The Streaming API for XML (StAX) library (jsr173_1.0_api.jar) is distributed + with the JAXB v2.2 under + CDDL v1.0 + and is included within the EclipseLink Project distribution as an optional + XML processing approach in the MOXy component.

+
+

Service Data Objects (SDO) v2.1.1

+
+

The Service + Data Objects (SDO) API is distributed under a CDDLv1.0 and custom + license. It provides the standard API implemented by the EclipseLink Project's SDO component.

+
+

Java Connector v1.5

+
+

The JCA 1.5 API is distributed under + CDDLv1.0 .

+

This jar is being shipped and required by the Workbench only. When using + EclipseLink in a container where JCA integration is required that container + will provide the necessary API libraries.

+
+

Xerces v2.9.0

+
+

Xerces 2.9.0 is available from + the Xerces home page. It is distributed under + Apache 2.0.

+

This jar is shipped for the Workbench's use only in the reading and writing + of XML configuration files.

+
+

Java Servlet 2.4

+
+

The Java Servlet 2.4 specification + is distributed under the Apache 2.0 license. The source code is part of the Apache Tomcat project +

This jar is only required at design time for the DBWS Builder utility.

+
+

WSDL4j v1.6.2

+
+

WSDL4J 1.6.2 is available for download from the wsdl4j + project. It distributed under + CPLv1.0 .

+

This jar is only required at design time for the DBWS Builder utility.

+
+

+ + diff -Nru eclipselink-2.1.3/commonj/sdo/impl/HelperProviderImpl.java eclipselink-2.5.1/commonj/sdo/impl/HelperProviderImpl.java --- eclipselink-2.1.3/commonj/sdo/impl/HelperProviderImpl.java 2010-11-03 19:05:44.000000000 +0000 +++ eclipselink-2.5.1/commonj/sdo/impl/HelperProviderImpl.java 2013-09-18 00:39:56.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/debian/JPQL.g eclipselink-2.5.1/debian/JPQL.g --- eclipselink-2.1.3/debian/JPQL.g 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/JPQL.g 1970-01-01 00:00:00.000000000 +0000 @@ -1,1576 +0,0 @@ -/******************************************************************************* - * Copyright (c) 1998, 2008 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 - * which accompanies this distribution. - * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html - * and the Eclipse Distribution License is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * Contributors: - * Oracle - initial API and implementation from Oracle TopLink - ******************************************************************************/ - -// Added 20/12/2000 JED. Define the package for the class - - -grammar JPQL; - -options { - k = 3; // This is the number of tokens to look ahead to - superClass = 'org.eclipse.persistence.internal.jpa.parsing.jpql.JPQLParser'; -} - - -tokens { - ABS='abs'; - ALL='all'; - AND='and'; - ANY='any'; - AS='as'; - ASC='asc'; - AVG='avg'; - BETWEEN='between'; - BOTH='both'; - BY='by'; - CASE='case'; - COALESCE='coalesce'; - CONCAT='concat'; - COUNT='count'; - CURRENT_DATE='current_date'; - CURRENT_TIME='current_time'; - CURRENT_TIMESTAMP='current_timestamp'; - DESC='desc'; - DELETE='delete'; - DISTINCT='distinct'; - ELSE='else'; - EMPTY='empty'; - END='end'; - ENTRY='entry'; - ESCAPE='escape'; - EXISTS='exists'; - FALSE='false'; - FETCH='fetch'; - FUNC='func'; - FROM='from'; - GROUP='group'; - HAVING='having'; - IN='in'; - INDEX='index'; - INNER='inner'; - IS='is'; - JOIN='join'; - KEY='key'; - LEADING='leading'; - LEFT='left'; - LENGTH='length'; - LIKE='like'; - LOCATE='locate'; - LOWER='lower'; - MAX='max'; - MEMBER='member'; - MIN='min'; - MOD='mod'; - NEW='new'; - NOT='not'; - NULL='null'; - NULLIF='nullif'; - OBJECT='object'; - OF='of'; - OR='or'; - ORDER='order'; - OUTER='outer'; - SELECT='select'; - SET='set'; - SIZE='size'; - SQRT='sqrt'; - SOME='some'; - SUBSTRING='substring'; - SUM='sum'; - THEN='then'; - TRAILING='trailing'; - TREAT='treat'; - TRIM='trim'; - TRUE='true'; - TYPE='type'; - UNKNOWN='unknown'; - UPDATE='update'; - UPPER='upper'; - VALUE='value'; - WHEN='when'; - WHERE='where'; -} -@header { - package org.eclipse.persistence.internal.jpa.parsing.jpql.antlr; - - import java.util.List; - import java.util.ArrayList; - - import static org.eclipse.persistence.internal.jpa.parsing.NodeFactory.*; - import org.eclipse.persistence.internal.jpa.parsing.jpql.InvalidIdentifierException; - import org.eclipse.persistence.exceptions.JPQLException; -} - -@lexer::header { - package org.eclipse.persistence.internal.jpa.parsing.jpql.antlr; - - import org.eclipse.persistence.internal.jpa.parsing.jpql.InvalidIdentifierStartException; -} - - - -@members{ - /** The root node of the parsed EJBQL query. */ - private Object queryRoot; - - /** Flag indicating whether aggregates are allowed. */ - private boolean aggregatesAllowed = false; - - /** */ - protected void setAggregatesAllowed(boolean allowed) { - this.aggregatesAllowed = allowed; - } - - /** */ - protected boolean aggregatesAllowed() { - return aggregatesAllowed; - } - - /** */ - protected void validateAbstractSchemaName(Token token) - throws RecognitionException { - String text = token.getText(); - if (!isValidJavaIdentifier(token.getText())) { - throw new InvalidIdentifierException(token); - } - } - - /** */ - protected void validateAttributeName(Token token) - throws RecognitionException { - String text = token.getText(); - if (!isValidJavaIdentifier(token.getText())) { - throw new InvalidIdentifierException(token); - } - } - - /** */ - protected boolean isValidJavaIdentifier(String text) { - if ((text == null) || text.equals("")) - return false; - - // check first char - if (!Character.isJavaIdentifierStart(text.charAt(0))) - return false; - - // check remaining characters - for (int i = 1; i < text.length(); i++) { - if (!Character.isJavaIdentifierPart(text.charAt(i))) { - return false; - } - } - - return true; - } - - protected String convertStringLiteral(String text) { - // skip leading and trailing quotes - String literal = text.substring(1, text.length() - 1); - - // convert ''s to 's - while (true) { - int index = literal.indexOf("''"); - if (index == -1) { - break; - } - literal = literal.substring(0, index) + - literal.substring(index + 1, literal.length()); - } - - return literal; - } - - /** */ - public Object getRootNode() { - return queryRoot; - } -} - -document - : root = selectStatement {queryRoot = $root.node;} - | root = updateStatement {queryRoot = $root.node;} - | root = deleteStatement {queryRoot = $root.node;} - ; - -selectStatement returns [Object node] -@init { - node = null; -} - : select = selectClause - from = fromClause - (where = whereClause)? - (groupBy = groupByClause)? - (having = havingClause)? - (orderBy = orderByClause)? - EOF - { - $node = factory.newSelectStatement(0, 0, $select.node, $from.node, $where.node, - $groupBy.node, $having.node, $orderBy.node); - } - ; - -//================================================ - -updateStatement returns [Object node] -@init { - node = null; -} - : update = updateClause - set = setClause - (where = whereClause)? - EOF { $node = factory.newUpdateStatement(0, 0, $update.node, $set.node, $where.node); } - ; - -updateClause returns [Object node] -@init { - node = null; -} - : u = UPDATE schema = abstractSchemaName - ((AS)? ident = IDENT )? - { - String schemaName = null; - if ($ident != null){ - schemaName = $ident.getText(); - } - $node = factory.newUpdateClause($u.getLine(), $u.getCharPositionInLine(), - $schema.schema, schemaName); - } - ; - -setClause returns [Object node] -scope{ - List assignments; -} -@init { - node = null; - $setClause::assignments = new ArrayList(); -} - : t = SET n = setAssignmentClause { $setClause::assignments.add($n.node); } - (COMMA n = setAssignmentClause { $setClause::assignments.add($n.node); } )* - { $node = factory.newSetClause($t.getLine(), $t.getCharPositionInLine(), $setClause::assignments); } - ; - -setAssignmentClause returns [Object node] -@init { - node = null; -} - @after{ - $node = factory.newSetAssignmentClause($t.getLine(), $t.getCharPositionInLine(), - $target.node, $value.node); - } - : target = setAssignmentTarget t=EQUALS value = newValue - ; - -setAssignmentTarget returns [Object node] -@init { - node = null; -} - : n = attribute { $node = $n.node;} - | n = pathExpression {$node = $n.node;} - ; - -newValue returns [Object node] -@init { node = null; } - : n = scalarExpression {$node = $n.node;} - | n1 = NULL - { $node = factory.newNullLiteral($n1.getLine(), $n1.getCharPositionInLine()); } - ; - -//================================================ - -deleteStatement returns [Object node] -@init { - node = null; -} - : delete = deleteClause - (where = whereClause)? - EOF { $node = factory.newDeleteStatement(0, 0, $delete.node, $where.node); } - ; - -deleteClause returns [Object node] -scope{ - String variable; -} -@init { - node = null; - $deleteClause::variable = null; -} - : t=DELETE FROM schema = abstractSchemaName - ((AS)? ident=IDENT { $deleteClause::variable = $ident.getText(); })? - { - $node = factory.newDeleteClause($t.getLine(), $t.getCharPositionInLine(), - $schema.schema, $deleteClause::variable); - } - ; - -//================================================ - -selectClause returns [Object node] -scope{ - boolean distinct; - List exprs; - List idents; -} -@init { - node = null; - $selectClause::distinct = false; - $selectClause::exprs = new ArrayList(); - $selectClause::idents = new ArrayList(); -} - : t=SELECT (DISTINCT { $selectClause::distinct = true; })? { setAggregatesAllowed(true); } - n = selectItem - { - $selectClause::exprs.add($n.expr); - $selectClause::idents.add($n.ident); - } - ( COMMA n = selectItem - { - $selectClause::exprs.add($n.expr); - $selectClause::idents.add($n.ident); - } - - )* - { - setAggregatesAllowed(false); - $node = factory.newSelectClause($t.getLine(), $t.getCharPositionInLine(), - $selectClause::distinct, $selectClause::exprs, $selectClause::idents); - } - ; - -selectItem returns [Object expr, Object ident] - : e = selectExpression ((AS)? identifier = IDENT)? - { - $expr = $e.node; - if ($identifier == null){ - $ident = null; - } else { - $ident = $identifier.getText(); - } - - } - ; - - -selectExpression returns [Object node] -@init { node = null; } - : n = aggregateExpression {$node = $n.node;} - | n = scalarExpression {$node = $n.node;} - | OBJECT LEFT_ROUND_BRACKET n = variableAccessOrTypeConstant RIGHT_ROUND_BRACKET {$node = $n.node;} - | n = constructorExpression {$node = $n.node;} - | n = mapEntryExpression {$node = $n.node;} - ; - -mapEntryExpression returns [Object node] -@init { node = null; } - : l = ENTRY LEFT_ROUND_BRACKET n = variableAccessOrTypeConstant RIGHT_ROUND_BRACKET { $node = factory.newMapEntry($l.getLine(), $l.getCharPositionInLine(), $n.node);} - ; - -pathExprOrVariableAccess returns [Object node] -@init { - node = null; -} - : n = qualifiedIdentificationVariable {$node = $n.node;} - (d=DOT right = attribute - { $node = factory.newDot($d.getLine(), $d.getCharPositionInLine(), $node, $right.node); } - )* - ; - -qualifiedIdentificationVariable returns [Object node] -@init { node = null; } - : n = variableAccessOrTypeConstant {$node = $n.node;} - | l = KEY LEFT_ROUND_BRACKET n = variableAccessOrTypeConstant RIGHT_ROUND_BRACKET { $node = factory.newKey($l.getLine(), $l.getCharPositionInLine(), $n.node); } - | l = VALUE LEFT_ROUND_BRACKET n = variableAccessOrTypeConstant RIGHT_ROUND_BRACKET { $node = $n.node;} - ; - -aggregateExpression returns [Object node] -scope{ - boolean distinct; -} -@init { - node = null; - $aggregateExpression::distinct = false; -} - : t1=AVG LEFT_ROUND_BRACKET (DISTINCT { $aggregateExpression::distinct = true; })? - n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newAvg($t1.getLine(), $t1.getCharPositionInLine(), $aggregateExpression::distinct, $n.node); } - | t2=MAX LEFT_ROUND_BRACKET (DISTINCT { $aggregateExpression::distinct = true; })? - n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newMax($t2.getLine(), $t2.getCharPositionInLine(), $aggregateExpression::distinct, $n.node); } - | t3=MIN LEFT_ROUND_BRACKET (DISTINCT { $aggregateExpression::distinct = true; })? - n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newMin($t3.getLine(), $t3.getCharPositionInLine(), $aggregateExpression::distinct, $n.node); } - | t4=SUM LEFT_ROUND_BRACKET (DISTINCT { $aggregateExpression::distinct = true; })? - n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newSum($t4.getLine(), $t4.getCharPositionInLine(), $aggregateExpression::distinct, $n.node); } - | t5=COUNT LEFT_ROUND_BRACKET (DISTINCT { $aggregateExpression::distinct = true; })? - n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newCount($t5.getLine(), $t5.getCharPositionInLine(), $aggregateExpression::distinct, $n.node); } - ; - -constructorExpression returns [Object node] -scope{ - List args; -} -@init { - node = null; - $constructorExpression::args = new ArrayList(); -} - : t = NEW className = constructorName - LEFT_ROUND_BRACKET - n = constructorItem {$constructorExpression::args.add($n.node); } - ( COMMA n = constructorItem { $constructorExpression::args.add($n.node); } )* - RIGHT_ROUND_BRACKET - { - $node = factory.newConstructor($t.getLine(), $t.getCharPositionInLine(), - $className.className, $constructorExpression::args); - } - ; - -constructorName returns [String className] -scope{ - StringBuffer buf; -} -@init { - className = null; - $constructorName::buf = new StringBuffer(); -} - : i1=IDENT { $constructorName::buf.append($i1.getText()); } - ( DOT i2=IDENT { $constructorName::buf.append('.').append($i2.getText()); })* - { $className = $constructorName::buf.toString(); } - ; - -constructorItem returns [Object node] -@init { node = null; } - : n = scalarExpression {$node = $n.node;} - | n = aggregateExpression {$node = $n.node;} - - ; - -fromClause returns [Object node] -scope{ - List varDecls; -} -@init { - node = null; - $fromClause::varDecls = new ArrayList(); -} - : t=FROM identificationVariableDeclaration[$fromClause::varDecls] - (COMMA ( identificationVariableDeclaration[$fromClause::varDecls] - | n = collectionMemberDeclaration {$fromClause::varDecls.add($n.node); } - ) - )* - { $node = factory.newFromClause($t.getLine(), $t.getCharPositionInLine(), $fromClause::varDecls); } - ; - -identificationVariableDeclaration [List varDecls] - : node = rangeVariableDeclaration { varDecls.add($node.node); } - ( node = join { $varDecls.add($node.node); } )* - ; - -rangeVariableDeclaration returns [Object node] -@init { - node = null; -} - : schema = abstractSchemaName (AS)? i=IDENT - { - $node = factory.newRangeVariableDecl($i.getLine(), $i.getCharPositionInLine(), - $schema.schema, $i.getText()); - } - ; - -// Non-terminal abstractSchemaName first matches any token to allow abstract -// schema names that are keywords (such as order, etc.). -// Method validateAbstractSchemaName throws an exception if the text of the -// token is not a valid Java identifier. -abstractSchemaName returns [String schema] -@init { schema = null; } - : ident=. - { - $schema = $ident.getText(); - validateAbstractSchemaName($ident); - } - ; - -join returns [Object node] -@init { - node = null; -} - : outerJoin = joinSpec - ( n = joinAssociationPathExpression (AS)? i=IDENT - { - $node = factory.newJoinVariableDecl($i.getLine(), $i.getCharPositionInLine(), - $outerJoin.outer, $n.node, $i.getText(), null); - } - | - TREAT LEFT_ROUND_BRACKET n = joinAssociationPathExpression AS castClass = IDENT RIGHT_ROUND_BRACKET (AS)? i=IDENT - { - $node = factory.newJoinVariableDecl($i.getLine(), $i.getCharPositionInLine(), - $outerJoin.outer, $n.node, $i.getText(), $castClass.getText()); - } - | t=FETCH n = joinAssociationPathExpression - { - $node = factory.newFetchJoin($t.getLine(), $t.getCharPositionInLine(), - $outerJoin.outer, $n.node); } - ) - ; - -joinSpec returns [boolean outer] -@init { outer = false; } - : (LEFT (OUTER)? { $outer = true; } | INNER )? JOIN - ; - -collectionMemberDeclaration returns [Object node] -@init { node = null; } - : t=IN LEFT_ROUND_BRACKET n = collectionValuedPathExpression RIGHT_ROUND_BRACKET - (AS)? i=IDENT - { - $node = factory.newCollectionMemberVariableDecl( - $t.getLine(), $t.getCharPositionInLine(), $n.node, $i.getText()); - } - ; - -collectionValuedPathExpression returns [Object node] -@init { node = null; } - : n = pathExpression {$node = $n.node;} - ; - -associationPathExpression returns [Object node] -@init { node = null; } - : n = pathExpression {$node = $n.node;} - ; - -joinAssociationPathExpression returns [Object node] -@init { - node = null; -} - : n = qualifiedIdentificationVariable {$node = $n.node;} - (d=DOT right = attribute - { $node = factory.newDot($d.getLine(), $d.getCharPositionInLine(), $node, $right.node); } - )+ - ; - -singleValuedPathExpression returns [Object node] -@init { node = null; } - : n = pathExpression {$node = $n.node;} - ; - -stateFieldPathExpression returns [Object node] -@init { node = null; } - : n = pathExpression {$node = $n.node;} - ; - -pathExpression returns [Object node] -@init { - node = null; -} - : n = qualifiedIdentificationVariable {$node = $n.node;} - (d=DOT right = attribute - { - $node = factory.newDot($d.getLine(), $d.getCharPositionInLine(), $node, $right.node); - } - )+ - ; - -// Non-terminal attribute first matches any token to allow abstract -// schema names that are keywords (such as order, etc.). -// Method validateAttributeName throws an exception if the text of the -// token is not a valid Java identifier. -attribute returns [Object node] -@init { node = null; } - - : i=. - { - validateAttributeName($i); - $node = factory.newAttribute($i.getLine(), $i.getCharPositionInLine(), $i.getText()); - } - ; - -variableAccessOrTypeConstant returns [Object node] -@init { node = null; } - : i=IDENT - { $node = factory.newVariableAccessOrTypeConstant($i.getLine(), $i.getCharPositionInLine(), $i.getText()); } - ; - -whereClause returns [Object node] -@init { node = null; } - : t=WHERE n = conditionalExpression - { - $node = factory.newWhereClause($t.getLine(), $t.getCharPositionInLine(), $n.node); - } - ; - -conditionalExpression returns [Object node] -@init { - node = null; -} - : n = conditionalTerm {$node = $n.node;} - (t=OR right = conditionalTerm - { $node = factory.newOr($t.getLine(), $t.getCharPositionInLine(), $node, $right.node); } - )* - ; - -conditionalTerm returns [Object node] -@init { - node = null; -} - : n = conditionalFactor {$node = $n.node;} - (t=AND right = conditionalFactor - { $node = factory.newAnd($t.getLine(), $t.getCharPositionInLine(), $node, $right.node); } - )* - ; - -conditionalFactor returns [Object node] -@init { node = null; } - : (n=NOT)? - ( n1 = conditionalPrimary - { - $node = $n1.node; - if ($n != null) { - $node = factory.newNot($n.getLine(), $n.getCharPositionInLine(), $n1.node); - } - } - | n1 = existsExpression[(n!=null)] {$node = $n1.node;} - ) - ; - -conditionalPrimary returns [Object node] -@init { node = null; } - : (LEFT_ROUND_BRACKET conditionalExpression) => - LEFT_ROUND_BRACKET n = conditionalExpression RIGHT_ROUND_BRACKET {$node = $n.node;} - | n = simpleConditionalExpression {$node = $n.node;} - ; - -simpleConditionalExpression returns [Object node] -@init { - node = null; -} - : left = arithmeticExpression n = simpleConditionalExpressionRemainder[$left.node] {$node = $n.node;} - | left = nonArithmeticScalarExpression n = simpleConditionalExpressionRemainder[$left.node] {$node = $n.node;} - ; - -simpleConditionalExpressionRemainder [Object left] returns [Object node] -@init { node = null; } - : n = comparisonExpression[left] {$node = $n.node;} - | (n1=NOT)? n = conditionWithNotExpression[(n1!=null), left] {$node = $n.node;} - | IS (n2=NOT)? n = isExpression[(n2!=null), left] {$node = $n.node;} - ; - -conditionWithNotExpression [boolean not, Object left] returns [Object node] -@init { node = null; } - : n = betweenExpression[not, left] {$node = $n.node;} - | n = likeExpression[not, left] {$node = $n.node;} - | n= inExpression[not, left] {$node = $n.node;} - | n= collectionMemberExpression[not, left] {$node = $n.node;} - ; - -isExpression [boolean not, Object left] returns [Object node] -@init { node = null; } - : n = nullComparisonExpression[not, left] {$node = $n.node;} - | n = emptyCollectionComparisonExpression[not, left] {$node = $n.node;} - ; - -betweenExpression [boolean not, Object left] returns [Object node] -@init { - node = null; -} - : t=BETWEEN - lowerBound = scalarOrSubSelectExpression AND upperBound = scalarOrSubSelectExpression - { - $node = factory.newBetween($t.getLine(), $t.getCharPositionInLine(), - $not, $left, $lowerBound.node, $upperBound.node); - } - ; - -inExpression [boolean not, Object left] returns [Object node] -scope{ - List items; -} -@init { - node = null; - $inExpression::items = new ArrayList(); -} - : t = IN n = inputParameter - { - $node = factory.newIn($t.getLine(), $t.getCharPositionInLine(), - $not, $left, $n.node); - } - | t=IN - LEFT_ROUND_BRACKET - ( itemNode = scalarOrSubSelectExpression { $inExpression::items.add($itemNode.node); } - ( COMMA itemNode = scalarOrSubSelectExpression { $inExpression::items.add($itemNode.node); } )* - { - $node = factory.newIn($t.getLine(), $t.getCharPositionInLine(), - $not, $left, $inExpression::items); - } - | subqueryNode = subquery - { - $node = factory.newIn($t.getLine(), $t.getCharPositionInLine(), - $not, $left, $subqueryNode.node); - } - ) - RIGHT_ROUND_BRACKET - ; - -likeExpression [boolean not, Object left] returns [Object node] -@init { - node = null; -} - : t=LIKE pattern = scalarOrSubSelectExpression - (escapeChars = escape)? - { - $node = factory.newLike($t.getLine(), $t.getCharPositionInLine(), $not, - $left, $pattern.node, $escapeChars.node); - } - ; - -escape returns [Object node] -@init { - node = null; -} - : t=ESCAPE escapeClause = scalarExpression - { $node = factory.newEscape($t.getLine(), $t.getCharPositionInLine(), $escapeClause.node); } - ; - -nullComparisonExpression [boolean not, Object left] returns [Object node] -@init { node = null; } - : t= NULL - { $node = factory.newIsNull($t.getLine(), $t.getCharPositionInLine(), $not, $left); } - ; - -emptyCollectionComparisonExpression [boolean not, Object left] returns [Object node] -@init { node = null; } - : t= EMPTY - { $node = factory.newIsEmpty($t.getLine(), $t.getCharPositionInLine(), $not, $left); } - ; - -collectionMemberExpression [boolean not, Object left] returns [Object node] -@init { node = null; } - : t= MEMBER (OF)? n = collectionValuedPathExpression - { - $node = factory.newMemberOf($t.getLine(), $t.getCharPositionInLine(), - $not, $left, $n.node); - } - ; - -existsExpression [boolean not] returns [Object node] -@init { - node = null; -} - : t=EXISTS LEFT_ROUND_BRACKET subqueryNode = subquery RIGHT_ROUND_BRACKET - { - $node = factory.newExists($t.getLine(), $t.getCharPositionInLine(), - $not, $subqueryNode.node); - } - ; - -comparisonExpression [Object left] returns [Object node] -@init { node = null; } - : t1=EQUALS n = comparisonExpressionRightOperand - { $node = factory.newEquals($t1.getLine(), $t1.getCharPositionInLine(), $left, $n.node); } - | t2=NOT_EQUAL_TO n = comparisonExpressionRightOperand - { $node = factory.newNotEquals($t2.getLine(), $t2.getCharPositionInLine(), $left, $n.node); } - | t3=GREATER_THAN n = comparisonExpressionRightOperand - { $node = factory.newGreaterThan($t3.getLine(), $t3.getCharPositionInLine(), $left, $n.node); } - | t4=GREATER_THAN_EQUAL_TO n = comparisonExpressionRightOperand - { $node = factory.newGreaterThanEqual($t4.getLine(), $t4.getCharPositionInLine(), $left, $n.node); } - | t5=LESS_THAN n = comparisonExpressionRightOperand - { $node = factory.newLessThan($t5.getLine(), $t5.getCharPositionInLine(), $left, $n.node); } - | t6=LESS_THAN_EQUAL_TO n = comparisonExpressionRightOperand - { $node = factory.newLessThanEqual($t6.getLine(), $t6.getCharPositionInLine(), $left, $n.node); } - ; - -comparisonExpressionRightOperand returns [Object node] -@init { node = null; } - : n = arithmeticExpression {$node = $n.node;} - | n = nonArithmeticScalarExpression {$node = $n.node;} - | n = anyOrAllExpression {$node = $n.node;} - ; - -arithmeticExpression returns [Object node] -@init { node = null; } - : n = simpleArithmeticExpression {$node = $n.node;} - | LEFT_ROUND_BRACKET n = subquery RIGHT_ROUND_BRACKET {$node = $n.node;} - ; - -simpleArithmeticExpression returns [Object node] -@init { - node = null; -} - : n = arithmeticTerm {$node = $n.node;} - ( p=PLUS right = arithmeticTerm - { $node = factory.newPlus($p.getLine(), $p.getCharPositionInLine(), $node, $right.node); } - | m=MINUS right = arithmeticTerm - { $node = factory.newMinus($m.getLine(), $m.getCharPositionInLine(), $node, $right.node); } - )* - ; - -arithmeticTerm returns [Object node] -@init { - node = null; -} - : n = arithmeticFactor {$node = $n.node;} - ( m=MULTIPLY right = arithmeticFactor - { $node = factory.newMultiply($m.getLine(), $m.getCharPositionInLine(), $node, $right.node); } - | d=DIVIDE right = arithmeticFactor - { $node = factory.newDivide($d.getLine(), $d.getCharPositionInLine(), $node, $right.node); } - )* - ; - -arithmeticFactor returns [Object node] -@init { node = null; } - : p=PLUS n = arithmeticPrimary - {$node = factory.newUnaryPlus($p.getLine(), $p.getCharPositionInLine(), $n.node); } - | m=MINUS n = arithmeticPrimary - { $node = factory.newUnaryMinus($m.getLine(), $m.getCharPositionInLine(), $n.node); } - | n = arithmeticPrimary {$node = $n.node;} - ; - -arithmeticPrimary returns [Object node] -@init { node = null; } - : { aggregatesAllowed() }? n = aggregateExpression {$node = $n.node;} - | n = pathExprOrVariableAccess {$node = $n.node;} - | n = inputParameter {$node = $n.node;} - | n = caseExpression {$node = $n.node;} - | n = functionsReturningNumerics {$node = $n.node;} - | LEFT_ROUND_BRACKET n = simpleArithmeticExpression RIGHT_ROUND_BRACKET {$node = $n.node;} - | n = literalNumeric {$node = $n.node;} - ; - -scalarExpression returns [Object node] -@init {node = null; } - : n = simpleArithmeticExpression {$node = $n.node;} - | n = nonArithmeticScalarExpression {$node = $n.node;} - ; - -scalarOrSubSelectExpression returns [Object node] -@init {node = null; } - : n = arithmeticExpression {$node = $n.node;} - | n = nonArithmeticScalarExpression {$node = $n.node;} - ; - -nonArithmeticScalarExpression returns [Object node] -@init {node = null; } - : n = functionsReturningDatetime {$node = $n.node;} - | n = functionsReturningStrings {$node = $n.node;} - | n = literalString {$node = $n.node;} - | n = literalBoolean {$node = $n.node;} - | n = literalTemporal {$node = $n.node;} - | n = entityTypeExpression {$node = $n.node;} - ; - -anyOrAllExpression returns [Object node] -@init { node = null; } - : a=ALL LEFT_ROUND_BRACKET n = subquery RIGHT_ROUND_BRACKET - { $node = factory.newAll($a.getLine(), $a.getCharPositionInLine(), $n.node); } - | y=ANY LEFT_ROUND_BRACKET n = subquery RIGHT_ROUND_BRACKET - { $node = factory.newAny($y.getLine(), $y.getCharPositionInLine(), $n.node); } - | s=SOME LEFT_ROUND_BRACKET n = subquery RIGHT_ROUND_BRACKET - { $node = factory.newSome($s.getLine(), $s.getCharPositionInLine(), $n.node); } - ; - -entityTypeExpression returns [Object node] -@init {node = null;} - : n = typeDiscriminator {$node = $n.node;} - ; - -typeDiscriminator returns [Object node] -@init {node = null;} - : a = TYPE LEFT_ROUND_BRACKET n = variableOrSingleValuedPath RIGHT_ROUND_BRACKET { $node = factory.newType($a.getLine(), $a.getCharPositionInLine(), $n.node);} - | c = TYPE LEFT_ROUND_BRACKET n = inputParameter RIGHT_ROUND_BRACKET { $node = factory.newType($c.getLine(), $c.getCharPositionInLine(), $n.node);} - ; - -caseExpression returns [Object node] -@init {node = null;} - : n = simpleCaseExpression {$node = $n.node;} - | n = generalCaseExpression {$node = $n.node;} - | n = coalesceExpression {$node = $n.node;} - | n = nullIfExpression {$node = $n.node;} - ; - -simpleCaseExpression returns [Object node] -scope{ - List whens; -} -@init { - node = null; - $simpleCaseExpression::whens = new ArrayList(); -} - : a = CASE c = caseOperand w = simpleWhenClause {$simpleCaseExpression::whens.add($w.node);} (w = simpleWhenClause {$simpleCaseExpression::whens.add($w.node);})* ELSE e = scalarExpression END - { - $node = factory.newCaseClause($a.getLine(), $a.getCharPositionInLine(), $c.node, - $simpleCaseExpression::whens, $e.node); - } - ; - -generalCaseExpression returns [Object node] -scope{ - List whens; -} -@init { - node = null; - $generalCaseExpression::whens = new ArrayList(); -} - : a = CASE w = whenClause {$generalCaseExpression::whens.add($w.node);} (w = whenClause {$generalCaseExpression::whens.add($w.node);})* ELSE e = scalarExpression END - { - $node = factory.newCaseClause($a.getLine(), $a.getCharPositionInLine(), null, - $generalCaseExpression::whens, $e.node); - } - ; - -coalesceExpression returns [Object node] -scope{ - List primaries; -} -@init { - node = null; - $coalesceExpression::primaries = new ArrayList(); -} - : c = COALESCE LEFT_ROUND_BRACKET p = scalarExpression {$coalesceExpression::primaries.add($p.node);} (COMMA s = scalarExpression {$coalesceExpression::primaries.add($s.node);})+ RIGHT_ROUND_BRACKET - { - $node = factory.newCoalesceClause($c.getLine(), $c.getCharPositionInLine(), - $coalesceExpression::primaries); - } - ; - -nullIfExpression returns [Object node] -@init {node = null;} - : n = NULLIF LEFT_ROUND_BRACKET l = scalarExpression COMMA r = scalarExpression RIGHT_ROUND_BRACKET - { - $node = factory.newNullIfClause($n.getLine(), $n.getCharPositionInLine(), - $l.node, $r.node); - } - ; - - -caseOperand returns [Object node] -@init {node = null;} - : n = stateFieldPathExpression {$node = $n.node;} - | n = typeDiscriminator {$node = $n.node;} - ; - -whenClause returns [Object node] -@init {node = null;} - : w = WHEN c = conditionalExpression THEN a = scalarExpression - { - $node = factory.newWhenClause($w.getLine(), $w.getCharPositionInLine(), - $c.node, $a.node); - } - ; - -simpleWhenClause returns [Object node] -@init {node = null;} - : w = WHEN c = scalarExpression THEN a = scalarExpression - { - $node = factory.newWhenClause($w.getLine(), $w.getCharPositionInLine(), - $c.node, $a.node); - } - ; - -variableOrSingleValuedPath returns [Object node] -@init {node = null;} - : n = singleValuedPathExpression {$node = $n.node;} - | n = variableAccessOrTypeConstant {$node = $n.node;} - ; - -stringPrimary returns [Object node] -@init { node = null; } - : n = literalString {$node = $n.node;} - | n = functionsReturningStrings {$node = $n.node;} - | n = inputParameter {$node = $n.node;} - | n = stateFieldPathExpression {$node = $n.node;} - ; - -// Literals and Low level stuff - -literal returns [Object node] -@init { node = null; } - : n = literalNumeric {$node = $n.node;} - | n = literalBoolean {$node = $n.node;} - | n = literalString {$node = $n.node;} - ; - -literalNumeric returns [Object node] -@init { node = null; } - : i=INTEGER_LITERAL - { - $node = factory.newIntegerLiteral($i.getLine(), $i.getCharPositionInLine(), - Integer.valueOf($i.getText())); - } - | l=LONG_LITERAL - { - String text = l.getText(); - // skip the tailing 'l' - text = text.substring(0, text.length() - 1); - $node = factory.newLongLiteral($l.getLine(), $l.getCharPositionInLine(), - Long.valueOf(text)); - } - | f=FLOAT_LITERAL - { - $node = factory.newFloatLiteral($f.getLine(), $f.getCharPositionInLine(), - Float.valueOf($f.getText())); - } - | d=DOUBLE_LITERAL - { - $node = factory.newDoubleLiteral($d.getLine(), $d.getCharPositionInLine(), - Double.valueOf($d.getText())); - } - ; - -literalBoolean returns [Object node] -@init { node = null; } - : t=TRUE - { $node = factory.newBooleanLiteral($t.getLine(), $t.getCharPositionInLine(), Boolean.TRUE); } - | f=FALSE - { $node = factory.newBooleanLiteral($f.getLine(), $f.getCharPositionInLine(), Boolean.FALSE); } - ; - -literalString returns [Object node] -@init { node = null; } - : d=STRING_LITERAL_DOUBLE_QUOTED - { - $node = factory.newStringLiteral($d.getLine(), $d.getCharPositionInLine(), - convertStringLiteral($d.getText())); - } - | s=STRING_LITERAL_SINGLE_QUOTED - { - $node = factory.newStringLiteral($s.getLine(), $s.getCharPositionInLine(), - convertStringLiteral($s.getText())); - } - ; - -literalTemporal returns [Object node] -@init { node = null; } - : d = DATE_LITERAL {$node = factory.newDateLiteral($d.getLine(), $d.getCharPositionInLine(), $d.getText()); } - | d = TIME_LITERAL {$node = factory.newTimeLiteral($d.getLine(), $d.getCharPositionInLine(), $d.getText()); } - | d = TIMESTAMP_LITERAL {$node = factory.newTimeStampLiteral($d.getLine(), $d.getCharPositionInLine(), $d.getText()); } - ; - -inputParameter returns [Object node] -@init { node = null; } - : p=POSITIONAL_PARAM - { - // skip the leading ? - String text = $p.getText().substring(1); - $node = factory.newPositionalParameter($p.getLine(), $p.getCharPositionInLine(), text); - } - | n=NAMED_PARAM - { - // skip the leading : - String text = $n.getText().substring(1); - $node = factory.newNamedParameter($n.getLine(), $n.getCharPositionInLine(), text); - } - ; - -functionsReturningNumerics returns [Object node] -@init { node = null; } - : n = abs {$node = $n.node;} - | n = length {$node = $n.node;} - | n = mod {$node = $n.node;} - | n = sqrt {$node = $n.node;} - | n = locate {$node = $n.node;} - | n = size {$node = $n.node;} - | n = index {$node = $n.node;} - | n = func {$node = $n.node;} - ; - -functionsReturningDatetime returns [Object node] -@init { node = null; } - : d=CURRENT_DATE - { $node = factory.newCurrentDate($d.getLine(), $d.getCharPositionInLine()); } - | t=CURRENT_TIME - { $node = factory.newCurrentTime($t.getLine(), $t.getCharPositionInLine()); } - | ts=CURRENT_TIMESTAMP - { $node = factory.newCurrentTimestamp($ts.getLine(), $ts.getCharPositionInLine()); } - ; - -functionsReturningStrings returns [Object node] -@init { node = null; } - : n = concat {$node = $n.node;} - | n = substring {$node = $n.node;} - | n = trim {$node = $n.node;} - | n = upper {$node = $n.node;} - | n = lower {$node = $n.node;} - ; - -// Functions returning strings -concat returns [Object node] -scope { - List items; -} -@init { - node = null; - $concat::items = new ArrayList(); -} - : c=CONCAT - LEFT_ROUND_BRACKET - firstArg = scalarExpression {$concat::items.add($firstArg.node);} (COMMA arg = scalarExpression {$concat::items.add($arg.node);})+ - RIGHT_ROUND_BRACKET - { $node = factory.newConcat($c.getLine(), $c.getCharPositionInLine(), $concat::items); } - ; - -substring returns [Object node] -@init { - node = null; - lengthNode = null; -} - : s=SUBSTRING - LEFT_ROUND_BRACKET - string = scalarExpression COMMA - start = scalarExpression - (COMMA lengthNode = scalarExpression)? - RIGHT_ROUND_BRACKET - { - if (lengthNode != null){ - $node = factory.newSubstring($s.getLine(), $s.getCharPositionInLine(), - $string.node, $start.node, $lengthNode.node); - } else { - $node = factory.newSubstring($s.getLine(), $s.getCharPositionInLine(), - $string.node, $start.node, null); - } - } - ; - -trim returns [Object node] -@init { - node = null; - trimSpecIndicator = TrimSpecification.BOTH; -} - : t=TRIM - LEFT_ROUND_BRACKET - (trimSpecIndicator = trimSpec trimCharNode = trimChar FROM)? - n = stringPrimary - RIGHT_ROUND_BRACKET - { - $node = factory.newTrim($t.getLine(), $t.getCharPositionInLine(), - $trimSpecIndicator.trimSpec, $trimCharNode.node, $n.node); - } - ; - -trimSpec returns [TrimSpecification trimSpec] -@init { trimSpec = TrimSpecification.BOTH; } - : LEADING - { $trimSpec = TrimSpecification.LEADING; } - | TRAILING - { $trimSpec = TrimSpecification.TRAILING; } - | BOTH - { $trimSpec = TrimSpecification.BOTH; } - | // empty rule - ; - - -trimChar returns [Object node] -@init { node = null; } - : n = literalString {$node = $n.node;} - | n = inputParameter {$node = $n.node;} - | // empty rule - ; - -upper returns [Object node] -@init { node = null; } - : u=UPPER LEFT_ROUND_BRACKET n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newUpper($u.getLine(), $u.getCharPositionInLine(), $n.node); } - ; - -lower returns [Object node] -@init { node = null; } - : l=LOWER LEFT_ROUND_BRACKET n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newLower($l.getLine(), $l.getCharPositionInLine(), $n.node); } - ; - -// Functions returning numerics -abs returns [Object node] -@init { node = null; } - : a=ABS LEFT_ROUND_BRACKET n = simpleArithmeticExpression RIGHT_ROUND_BRACKET - { $node = factory.newAbs($a.getLine(), $a.getCharPositionInLine(), $n.node); } - ; - -length returns [Object node] -@init { node = null; } - : l=LENGTH LEFT_ROUND_BRACKET n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newLength($l.getLine(), $l.getCharPositionInLine(), $n.node); } - ; - -locate returns [Object node] -@init { - node = null; -} - : l=LOCATE - LEFT_ROUND_BRACKET - pattern = scalarExpression COMMA n = scalarExpression - ( COMMA startPos = scalarExpression )? - RIGHT_ROUND_BRACKET - { - $node = factory.newLocate($l.getLine(), $l.getCharPositionInLine(), - $pattern.node, $n.node, $startPos.node); - } - ; - -size returns [Object node] -@init { node = null; } - : s=SIZE - LEFT_ROUND_BRACKET n = collectionValuedPathExpression RIGHT_ROUND_BRACKET - { $node = factory.newSize($s.getLine(), $s.getCharPositionInLine(), $n.node);} - ; - -mod returns [Object node] -@init { - node = null; -} - : m=MOD LEFT_ROUND_BRACKET - left = scalarExpression COMMA - right = scalarExpression - RIGHT_ROUND_BRACKET - { $node = factory.newMod($m.getLine(), $m.getCharPositionInLine(), $left.node, $right.node); } - ; - -sqrt returns [Object node] -@init { node = null; } - : s=SQRT - LEFT_ROUND_BRACKET n = scalarExpression RIGHT_ROUND_BRACKET - { $node = factory.newSqrt($s.getLine(), $s.getCharPositionInLine(), $n.node); } - ; - -index returns [Object node] -@init { node = null; } - : s=INDEX LEFT_ROUND_BRACKET n = variableAccessOrTypeConstant RIGHT_ROUND_BRACKET - { $node = factory.newIndex($s.getLine(), $s.getCharPositionInLine(), $n.node); } - ; - -// custom function -func returns [Object node] -scope{ - List exprs; -} -@init { - node = null; - $func::exprs = new ArrayList(); -} - : f=FUNC LEFT_ROUND_BRACKET - name = STRING_LITERAL_SINGLE_QUOTED - (COMMA n = newValue - { - $func::exprs.add($n.node); - } - )* - RIGHT_ROUND_BRACKET - {$node = factory.newFunc($f.getLine(), $f.getCharPositionInLine(), $name.getText(), $func::exprs);} - ; - -subquery returns [Object node] -@init { - node = null; -} - : select = simpleSelectClause - from = subqueryFromClause - (where = whereClause)? - (groupBy = groupByClause)? - (having = havingClause)? - { - $node = factory.newSubquery(0, 0, $select.node, $from.node, - $where.node, $groupBy.node, $having.node); - } - ; - -simpleSelectClause returns [Object node] -scope{ - boolean distinct; -} -@init { - node = null; - $simpleSelectClause::distinct = false; -} - : s=SELECT (DISTINCT { $simpleSelectClause::distinct = true; })? - n = simpleSelectExpression - { - List exprs = new ArrayList(); - exprs.add($n.node); - $node = factory.newSelectClause($s.getLine(), $s.getCharPositionInLine(), - $simpleSelectClause::distinct, exprs); - } - ; - -simpleSelectExpression returns [Object node] -@init { node = null; } - : n = singleValuedPathExpression {$node = $n.node;} - | n = aggregateExpression {$node = $n.node;} - | n = variableAccessOrTypeConstant {$node = $n.node;} - ; - - -subqueryFromClause returns [Object node] -scope{ - List varDecls; -} -@init { - node = null; - $subqueryFromClause::varDecls = new ArrayList(); -} - : f=FROM subselectIdentificationVariableDeclaration[$subqueryFromClause::varDecls] - ( - COMMA - subselectIdentificationVariableDeclaration[$subqueryFromClause::varDecls] - | c = collectionMemberDeclaration {$subqueryFromClause::varDecls.add($c.node);} - )* - { $node = factory.newFromClause($f.getLine(), $f.getCharPositionInLine(), $subqueryFromClause::varDecls); } - ; - -subselectIdentificationVariableDeclaration [List varDecls] -@init { Object node; } - : identificationVariableDeclaration[varDecls] - | n = associationPathExpression (AS)? i=IDENT (join { varDecls.add($n.node); } )* - { - $varDecls.add(factory.newVariableDecl($i.getLine(), $i.getCharPositionInLine(), - $n.node, $i.getText())); - } - | n = collectionMemberDeclaration { $varDecls.add($n.node); } - ; - -orderByClause returns [Object node] -scope{ - List items; -} -@init { - node = null; - $orderByClause::items = new ArrayList(); -} - : o=ORDER BY { setAggregatesAllowed(true); } - n = orderByItem { $orderByClause::items.add($n.node); } - (COMMA n = orderByItem { $orderByClause::items.add($n.node); })* - { - setAggregatesAllowed(false); - $node = factory.newOrderByClause($o.getLine(), $o.getCharPositionInLine(), $orderByClause::items); - } - ; - -orderByItem returns [Object node] -@init { node = null; } - : n = scalarExpression - ( a=ASC - { $node = factory.newAscOrdering($a.getLine(), $a.getCharPositionInLine(), $n.node); } - | d=DESC - { $node = factory.newDescOrdering($d.getLine(), $d.getCharPositionInLine(), $n.node); } - | // empty rule - { $node = factory.newAscOrdering(0, 0, $n.node); } - ) - ; - -groupByClause returns [Object node] -scope{ - List items; -} -@init { - node = null; - $groupByClause::items = new ArrayList(); -} - : g=GROUP BY - n = scalarExpression { $groupByClause::items.add($n.node); } - (COMMA n = scalarExpression { $groupByClause::items.add($n.node); } )* - { $node = factory.newGroupByClause($g.getLine(), $g.getCharPositionInLine(), $groupByClause::items); } - ; - - -havingClause returns [Object node] -@init { node = null; } - : h=HAVING { setAggregatesAllowed(true); } - n = conditionalExpression - { - setAggregatesAllowed(false); - $node = factory.newHavingClause($h.getLine(), $h.getCharPositionInLine(), $n.node); - } - ; - - -DOT - : '.' - ; - -WS : (' ' | '\t' | '\n' | '\r')+ - { skip(); } ; - -LEFT_ROUND_BRACKET - : '(' - ; - -LEFT_CURLY_BRACKET - : '{' - ; - -RIGHT_ROUND_BRACKET - : ')' - ; - -RIGHT_CURLY_BRACKET - : '}' - ; - -COMMA - : ',' - ; - -IDENT - : TEXTCHAR - ; - -fragment -TEXTCHAR - : ('a'..'z' | 'A'..'Z' | '_' | '$' | '`' | '~' | '@' | '#' | '%' | '^' | '&' | '|' | '[' | ']' | ';' - c1='\u0080'..'\uFFFE' - { - if (!Character.isJavaIdentifierStart(c1)) { - throw new InvalidIdentifierStartException(c1, getLine(), getCharPositionInLine()); - } - } - ) - ('a'..'z' | '_' | '$' | '0'..'9' | - c2='\u0080'..'\uFFFE' - { - if (!Character.isJavaIdentifierPart(c2)) { - throw new InvalidIdentifierStartException(c2, getLine(), getCharPositionInLine()); - } - } - )* - ; - - -HEX_LITERAL : '0' ('x'|'X') HEX_DIGIT+ ; - -INTEGER_LITERAL : MINUS? ('0' | '1'..'9' '0'..'9'*) ; - -LONG_LITERAL : INTEGER_LITERAL INTEGER_SUFFIX; - -OCTAL_LITERAL : MINUS? '0' ('0'..'7')+ ; - -// hexadecimal digit -fragment -HEX_DIGIT - : ('0'..'9'|'a'..'f' | 'A'..'F') - ; - -fragment -INTEGER_SUFFIX : ('l'|'L') ; - -fragment -NUMERIC_DIGITS - : MINUS? ('0'..'9')+ '.' ('0'..'9')* - | MINUS? '.' ('0'..'9')+ - | MINUS? ('0'..'9')+ - ; - -DOUBLE_LITERAL - : NUMERIC_DIGITS DOUBLE_SUFFIX? - ; - -FLOAT_LITERAL - : NUMERIC_DIGITS EXPONENT FLOAT_SUFFIX? - | NUMERIC_DIGITS FLOAT_SUFFIX - ; - -// a couple protected methods to assist in matching floating point numbers -fragment -EXPONENT - : ('e' | 'E') ('+'|'-')? ('0'..'9')+ - ; - - -fragment -FLOAT_SUFFIX - : 'f' - ; - -DATE_LITERAL - : LEFT_CURLY_BRACKET ('d') (' ' | '\t')+ '\'' DATE_STRING '\'' (' ' | '\t')* RIGHT_CURLY_BRACKET - ; - -TIME_LITERAL - : LEFT_CURLY_BRACKET ('t') (' ' | '\t')+ '\'' TIME_STRING '\'' (' ' | '\t')* RIGHT_CURLY_BRACKET - ; - -TIMESTAMP_LITERAL - : LEFT_CURLY_BRACKET ('ts') (' ' | '\t')+ '\'' DATE_STRING ' ' TIME_STRING '\'' (' ' | '\t')* RIGHT_CURLY_BRACKET - ; - -DATE_STRING - : '0'..'9' '0'..'9' '0'..'9' '0'..'9' '-' '0'..'9' '0'..'9' '-' '0'..'9' '0'..'9' - ; - -TIME_STRING - : '0'..'9' ('0'..'9')? ':' '0'..'9' '0'..'9' ':' '0'..'9' '0'..'9' '.' '0'..'9'* - ; - -fragment -DOUBLE_SUFFIX - : 'd' - ; - -EQUALS - : '=' - ; - -GREATER_THAN - : '>' - ; - -GREATER_THAN_EQUAL_TO - : '>=' - ; - -LESS_THAN - : '<' - ; - -LESS_THAN_EQUAL_TO - : '<=' - ; - -NOT_EQUAL_TO - : '<>' - | '!=' - ; - -MULTIPLY - : '*' - ; - -DIVIDE - : '/' - ; - -PLUS - : '+' - ; - -MINUS - : '-' - ; - - -POSITIONAL_PARAM - : '?' ('1'..'9') ('0'..'9')* - ; - -NAMED_PARAM - : ':' TEXTCHAR - ; - -// Added Jan 9, 2001 JED -// string literals -STRING_LITERAL_DOUBLE_QUOTED - : '"' (~ ('"'))* '"' - ; - -STRING_LITERAL_SINGLE_QUOTED - : '\'' (~ ('\'') | ('\'\''))* '\'' - ; - - - diff -Nru eclipselink-2.1.3/debian/build.properties eclipselink-2.5.1/debian/build.properties --- eclipselink-2.1.3/debian/build.properties 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/build.properties 2013-11-04 16:56:58.000000000 +0000 @@ -2,6 +2,6 @@ target=1.6 source=1.5 -dir.src=${basedir}/.. -dir.debian=${basedir} -dir.build=${basedir}/../target +dir.src=. +dir.debian=debian +dir.build=target/ diff -Nru eclipselink-2.1.3/debian/build.xml eclipselink-2.5.1/debian/build.xml --- eclipselink-2.1.3/debian/build.xml 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/build.xml 2013-11-04 16:56:58.000000000 +0000 @@ -1,69 +1,101 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru eclipselink-2.1.3/debian/changelog eclipselink-2.5.1/debian/changelog --- eclipselink-2.1.3/debian/changelog 2012-06-27 08:06:36.000000000 +0000 +++ eclipselink-2.5.1/debian/changelog 2013-11-04 16:56:58.000000000 +0000 @@ -1,3 +1,12 @@ +eclipselink (2.5.1-1) unstable; urgency=low + + * New upstream release. (Closes: #725375). + * Bump Standards-Version to 3.9.4: no changes needed. + * Fix lintian warning dm-upload-allowed-is-obsolete by removing + that field from d/control + + -- Andrew Ross Sun, 27 Oct 2013 22:07:13 +0000 + eclipselink (2.1.3-2) unstable; urgency=low [ Miguel Landaeta ] diff -Nru eclipselink-2.1.3/debian/classpath-debian eclipselink-2.5.1/debian/classpath-debian --- eclipselink-2.1.3/debian/classpath-debian 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/classpath-debian 2013-11-04 16:56:58.000000000 +0000 @@ -1,11 +1,15 @@ -usr/share/java/glassfish-javaee.jar -usr/share/java/geronimo-jpa-2.0-spec.jar +usr/share/java/eclipselink-jpa-2.1-spec.jar +usr/share/java/geronimo-jta_1.1_spec.jar usr/share/java/geronimo-validation.jar +usr/share/java/geronimo-javamail-1.4-spec.jar +usr/share/java/geronimo-jms_1.1_spec.jar +usr/share/java/geronimo-j2ee-connector-1.5-spec.jar usr/share/java/aspectjtools.jar usr/share/java/ant.jar usr/share/java/sdo-api.jar +usr/share/java/cdi-api.jar +usr/share/java/jsr311-api.jar +usr/share/java/servlet-api-3.0.jar usr/share/java/antlr3.jar usr/share/java/antlr3-runtime.jar -usr/share/java/asm.jar -usr/share/java/asm-attrs.jar -usr/share/java/asm2-commons.jar +usr/share/java/asm3-all.jar diff -Nru eclipselink-2.1.3/debian/control eclipselink-2.5.1/debian/control --- eclipselink-2.1.3/debian/control 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/control 2013-11-04 16:56:58.000000000 +0000 @@ -1,24 +1,37 @@ Source: eclipselink Maintainer: Debian Java Maintainers -Uploaders: Miguel Landaeta +Uploaders: Miguel Landaeta , + Andrew Ross Section: java Priority: optional Build-Depends: debhelper (>= 7.0.50), default-jdk, javahelper, ant, - glassfish-javaee, libgeronimo-jpa-2.0-spec-java, aspectj, libsdo-api-java, - libgeronimo-validation-1.0-spec-java, libasm-java, libasm2-java, - antlr3 (>= 3.2), default-jdk-doc -Standards-Version: 3.9.3 -DM-Upload-Allowed: yes + libjpa-2.1-spec-java, + libgeronimo-jta-1.1-spec-java, + libgeronimo-validation-1.0-spec-java, + libgeronimo-javamail-1.4-spec-java, + libgeronimo-jms-1.1-spec-java, + libgeronimo-j2ee-connector-1.5-spec-java, + libservlet3.0-java, + aspectj, libsdo-api-java, + libcdi-api-java, libjsr311-api-java, + libasm3-java, antlr3 (>= 3.2), default-jdk-doc +Standards-Version: 3.9.4 Homepage: http://www.eclipse.org/eclipselink/ -Vcs-Git: git://git.debian.org/git/pkg-java/eclipselink.git -Vcs-Browser: http://git.debian.org/?p=pkg-java/eclipselink.git +Vcs-Git: git://anonscm.debian.org/pkg-java/eclipselink.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/eclipselink.git Package: libeclipselink-java Architecture: all -Depends: glassfish-javaee, libgeronimo-jpa-2.0-spec-java, - libgeronimo-validation-1.0-spec-java, libasm-java, libasm2-java, - antlr3 (>= 3.2), ${misc:Depends} -Recommends: aspectj, libsdo-api-java +Depends: + libjpa-2.1-spec-java, + libgeronimo-jta-1.1-spec-java, + libgeronimo-validation-1.0-spec-java, + libgeronimo-javamail-1.4-spec-java, + libgeronimo-jms-1.1-spec-java, + libgeronimo-j2ee-connector-1.5-spec-java, + libcdi-api-java, libjsr311-api-java, + libasm3-java, antlr3 (>= 3.2), ${misc:Depends} +Recommends: aspectj, libsdo-api-java, libservlet3.0-java Suggests: libeclipselink-java-doc (= ${binary:Version}) Description: Eclipse Persistence Services Project Eclipse Persistence Services Project, more commonly known as EclipseLink, diff -Nru eclipselink-2.1.3/debian/excludesfiles/build eclipselink-2.5.1/debian/excludesfiles/build --- eclipselink-2.1.3/debian/excludesfiles/build 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/excludesfiles/build 2013-11-04 16:56:58.000000000 +0000 @@ -1,10 +1,18 @@ # Oracle -org/eclipse/persistence/internal/eis/adapters/aq/** -org/eclipse/persistence/eis/adapters/aq/** org/eclipse/persistence/internal/platform/database/oracle/** org/eclipse/persistence/platform/database/oracle/*.java org/eclipse/persistence/platform/database/oracle/converters/** org/eclipse/persistence/platform/xml/xdk/** +org/eclipse/persistence/platform/database/oracle/dcn/** +org/eclipse/persistence/platform/database/oracle/ucp/** +org/eclipse/persistence/tools/profiler/oracle/** # Embedded libraries org/eclipse/persistence/internal/libraries/** + +# Jaxb-XJC +org/eclipse/persistence/jaxb/dynamic/metadata/SchemaMetadata.java +org/eclipse/persistence/jaxb/javamodel/xjc/** + +# JPQL Tools +org/eclipse/persistence/jpa/jpql/tools/** diff -Nru eclipselink-2.1.3/debian/excludesfiles/javadoc eclipselink-2.5.1/debian/excludesfiles/javadoc --- eclipselink-2.1.3/debian/excludesfiles/javadoc 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/excludesfiles/javadoc 2013-11-04 16:56:58.000000000 +0000 @@ -1,7 +1,18 @@ # Oracle -org/eclipse/persistence/eis/adapters/aq/** -org/eclipse/persistence/platform/database/oracle/** +org/eclipse/persistence/internal/platform/database/oracle/** +org/eclipse/persistence/platform/database/oracle/*.java +org/eclipse/persistence/platform/database/oracle/converters/** org/eclipse/persistence/platform/xml/xdk/** +org/eclipse/persistence/platform/database/oracle/dcn/** +org/eclipse/persistence/platform/database/oracle/ucp/** +org/eclipse/persistence/tools/profiler/oracle/** + +# Embedded libraries +org/eclipse/persistence/internal/libraries/** + +# Jaxb-XJC +org/eclipse/persistence/jaxb/dynamic/metadata/SchemaMetadata.java +org/eclipse/persistence/jaxb/javamodel/xjc/** # internal code org/eclipse/persistence/internal/** diff -Nru eclipselink-2.1.3/debian/libeclipselink-java.classpath eclipselink-2.5.1/debian/libeclipselink-java.classpath --- eclipselink-2.1.3/debian/libeclipselink-java.classpath 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/libeclipselink-java.classpath 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -target/eclipselink.jar /usr/share/java/glassfish-javaee.jar /usr/share/java/geronimo-jpa-2.0-spec.jar /usr/share/java/geronimo-validation.jar /usr/share/java/aspectjtools.jar /usr/share/java/sdo-api.jar /usr/share/java/antlr3.jar /usr/share/java/asm.jar /usr/share/java/asm-attrs.jar /usr/share/java/asm2-commons.jar /usr/share/java/antlr3-runtime.jar diff -Nru eclipselink-2.1.3/debian/libeclipselink-java.doc-base eclipselink-2.5.1/debian/libeclipselink-java.doc-base --- eclipselink-2.1.3/debian/libeclipselink-java.doc-base 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/debian/libeclipselink-java.doc-base 2013-11-04 16:56:58.000000000 +0000 @@ -0,0 +1,8 @@ +Document: libeclipselink-java +Title: Eclipselink Documentation +Author: Oracle +Section: Programming + +Format: HTML +Index: /usr/share/doc/libeclipselink-java/readme.html +Files: /usr/share/doc/libeclipselink-java/*.html diff -Nru eclipselink-2.1.3/debian/libeclipselink-java.jlibs eclipselink-2.5.1/debian/libeclipselink-java.jlibs --- eclipselink-2.1.3/debian/libeclipselink-java.jlibs 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/libeclipselink-java.jlibs 2013-11-04 16:56:58.000000000 +0000 @@ -1 +1,3 @@ target/eclipselink.jar +target/org.eclipse.persistence.jpa.jpql.jar +target/org.eclipse.persistence.jpa.modelgen.processor.jar diff -Nru eclipselink-2.1.3/debian/libeclipselink-java.lintian-overrides eclipselink-2.5.1/debian/libeclipselink-java.lintian-overrides --- eclipselink-2.1.3/debian/libeclipselink-java.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/debian/libeclipselink-java.lintian-overrides 2013-11-04 16:56:58.000000000 +0000 @@ -0,0 +1,4 @@ +# The jar contains no code, but it does contain a service definition. Including it on the classpath +# therefore enables that service. +libeclipselink-java: codeless-jar + diff -Nru eclipselink-2.1.3/debian/libeclipselink-java.manifest eclipselink-2.5.1/debian/libeclipselink-java.manifest --- eclipselink-2.1.3/debian/libeclipselink-java.manifest 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/libeclipselink-java.manifest 2013-11-04 16:56:58.000000000 +0000 @@ -1,9 +1,19 @@ usr/share/java/eclipselink.jar: - Specification-Title: Eclipse Persistence Services Source - Specification-Vendor: Eclipse.org - EclipseLink Project - Specification-Version: 2.1.3 - Implementation-Title: org.eclipse.persistence + Release-Designation: EclipseLink 2.5.1 Implementation-Vendor: Eclipse.org - EclipseLink Project - Implementation-Version: 2.1.3.v20110304-r9073 - Release-Designation: EclipseLink 2.1.3 - Class-Path: /usr/share/java/glassfish-javaee.jar /usr/share/java/geronimo-jpa-2.0-spec.jar /usr/share/java/geronimo-validation.jar /usr/share/java/aspectjtools.jar /usr/share/java/sdo-api.jar /usr/share/java/antlr3.jar /usr/share/java/asm.jar /usr/share/java/asm-attrs.jar /usr/share/java/asm2-commons.jar /usr/share/java/antlr3-runtime.jar + Implementation-Title: org.eclipse.persistence + Implementation-Version: 2.5.1.v20130918-f2b9fc5 + Specification-Vendor: Eclipse.org - EclipseLink Project + Premain-Class: org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent + Specification-Title: Eclipse Persistence Services + Specification-Version: 2.5.1 + Main-Class: org.eclipse.persistence.Version + Class-Path: /usr/share/java/javax.persistence-api.jar /usr/share/java/geronimo-jta_1.1_spec.jar /usr/share/java/geronimo-validation.jar /usr/share/java/geronimo-javamail-1.4-spec.jar /usr/share/java/geronimo-jms-1.1-spec.jar /usr/share/java/geronimo-j2ee-connector-1.5-spec.jar /usr/share/java/aspectjtools.jar /usr/share/java/sdo-api.jar /usr/share/java/antlr3.jar /usr/share/java/antlr3-runtime.jar /usr/share/java/asm3-all.jar /usr/share/java/cdi-api.jar /usr/share/java/jsr311-api.jar /usr/share/java/servlet-api-3.0.jar + +usr/share/java/org.eclipse.persistence.jpa.jpql.jar: + Bundle-Name: EclipseLink Hermes Parser + Bundle-RequiredExecutionEnvironment: J2SE-1.5 + HK2-Bundle-Name: org.eclipse.persistence:org.eclipse.persistence.jpa.jpql + Bundle-Vendor: Eclipse.org - EclipseLink Project + Bundle-Version: 2.5.1.v20130918-f2b9fc5 + Bundle-SymbolicName: org.eclipse.persistence.jpa.jpql diff -Nru eclipselink-2.1.3/debian/patches/antlr32.diff eclipselink-2.5.1/debian/patches/antlr32.diff --- eclipselink-2.1.3/debian/patches/antlr32.diff 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/antlr32.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -Description: Fix build with ANTLR >= 3.2 -Author: Damien Raude-Morvan -Forwarded: no -Last-Update: 2010-07-06 - ---- a/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveJPQLLexer.java -+++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveJPQLLexer.java -@@ -29,8 +29,8 @@ - int currentChar = Character.toLowerCase(input.LA(1)); - int stringChar = Character.toLowerCase(s.charAt(i)); - if ( currentChar != stringChar ) { -- if ( backtracking>0 ) { -- failed = true; -+ if ( state.backtracking>0 ) { -+ state.failed = true; - return; - } - MismatchedTokenException mte = -@@ -40,7 +40,7 @@ - } - i++; - input.consume(); -- failed = false; -+ state.failed = false; - } - } - -@@ -48,8 +48,8 @@ - int currentChar = Character.toLowerCase(input.LA(1)); - int stringChar = Character.toLowerCase(c); - if ( currentChar != stringChar ) { -- if ( backtracking>0 ) { -- failed = true; -+ if ( state.backtracking>0 ) { -+ state.failed = true; - return; - } - MismatchedTokenException mte = -@@ -58,7 +58,7 @@ - throw mte; - } - input.consume(); -- failed = false; -+ state.failed = false; - } - - public void matchRange(int a, int b) -@@ -68,8 +68,8 @@ - int aChar = Character.toLowerCase(a); - int bChar = Character.toLowerCase(b); - if ( currentCharbChar ) { -- if ( backtracking>0 ) { -- failed = true; -+ if ( state.backtracking>0 ) { -+ state.failed = true; - return; - } - MismatchedRangeException mre = -@@ -78,6 +78,6 @@ - throw mre; - } - input.consume(); -- failed = false; -+ state.failed = false; - } - } ---- a/org/eclipse/persistence/internal/jpa/parsing/jpql/JPQLParser.java -+++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/JPQLParser.java -@@ -64,6 +64,10 @@ - super(stream); - } - -+ protected JPQLParser(TokenStream input, RecognizerSharedState state) { -+ super(input, state); -+ } -+ - /** - * INTERNAL - * Returns the ANTLR version currently used. diff -Nru eclipselink-2.1.3/debian/patches/charset.patch eclipselink-2.5.1/debian/patches/charset.patch --- eclipselink-2.1.3/debian/patches/charset.patch 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/charset.patch 2013-11-04 16:56:58.000000000 +0000 @@ -0,0 +1,13 @@ +Fix a line containing a bad character which causes unknown charset failures. + +--- a/org/eclipse/persistence/internal/jpa/transaction/JTATransactionWrapper.java ++++ b/org/eclipse/persistence/internal/jpa/transaction/JTATransactionWrapper.java +@@ -114,7 +114,7 @@ + // In general, a persistence context will be synchronized to the database as described below. However, a + // persistence context of type SynchronizationType.UNSYNCHRONIZED or an application-managed + // persistence context that has been created outside the scope of the current transaction will only be +-// synchronized to the database if it has been joined to the current transaction by the application’s use of ++// synchronized to the database if it has been joined to the current transaction by the applications use of + // the EntityManager joinTransaction method. + // .. + // If there is no transaction active diff -Nru eclipselink-2.1.3/debian/patches/disable_antlr3_embedded_copy.diff eclipselink-2.5.1/debian/patches/disable_antlr3_embedded_copy.diff --- eclipselink-2.1.3/debian/patches/disable_antlr3_embedded_copy.diff 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/disable_antlr3_embedded_copy.diff 2013-11-04 16:56:58.000000000 +0000 @@ -2,34 +2,70 @@ Author: Miguel Landaeta Bug-Debian: http://bugs.debian.org/581861 Forwarded: no -Last-Update: 2010-07-07 +Last-Update: 2013-09-27 ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveJPQLLexer.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveJPQLLexer.java +--- a/org/eclipse/persistence/internal/oxm/record/json/JSONLexer.java ++++ b/org/eclipse/persistence/internal/oxm/record/json/JSONLexer.java @@ -12,7 +12,7 @@ - ******************************************************************************/ - package org.eclipse.persistence.internal.jpa.parsing.jpql; + ******************************************************************************/ + package org.eclipse.persistence.internal.oxm.record.json; -import org.eclipse.persistence.internal.libraries.antlr.runtime.*; +import org.antlr.runtime.*; - import org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLLexer; - /* ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierException.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierException.java + class JSONLexer extends Lexer { + public static final int EOF=-1; +--- a/org/eclipse/persistence/internal/oxm/record/json/JSONReader.java ++++ b/org/eclipse/persistence/internal/oxm/record/json/JSONReader.java +@@ -27,14 +27,14 @@ + import javax.xml.namespace.QName; + + import org.eclipse.persistence.exceptions.XMLMarshalException; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.ANTLRInputStream; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.ANTLRReaderStream; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.CharStream; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.RecognitionException; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.TokenRewriteStream; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.TokenStream; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.tree.CommonTree; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.tree.Tree; ++import org.antlr.runtime.ANTLRInputStream; ++import org.antlr.runtime.ANTLRReaderStream; ++import org.antlr.runtime.CharStream; ++import org.antlr.runtime.RecognitionException; ++import org.antlr.runtime.TokenRewriteStream; ++import org.antlr.runtime.TokenStream; ++import org.antlr.runtime.tree.CommonTree; ++import org.antlr.runtime.tree.Tree; + import org.eclipse.persistence.internal.oxm.CollectionGroupingElementNodeValue; + import org.eclipse.persistence.internal.oxm.Constants; + import org.eclipse.persistence.internal.oxm.ContainerValue; +--- a/org/eclipse/persistence/internal/oxm/record/json/JSONParser.java ++++ b/org/eclipse/persistence/internal/oxm/record/json/JSONParser.java @@ -12,8 +12,8 @@ + ******************************************************************************/ + package org.eclipse.persistence.internal.oxm.record.json; + +-import org.eclipse.persistence.internal.libraries.antlr.runtime.*; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.tree.*; ++import org.antlr.runtime.*; ++import org.antlr.runtime.tree.*; + + class JSONParser extends Parser { + public static final String[] tokenNames = new String[] { +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierStartException.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierStartException.java +@@ -12,7 +12,7 @@ ******************************************************************************/ package org.eclipse.persistence.internal.jpa.parsing.jpql; -import org.eclipse.persistence.internal.libraries.antlr.runtime.RecognitionException; --import org.eclipse.persistence.internal.libraries.antlr.runtime.Token; +import org.antlr.runtime.RecognitionException; -+import org.antlr.runtime.Token; - /** + /* * This is a custom Exception class that is thrown from ANTLR JPQL code when we ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveANTLRStringStream.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveANTLRStringStream.java +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveANTLRStringStream.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveANTLRStringStream.java @@ -12,7 +12,7 @@ ******************************************************************************/ package org.eclipse.persistence.internal.jpa.parsing.jpql; @@ -39,20 +75,20 @@ /** * This Stream is used when tokenizing JPQL queries ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierStartException.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierStartException.java +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveJPQLLexer.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/CaseInsensitiveJPQLLexer.java @@ -12,7 +12,7 @@ ******************************************************************************/ package org.eclipse.persistence.internal.jpa.parsing.jpql; --import org.eclipse.persistence.internal.libraries.antlr.runtime.RecognitionException; -+import org.antlr.runtime.RecognitionException; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.*; ++import org.antlr.runtime.*; + import org.eclipse.persistence.internal.jpa.parsing.jpql.antlr.JPQLLexer; /* - * This is a custom Exception class that is thrown from ANTLR JPQL code when we ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/JPQLParser.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/JPQLParser.java -@@ -15,21 +15,21 @@ package org.eclipse.persistence.internal +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/JPQLParser.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/JPQLParser.java +@@ -15,21 +15,21 @@ import java.util.List; import java.util.ArrayList; @@ -88,7 +124,7 @@ //toplink imports import org.eclipse.persistence.exceptions.JPQLException; -@@ -41,7 +41,7 @@ import org.eclipse.persistence.internal. +@@ -41,7 +41,7 @@ /** * EJBQLParser is the superclass of the ANTLR generated parser. */ @@ -97,44 +133,19 @@ /** List of errors. */ private List errors = new ArrayList(); ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLLexer.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLLexer.java -@@ -5,7 +5,7 @@ - import org.eclipse.persistence.internal.jpa.parsing.jpql.InvalidIdentifierStartException; - - --import org.eclipse.persistence.internal.libraries.antlr.runtime.*; -+import org.antlr.runtime.*; - - public class JPQLLexer extends Lexer { - public static final int EXPONENT=116; -@@ -5144,4 +5145,4 @@ public class JPQLLexer extends Lexer { - } - - --} -\ No newline at end of file -+} ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParser.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParser.java +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParser.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParser.java @@ -9,7 +9,7 @@ import org.eclipse.persistence.internal.jpa.parsing.jpql.InvalidIdentifierException; -import org.eclipse.persistence.internal.libraries.antlr.runtime.*; +import org.antlr.runtime.*; + import java.util.Stack; - import java.util.HashMap; /******************************************************************************* -@@ -22082,4 +22082,4 @@ public class JPQLParser extends org.ecli - public static final BitSet FOLLOW_LEFT_ROUND_BRACKET_in_synpred13610 = new BitSet(new long[]{0x80ADD221601FC410L,0x000003FF9809338DL}); - public static final BitSet FOLLOW_conditionalExpression_in_synpred13612 = new BitSet(new long[]{0x0000000000000002L}); - --} -\ No newline at end of file -+} ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParserBuilder.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParserBuilder.java +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParserBuilder.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLParserBuilder.java @@ -12,8 +12,8 @@ ******************************************************************************/ package org.eclipse.persistence.internal.jpa.parsing.jpql.antlr; @@ -146,3 +157,27 @@ //eclipselink imports import org.eclipse.persistence.internal.jpa.parsing.jpql.CaseInsensitiveJPQLLexer; +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLLexer.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/JPQLLexer.java +@@ -5,7 +5,7 @@ + import org.eclipse.persistence.internal.jpa.parsing.jpql.InvalidIdentifierStartException; + + +-import org.eclipse.persistence.internal.libraries.antlr.runtime.*; ++import org.antlr.runtime.*; + + public class JPQLLexer extends Lexer { + public static final int EXPONENT=116; +--- a/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierException.java ++++ b/org/eclipse/persistence/internal/jpa/parsing/jpql/InvalidIdentifierException.java +@@ -12,8 +12,8 @@ + ******************************************************************************/ + package org.eclipse.persistence.internal.jpa.parsing.jpql; + +-import org.eclipse.persistence.internal.libraries.antlr.runtime.RecognitionException; +-import org.eclipse.persistence.internal.libraries.antlr.runtime.Token; ++import org.antlr.runtime.RecognitionException; ++import org.antlr.runtime.Token; + + /** + * This is a custom Exception class that is thrown from ANTLR JPQL code when we diff -Nru eclipselink-2.1.3/debian/patches/disable_asm_embedded_copy.diff eclipselink-2.5.1/debian/patches/disable_asm_embedded_copy.diff --- eclipselink-2.1.3/debian/patches/disable_asm_embedded_copy.diff 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/disable_asm_embedded_copy.diff 2013-11-04 16:56:58.000000000 +0000 @@ -1,110 +1,150 @@ Description: Remove reference to ASM 1.5 embedded copy Author: Miguel Landaeta Forwarded: no -Last-Update: 2010-07-07 +Last-Update: 2013-09-27 ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataClass.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataClass.java -@@ -30,7 +30,7 @@ import java.util.Map; - import java.util.Set; +--- a/org/eclipse/persistence/internal/xr/XRClassWriter.java ++++ b/org/eclipse/persistence/internal/xr/XRClassWriter.java +@@ -17,21 +17,21 @@ + //EclipseLink imports + import org.eclipse.persistence.dynamic.DynamicClassLoader; + import org.eclipse.persistence.dynamic.DynamicClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; ++import org.objectweb.asm.ClassWriter; ++import org.objectweb.asm.MethodVisitor; + import static org.eclipse.persistence.internal.dynamic.DynamicPropertiesManager.PROPERTIES_MANAGER_FIELD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PUBLIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_STATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_SUPER; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ALOAD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ARETURN; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.DUP; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.GETSTATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.INVOKESPECIAL; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.NEW; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.PUTSTATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.RETURN; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.V1_5; ++import static org.objectweb.asm.Opcodes.ACC_PUBLIC; ++import static org.objectweb.asm.Opcodes.ACC_STATIC; ++import static org.objectweb.asm.Opcodes.ACC_SUPER; ++import static org.objectweb.asm.Opcodes.ALOAD; ++import static org.objectweb.asm.Opcodes.ARETURN; ++import static org.objectweb.asm.Opcodes.DUP; ++import static org.objectweb.asm.Opcodes.GETSTATIC; ++import static org.objectweb.asm.Opcodes.INVOKESPECIAL; ++import static org.objectweb.asm.Opcodes.NEW; ++import static org.objectweb.asm.Opcodes.PUTSTATIC; ++import static org.objectweb.asm.Opcodes.RETURN; ++import static org.objectweb.asm.Opcodes.V1_5; + import static org.eclipse.persistence.internal.xr.XRDynamicClassLoader.COLLECTION_WRAPPER_SUFFIX; - import org.eclipse.persistence.internal.helper.Helper; --import org.eclipse.persistence.internal.libraries.asm.Constants; -+import org.objectweb.asm.Constants; + /** +--- a/org/eclipse/persistence/internal/dbws/SOAPResponseClassLoader.java ++++ b/org/eclipse/persistence/internal/dbws/SOAPResponseClassLoader.java +@@ -18,14 +18,14 @@ + // Java extension imports + + // EclipseLink imports +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PUBLIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_SUPER; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ALOAD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.INVOKESPECIAL; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.RETURN; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.V1_5; ++import org.objectweb.asm.ClassWriter; ++import org.objectweb.asm.MethodVisitor; ++import static org.objectweb.asm.Opcodes.ACC_PUBLIC; ++import static org.objectweb.asm.Opcodes.ACC_SUPER; ++import static org.objectweb.asm.Opcodes.ALOAD; ++import static org.objectweb.asm.Opcodes.INVOKESPECIAL; ++import static org.objectweb.asm.Opcodes.RETURN; ++import static org.objectweb.asm.Opcodes.V1_5; /** - * INTERNAL: ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory.java -@@ -23,15 +23,15 @@ import java.util.Map; - import org.eclipse.persistence.internal.helper.Helper; - import org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor; - import org.eclipse.persistence.internal.jpa.metadata.MetadataLogger; --import org.eclipse.persistence.internal.libraries.asm.Attribute; + *

INTERNAL: A subclass of {@link ClassLoader} that exposes a build method to the hidden +--- a/org/eclipse/persistence/internal/jpa/weaving/RestAdapterClassWriter.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/RestAdapterClassWriter.java +@@ -14,9 +14,9 @@ + + import org.eclipse.persistence.dynamic.DynamicClassLoader; + import org.eclipse.persistence.dynamic.EclipseLinkClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; ++import org.objectweb.asm.ClassWriter; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Opcodes; + + public class RestAdapterClassWriter implements EclipseLinkClassWriter, Opcodes { + +--- a/org/eclipse/persistence/internal/jpa/weaving/ComputeClassWriter.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/ComputeClassWriter.java +@@ -33,9 +33,9 @@ + import java.io.IOException; + import java.io.InputStream; + -import org.eclipse.persistence.internal.libraries.asm.ClassReader; --import org.eclipse.persistence.internal.libraries.asm.ClassVisitor; --import org.eclipse.persistence.internal.libraries.asm.CodeVisitor; --import org.eclipse.persistence.internal.libraries.asm.Type; --import org.eclipse.persistence.internal.libraries.asm.attrs.Annotation; --import org.eclipse.persistence.internal.libraries.asm.attrs.RuntimeVisibleAnnotations; --import org.eclipse.persistence.internal.libraries.asm.attrs.RuntimeVisibleParameterAnnotations; --import org.eclipse.persistence.internal.libraries.asm.attrs.SignatureAttribute; -+import org.objectweb.asm.Attribute; +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; +import org.objectweb.asm.ClassReader; -+import org.objectweb.asm.ClassVisitor; -+import org.objectweb.asm.CodeVisitor; ++import org.objectweb.asm.ClassWriter; ++import org.objectweb.asm.Opcodes; + + /** + * A ClassWriter that computes the common super class of two classes without +--- a/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java +@@ -20,13 +20,13 @@ + import java.util.Iterator; + + import org.eclipse.persistence.internal.helper.Helper; +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.FieldVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Label; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; +-import org.eclipse.persistence.internal.libraries.asm.Type; +-import org.eclipse.persistence.internal.libraries.asm.commons.SerialVersionUIDAdder; ++import org.objectweb.asm.ClassWriter; ++import org.objectweb.asm.FieldVisitor; ++import org.objectweb.asm.Label; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Opcodes; +import org.objectweb.asm.Type; -+import org.objectweb.asm.attrs.Annotation; -+import org.objectweb.asm.attrs.RuntimeVisibleAnnotations; -+import org.objectweb.asm.attrs.RuntimeVisibleParameterAnnotations; -+import org.objectweb.asm.attrs.SignatureAttribute; ++import org.objectweb.asm.commons.SerialVersionUIDAdder; /** - * INTERNAL: ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java -@@ -17,10 +17,10 @@ import java.util.*; + * INTERNAL: Weaves classes to allow them to support EclipseLink indirection. +--- a/org/eclipse/persistence/internal/jpa/weaving/PersistenceWeaver.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/PersistenceWeaver.java +@@ -21,8 +21,8 @@ + import org.eclipse.persistence.config.SystemProperties; import org.eclipse.persistence.internal.helper.Helper; - import org.eclipse.persistence.internal.jpa.EntityManagerImpl; +-import org.eclipse.persistence.internal.libraries.asm.ClassReader; +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; ++import org.objectweb.asm.ClassReader; ++import org.objectweb.asm.ClassWriter; + import org.eclipse.persistence.internal.sessions.AbstractSession; + import org.eclipse.persistence.logging.SessionLog; + import org.eclipse.persistence.sessions.Session; +--- a/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java +@@ -14,7 +14,7 @@ + + //ASM imports + import org.eclipse.persistence.internal.descriptors.VirtualAttributeMethodInfo; -import org.eclipse.persistence.internal.libraries.asm.*; --import org.eclipse.persistence.internal.libraries.asm.commons.*; --import org.eclipse.persistence.internal.libraries.asm.attrs.RuntimeVisibleAnnotations; --import org.eclipse.persistence.internal.libraries.asm.attrs.Annotation; +import org.objectweb.asm.*; -+import org.objectweb.asm.commons.*; -+import org.objectweb.asm.attrs.RuntimeVisibleAnnotations; -+import org.objectweb.asm.attrs.Annotation; /** - * INTERNAL: -@@ -82,7 +82,7 @@ public class ClassWeaver extends ClassAd - /** Stores information on the class gathered from the temp class loader and descriptor. */ - protected ClassDetails classDetails; - /** Used to generate the serialization serial UUID based on the original class. */ -- protected SerialVersionUIDAdder uuidGenerator; -+ protected EclipseLinkSerialVersionUIDAdder uuidGenerator; - - // Keep track of what was weaved. - protected boolean alreadyWeaved = false; -@@ -182,7 +182,7 @@ public class ClassWeaver extends ClassAd - public ClassWeaver(ClassWriter classWriter, ClassDetails classDetails) { - super(classWriter); - this.classDetails = classDetails; -- this.uuidGenerator = new SerialVersionUIDAdder(classWriter); -+ this.uuidGenerator = new EclipseLinkSerialVersionUIDAdder(classWriter); - } - - /** -@@ -1349,3 +1349,26 @@ public class ClassWeaver extends ClassAd - super.visitEnd(); - } - } -+ -+/** -+ * INTERNAL: -+ * Just a hack to access some protected methods in org.objectweb.asm.SerialVersionUIDAdder class. -+ * This is necessary because in the embedded copy of ASM library those method -+ * were declared public but in the proper library those are declared as -+ * protected. -+ * @see org.objectweb.asm.SerialVersionUIDAdder -+ */ -+class EclipseLinkSerialVersionUIDAdder extends SerialVersionUIDAdder { -+ -+ public EclipseLinkSerialVersionUIDAdder(ClassVisitor cv) { -+ super(cv); -+ } -+ -+ public boolean hasSVUID() { -+ return hasSVUID(); -+ } -+ -+ public long computeSVUID() { -+ return computeSVUID(); -+ } -+} ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/weaving/AttributeDetails.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/weaving/AttributeDetails.java + * Processes all the methods of a class to weave in persistence code such as, +--- a/org/eclipse/persistence/internal/jpa/weaving/AttributeDetails.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/AttributeDetails.java @@ -12,7 +12,7 @@ ******************************************************************************/ package org.eclipse.persistence.internal.jpa.weaving; @@ -114,252 +154,217 @@ import org.eclipse.persistence.mappings.DatabaseMapping; ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java -@@ -13,7 +13,7 @@ - package org.eclipse.persistence.internal.jpa.weaving; - - //ASM imports --import org.eclipse.persistence.internal.libraries.asm.*; -+import org.objectweb.asm.*; - - /** - * Processes all the methods of a class to weave in persistence code such as, ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/weaving/PersistenceWeaver.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/weaving/PersistenceWeaver.java -@@ -23,8 +23,8 @@ import javax.persistence.spi.ClassTransf - - // ASM imports - import org.eclipse.persistence.config.SystemProperties; --import org.eclipse.persistence.internal.libraries.asm.*; --import org.eclipse.persistence.internal.libraries.asm.attrs.Attributes; -+import org.objectweb.asm.*; -+import org.objectweb.asm.attrs.Attributes; - - // TopLink imports +--- a/org/eclipse/persistence/internal/jpa/weaving/TransformerFactory.java ++++ b/org/eclipse/persistence/internal/jpa/weaving/TransformerFactory.java +@@ -31,7 +31,7 @@ + import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass; + import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataField; + import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataMethod; +-import org.eclipse.persistence.internal.libraries.asm.Type; ++import org.objectweb.asm.Type; import org.eclipse.persistence.internal.sessions.AbstractSession; ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/jpa/weaving/TransformerFactory.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/jpa/weaving/TransformerFactory.java -@@ -14,7 +14,7 @@ package org.eclipse.persistence.internal + import org.eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking; + import org.eclipse.persistence.logging.SessionLog; +--- a/org/eclipse/persistence/internal/jpa/metadata/MetadataDynamicClassWriter.java ++++ b/org/eclipse/persistence/internal/jpa/metadata/MetadataDynamicClassWriter.java +@@ -13,20 +13,20 @@ + ******************************************************************************/ + package org.eclipse.persistence.internal.jpa.metadata; + +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PUBLIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ALOAD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ARETURN; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.CHECKCAST; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.INVOKESPECIAL; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.POP; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.RETURN; ++import static org.objectweb.asm.Opcodes.ACC_PUBLIC; ++import static org.objectweb.asm.Opcodes.ALOAD; ++import static org.objectweb.asm.Opcodes.ARETURN; ++import static org.objectweb.asm.Opcodes.CHECKCAST; ++import static org.objectweb.asm.Opcodes.INVOKESPECIAL; ++import static org.objectweb.asm.Opcodes.POP; ++import static org.objectweb.asm.Opcodes.RETURN; + + import org.eclipse.persistence.dynamic.DynamicClassWriter; + import org.eclipse.persistence.internal.helper.ClassConstants; + import org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor; +-import org.eclipse.persistence.internal.libraries.asm.ClassWriter; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Type; ++import org.objectweb.asm.ClassWriter; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Type; + + /** + * Custom {@link DynamicClassWriter} adding getter methods for virtual +--- a/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataClass.java ++++ b/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataClass.java +@@ -34,7 +34,7 @@ + import java.util.Set; - import java.util.*; + import org.eclipse.persistence.internal.helper.Helper; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; ++import org.objectweb.asm.Opcodes; + /** + * INTERNAL: +--- a/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory.java ++++ b/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory.java +@@ -28,14 +28,14 @@ + import org.eclipse.persistence.internal.helper.Helper; + import org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor; + import org.eclipse.persistence.internal.jpa.metadata.MetadataLogger; +-import org.eclipse.persistence.internal.libraries.asm.AnnotationVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Attribute; +-import org.eclipse.persistence.internal.libraries.asm.ClassReader; +-import org.eclipse.persistence.internal.libraries.asm.ClassVisitor; +-import org.eclipse.persistence.internal.libraries.asm.FieldVisitor; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; -import org.eclipse.persistence.internal.libraries.asm.Type; +-import org.eclipse.persistence.internal.libraries.asm.commons.EmptyVisitor; ++import org.objectweb.asm.AnnotationVisitor; ++import org.objectweb.asm.Attribute; ++import org.objectweb.asm.ClassReader; ++import org.objectweb.asm.ClassVisitor; ++import org.objectweb.asm.FieldVisitor; ++import org.objectweb.asm.MethodVisitor; +import org.objectweb.asm.Type; - - import org.eclipse.persistence.indirection.ValueHolderInterface; - import org.eclipse.persistence.logging.SessionLog; ---- eclipselink-2.1.0.orig/org/eclipse/persistence/internal/dbws/SOAPResponseClassLoader.java -+++ eclipselink-2.1.0/org/eclipse/persistence/internal/dbws/SOAPResponseClassLoader.java -@@ -18,14 +18,14 @@ package org.eclipse.persistence.internal - // Java extension imports - - // EclipseLink imports --import org.eclipse.persistence.internal.libraries.asm.ClassWriter; --import org.eclipse.persistence.internal.libraries.asm.CodeVisitor; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_PUBLIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_SUPER; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ALOAD; --import static org.eclipse.persistence.internal.libraries.asm.Constants.INVOKESPECIAL; --import static org.eclipse.persistence.internal.libraries.asm.Constants.RETURN; --import static org.eclipse.persistence.internal.libraries.asm.Constants.V1_5; -+import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.CodeVisitor; -+import static org.objectweb.asm.Constants.ACC_PUBLIC; -+import static org.objectweb.asm.Constants.ACC_SUPER; -+import static org.objectweb.asm.Constants.ALOAD; -+import static org.objectweb.asm.Constants.INVOKESPECIAL; -+import static org.objectweb.asm.Constants.RETURN; -+import static org.objectweb.asm.Constants.V1_5; ++import org.objectweb.asm.commons.EmptyVisitor; /** - *

INTERNAL: A subclass of {@link ClassLoader} that exposes a build method to the hidden ---- eclipselink-2.1.3.orig/org/eclipse/persistence/internal/xr/XRClassWriter.java -+++ eclipselink-2.1.3/org/eclipse/persistence/internal/xr/XRClassWriter.java -@@ -17,21 +17,21 @@ package org.eclipse.persistence.internal - //EclipseLink imports - import org.eclipse.persistence.dynamic.DynamicClassLoader; - import org.eclipse.persistence.dynamic.DynamicClassWriter; + * INTERNAL: A metadata factory that uses ASM technology and no reflection +--- a/org/eclipse/persistence/jaxb/compiler/MappingsGenerator.java ++++ b/org/eclipse/persistence/jaxb/compiler/MappingsGenerator.java +@@ -72,10 +72,10 @@ + import org.eclipse.persistence.internal.jaxb.many.ManyValue; + import org.eclipse.persistence.internal.jaxb.many.MapValue; + import org.eclipse.persistence.internal.jaxb.many.MapValueAttributeAccessor; -import org.eclipse.persistence.internal.libraries.asm.ClassWriter; --import org.eclipse.persistence.internal.libraries.asm.CodeVisitor; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; +-import org.eclipse.persistence.internal.libraries.asm.Type; +import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.CodeVisitor; - import org.eclipse.persistence.internal.xr.XRFieldInfo; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_PUBLIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_STATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_SUPER; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ALOAD; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ARETURN; --import static org.eclipse.persistence.internal.libraries.asm.Constants.DUP; --import static org.eclipse.persistence.internal.libraries.asm.Constants.GETSTATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.INVOKESPECIAL; --import static org.eclipse.persistence.internal.libraries.asm.Constants.NEW; --import static org.eclipse.persistence.internal.libraries.asm.Constants.PUTSTATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.RETURN; --import static org.eclipse.persistence.internal.libraries.asm.Constants.V1_5; -+import static org.objectweb.asm.Constants.ACC_PUBLIC; -+import static org.objectweb.asm.Constants.ACC_STATIC; -+import static org.objectweb.asm.Constants.ACC_SUPER; -+import static org.objectweb.asm.Constants.ALOAD; -+import static org.objectweb.asm.Constants.ARETURN; -+import static org.objectweb.asm.Constants.DUP; -+import static org.objectweb.asm.Constants.GETSTATIC; -+import static org.objectweb.asm.Constants.INVOKESPECIAL; -+import static org.objectweb.asm.Constants.NEW; -+import static org.objectweb.asm.Constants.PUTSTATIC; -+import static org.objectweb.asm.Constants.RETURN; -+import static org.objectweb.asm.Constants.V1_5; - import static org.eclipse.persistence.internal.xr.XRDynamicClassLoader.COLLECTION_WRAPPER_SUFFIX; - import static org.eclipse.persistence.internal.xr.XRDynamicEntity.XR_FIELD_INFO_STATIC; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Opcodes; ++import org.objectweb.asm.Type; + import org.eclipse.persistence.internal.oxm.Constants; -@@ -124,4 +124,4 @@ public class XRClassWriter extends Dynam - cw.visitEnd(); - return cw.toByteArray(); - } --} -\ No newline at end of file -+} ---- eclipselink-2.1.0.orig/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java -+++ eclipselink-2.1.0/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java -@@ -71,15 +71,15 @@ import org.eclipse.persistence.internal. - import org.eclipse.persistence.internal.helper.ClassConstants; - import org.eclipse.persistence.internal.helper.ConversionManager; - import org.eclipse.persistence.internal.jaxb.JaxbClassLoader; + import org.eclipse.persistence.internal.oxm.NamespaceResolver; +--- a/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java ++++ b/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java +@@ -81,13 +81,13 @@ + import org.eclipse.persistence.internal.jaxb.many.ManyValue; + import org.eclipse.persistence.internal.jaxb.many.MultiDimensionalArrayValue; + import org.eclipse.persistence.internal.jaxb.many.MultiDimensionalCollectionValue; +-import org.eclipse.persistence.internal.libraries.asm.AnnotationVisitor; -import org.eclipse.persistence.internal.libraries.asm.ClassWriter; --import org.eclipse.persistence.internal.libraries.asm.CodeVisitor; --import org.eclipse.persistence.internal.libraries.asm.Constants; +-import org.eclipse.persistence.internal.libraries.asm.FieldVisitor; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; -import org.eclipse.persistence.internal.libraries.asm.Label; -import org.eclipse.persistence.internal.libraries.asm.Type; --import org.eclipse.persistence.internal.libraries.asm.attrs.Annotation; --import org.eclipse.persistence.internal.libraries.asm.attrs.LocalVariableTypeTableAttribute; --import org.eclipse.persistence.internal.libraries.asm.attrs.RuntimeVisibleAnnotations; --import org.eclipse.persistence.internal.libraries.asm.attrs.SignatureAttribute; ++import org.objectweb.asm.AnnotationVisitor; +import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.CodeVisitor; -+import org.objectweb.asm.Constants; ++import org.objectweb.asm.FieldVisitor; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Opcodes; +import org.objectweb.asm.Label; +import org.objectweb.asm.Type; -+import org.objectweb.asm.attrs.Annotation; -+import org.objectweb.asm.attrs.LocalVariableTypeTableAttribute; -+import org.objectweb.asm.attrs.RuntimeVisibleAnnotations; -+import org.objectweb.asm.attrs.SignatureAttribute; - import org.eclipse.persistence.internal.oxm.XMLConversionManager; - import org.eclipse.persistence.internal.security.PrivilegedAccessHelper; - import org.eclipse.persistence.jaxb.TypeMappingInfo; ---- eclipselink-2.1.0.orig/org/eclipse/persistence/jaxb/compiler/MappingsGenerator.java -+++ eclipselink-2.1.0/org/eclipse/persistence/jaxb/compiler/MappingsGenerator.java -@@ -72,8 +72,8 @@ import org.eclipse.persistence.internal. - import org.eclipse.persistence.internal.jaxb.many.MapValueAttributeAccessor; - import org.eclipse.persistence.sessions.Project; - --import org.eclipse.persistence.internal.libraries.asm.*; --import org.eclipse.persistence.internal.libraries.asm.attrs.SignatureAttribute; -+import org.objectweb.asm.*; -+import org.objectweb.asm.attrs.SignatureAttribute; + import org.eclipse.persistence.internal.oxm.Constants; + import org.eclipse.persistence.internal.oxm.Namespace; import org.eclipse.persistence.internal.oxm.XMLConversionManager; - import org.eclipse.persistence.internal.queries.ContainerPolicy; - import org.eclipse.persistence.internal.security.PrivilegedAccessHelper; -@@ -2386,7 +2386,7 @@ public class MappingsGenerator { - } - - public Class generateWrapperClass(String className, String attributeType, boolean isList, QName theQName) { -- org.eclipse.persistence.internal.libraries.asm.ClassWriter cw = new org.eclipse.persistence.internal.libraries.asm.ClassWriter(false); -+ org.objectweb.asm.ClassWriter cw = new org.objectweb.asm.ClassWriter(false); - - CodeVisitor cv; - cw.visit(Constants.V1_5, Constants.ACC_PUBLIC, className.replace(".", "/"), org.eclipse.persistence.internal.libraries.asm.Type.getType(WrappedValue.class).getInternalName(), new String[0], null); ---- eclipselink-2.1.0.orig/org/eclipse/persistence/sdo/helper/DynamicClassWriter.java -+++ eclipselink-2.1.0/org/eclipse/persistence/sdo/helper/DynamicClassWriter.java -@@ -25,10 +25,10 @@ import org.eclipse.persistence.sdo.SDODa +--- a/org/eclipse/persistence/sdo/helper/DynamicClassWriter.java ++++ b/org/eclipse/persistence/sdo/helper/DynamicClassWriter.java +@@ -25,10 +25,10 @@ import org.eclipse.persistence.sdo.SDOProperty; import org.eclipse.persistence.sdo.SDOType; import org.eclipse.persistence.sdo.helper.extension.SDOUtil; -import org.eclipse.persistence.internal.libraries.asm.ClassWriter; --import org.eclipse.persistence.internal.libraries.asm.CodeVisitor; --import org.eclipse.persistence.internal.libraries.asm.Constants; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; +-import org.eclipse.persistence.internal.libraries.asm.Opcodes; -import org.eclipse.persistence.internal.libraries.asm.Type; +import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.CodeVisitor; -+import org.objectweb.asm.Constants; ++import org.objectweb.asm.MethodVisitor; ++import org.objectweb.asm.Opcodes; +import org.objectweb.asm.Type; import org.eclipse.persistence.internal.security.PrivilegedAccessHelper; import commonj.sdo.helper.HelperContext; ---- eclipselink-2.1.0.orig/org/eclipse/persistence/dynamic/DynamicClassWriter.java -+++ eclipselink-2.1.0/org/eclipse/persistence/dynamic/DynamicClassWriter.java -@@ -27,41 +27,41 @@ import org.eclipse.persistence.dynamic.D - import org.eclipse.persistence.exceptions.DynamicException; +--- a/org/eclipse/persistence/dynamic/DynamicClassWriter.java ++++ b/org/eclipse/persistence/dynamic/DynamicClassWriter.java +@@ -25,41 +25,41 @@ import org.eclipse.persistence.internal.dynamic.DynamicEntityImpl; + import org.eclipse.persistence.internal.dynamic.DynamicPropertiesManager; import org.eclipse.persistence.internal.helper.Helper; -import org.eclipse.persistence.internal.libraries.asm.ClassWriter; --import org.eclipse.persistence.internal.libraries.asm.CodeVisitor; +-import org.eclipse.persistence.internal.libraries.asm.MethodVisitor; -import org.eclipse.persistence.internal.libraries.asm.Type; --import org.eclipse.persistence.internal.libraries.asm.attrs.SignatureAttribute; +import org.objectweb.asm.ClassWriter; -+import org.objectweb.asm.CodeVisitor; ++import org.objectweb.asm.MethodVisitor; +import org.objectweb.asm.Type; -+import org.objectweb.asm.attrs.SignatureAttribute; --import static org.eclipse.persistence.internal.libraries.asm.Constants.AASTORE; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_ENUM; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_FINAL; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_PRIVATE; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_PROTECTED; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_PUBLIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_STATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_SUPER; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ACC_SYNTHETIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ALOAD; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ANEWARRAY; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ARETURN; --import static org.eclipse.persistence.internal.libraries.asm.Constants.BIPUSH; --import static org.eclipse.persistence.internal.libraries.asm.Constants.CHECKCAST; --import static org.eclipse.persistence.internal.libraries.asm.Constants.DUP; --import static org.eclipse.persistence.internal.libraries.asm.Constants.GETSTATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ICONST_0; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ICONST_1; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ICONST_2; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ICONST_3; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ICONST_4; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ICONST_5; --import static org.eclipse.persistence.internal.libraries.asm.Constants.ILOAD; --import static org.eclipse.persistence.internal.libraries.asm.Constants.INVOKESPECIAL; --import static org.eclipse.persistence.internal.libraries.asm.Constants.INVOKESTATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.INVOKEVIRTUAL; --import static org.eclipse.persistence.internal.libraries.asm.Constants.NEW; --import static org.eclipse.persistence.internal.libraries.asm.Constants.PUTSTATIC; --import static org.eclipse.persistence.internal.libraries.asm.Constants.RETURN; --import static org.eclipse.persistence.internal.libraries.asm.Constants.V1_5; -+import static org.objectweb.asm.Constants.AASTORE; -+import static org.objectweb.asm.Constants.ACC_ENUM; -+import static org.objectweb.asm.Constants.ACC_FINAL; -+import static org.objectweb.asm.Constants.ACC_PRIVATE; -+import static org.objectweb.asm.Constants.ACC_PROTECTED; -+import static org.objectweb.asm.Constants.ACC_PUBLIC; -+import static org.objectweb.asm.Constants.ACC_STATIC; -+import static org.objectweb.asm.Constants.ACC_SUPER; -+import static org.objectweb.asm.Constants.ACC_SYNTHETIC; -+import static org.objectweb.asm.Constants.ALOAD; -+import static org.objectweb.asm.Constants.ANEWARRAY; -+import static org.objectweb.asm.Constants.ARETURN; -+import static org.objectweb.asm.Constants.BIPUSH; -+import static org.objectweb.asm.Constants.CHECKCAST; -+import static org.objectweb.asm.Constants.DUP; -+import static org.objectweb.asm.Constants.GETSTATIC; -+import static org.objectweb.asm.Constants.ICONST_0; -+import static org.objectweb.asm.Constants.ICONST_1; -+import static org.objectweb.asm.Constants.ICONST_2; -+import static org.objectweb.asm.Constants.ICONST_3; -+import static org.objectweb.asm.Constants.ICONST_4; -+import static org.objectweb.asm.Constants.ICONST_5; -+import static org.objectweb.asm.Constants.ILOAD; -+import static org.objectweb.asm.Constants.INVOKESPECIAL; -+import static org.objectweb.asm.Constants.INVOKESTATIC; -+import static org.objectweb.asm.Constants.INVOKEVIRTUAL; -+import static org.objectweb.asm.Constants.NEW; -+import static org.objectweb.asm.Constants.PUTSTATIC; -+import static org.objectweb.asm.Constants.RETURN; -+import static org.objectweb.asm.Constants.V1_5; + import static org.eclipse.persistence.internal.dynamic.DynamicPropertiesManager.PROPERTIES_MANAGER_FIELD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.AASTORE; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_ENUM; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_FINAL; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PRIVATE; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_PUBLIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_STATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_SUPER; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ACC_SYNTHETIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ALOAD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ANEWARRAY; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ARETURN; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.BIPUSH; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.SIPUSH; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.CHECKCAST; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.DUP; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.GETSTATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ICONST_0; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ICONST_1; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ICONST_2; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ICONST_3; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ICONST_4; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ICONST_5; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.ILOAD; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.INVOKESPECIAL; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.INVOKESTATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.INVOKEVIRTUAL; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.NEW; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.PUTSTATIC; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.RETURN; +-import static org.eclipse.persistence.internal.libraries.asm.Opcodes.V1_5; ++import static org.objectweb.asm.Opcodes.AASTORE; ++import static org.objectweb.asm.Opcodes.ACC_ENUM; ++import static org.objectweb.asm.Opcodes.ACC_FINAL; ++import static org.objectweb.asm.Opcodes.ACC_PRIVATE; ++import static org.objectweb.asm.Opcodes.ACC_PUBLIC; ++import static org.objectweb.asm.Opcodes.ACC_STATIC; ++import static org.objectweb.asm.Opcodes.ACC_SUPER; ++import static org.objectweb.asm.Opcodes.ACC_SYNTHETIC; ++import static org.objectweb.asm.Opcodes.ALOAD; ++import static org.objectweb.asm.Opcodes.ANEWARRAY; ++import static org.objectweb.asm.Opcodes.ARETURN; ++import static org.objectweb.asm.Opcodes.BIPUSH; ++import static org.objectweb.asm.Opcodes.SIPUSH; ++import static org.objectweb.asm.Opcodes.CHECKCAST; ++import static org.objectweb.asm.Opcodes.DUP; ++import static org.objectweb.asm.Opcodes.GETSTATIC; ++import static org.objectweb.asm.Opcodes.ICONST_0; ++import static org.objectweb.asm.Opcodes.ICONST_1; ++import static org.objectweb.asm.Opcodes.ICONST_2; ++import static org.objectweb.asm.Opcodes.ICONST_3; ++import static org.objectweb.asm.Opcodes.ICONST_4; ++import static org.objectweb.asm.Opcodes.ICONST_5; ++import static org.objectweb.asm.Opcodes.ILOAD; ++import static org.objectweb.asm.Opcodes.INVOKESPECIAL; ++import static org.objectweb.asm.Opcodes.INVOKESTATIC; ++import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL; ++import static org.objectweb.asm.Opcodes.NEW; ++import static org.objectweb.asm.Opcodes.PUTSTATIC; ++import static org.objectweb.asm.Opcodes.RETURN; ++import static org.objectweb.asm.Opcodes.V1_5; /** * Write the byte codes of a dynamic entity class. The class writer will create diff -Nru eclipselink-2.1.3/debian/patches/explicitcast.patch eclipselink-2.5.1/debian/patches/explicitcast.patch --- eclipselink-2.1.3/debian/patches/explicitcast.patch 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/explicitcast.patch 2013-11-04 16:56:58.000000000 +0000 @@ -0,0 +1,71 @@ +Add in explicit casts where required to meet Java spec, so that the package compiles with +OpenJDK as well as ECJ. + +--- a/org/eclipse/persistence/mappings/converters/ConverterClass.java ++++ b/org/eclipse/persistence/mappings/converters/ConverterClass.java +@@ -83,12 +83,12 @@ + if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) { + try { + attributeConverterClass = (Class) AccessController.doPrivileged(new PrivilegedClassForName(attributeConverterClassName, true, classLoader)); +- attributeConverter = AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeConverterClass)); ++ attributeConverter = (AttributeConverter)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeConverterClass)); + } catch (PrivilegedActionException exception) { + throw ValidationException.classNotFoundWhileConvertingClassNames(attributeConverterClassName, exception.getException()); + } + } else { +- attributeConverterClass = PrivilegedAccessHelper.getClassForName(attributeConverterClassName, true, classLoader); ++ attributeConverterClass = (Class)PrivilegedAccessHelper.getClassForName(attributeConverterClassName, true, classLoader); + attributeConverter = (AttributeConverter) PrivilegedAccessHelper.newInstanceFromClass(attributeConverterClass); + } + } catch (ClassNotFoundException exception) { +--- a/org/eclipse/persistence/jpa/rs/PersistenceContext.java ++++ b/org/eclipse/persistence/jpa/rs/PersistenceContext.java +@@ -527,7 +527,7 @@ + } + Field[] fields = null; + if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) { +- fields = AccessController.doPrivileged(new PrivilegedGetDeclaredFields(clazz)); ++ fields = (Field[])AccessController.doPrivileged(new PrivilegedGetDeclaredFields(clazz)); + } else { + fields = PrivilegedAccessHelper.getDeclaredFields(clazz); + } +--- a/org/eclipse/persistence/internal/xr/QueryOperation.java ++++ b/org/eclipse/persistence/internal/xr/QueryOperation.java +@@ -615,8 +615,8 @@ + Class oracleSQLXML; + Method getStringMethod; + if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) { +- oracleSQLXML = AccessController.doPrivileged(new PrivilegedClassForName(ORACLESQLXML_STR, true, this.getClass().getClassLoader())); +- getStringMethod = AccessController.doPrivileged(new PrivilegedGetDeclaredMethod(oracleSQLXML, GETSTRING_METHOD, new Class[] {})); ++ oracleSQLXML = (Class)AccessController.doPrivileged(new PrivilegedClassForName(ORACLESQLXML_STR, true, this.getClass().getClassLoader())); ++ getStringMethod = (Method)AccessController.doPrivileged(new PrivilegedGetDeclaredMethod(oracleSQLXML, GETSTRING_METHOD, new Class[] {})); + fieldValue = (String) AccessController.doPrivileged(new PrivilegedMethodInvoker(getStringMethod, fieldValue, new Object[] {})); + } else { + oracleSQLXML = PrivilegedAccessHelper.getClassForName(ORACLESQLXML_STR, true, this.getClass().getClassLoader()); +@@ -635,11 +635,11 @@ + Object xmlTypeFactory; + Method getStringMethod; + if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) { +- oracleOPAQUE = AccessController.doPrivileged(new PrivilegedClassForName(ORACLEOPAQUE_STR, true, this.getClass().getClassLoader())); +- xmlTypeFactoryClass = AccessController.doPrivileged(new PrivilegedClassForName(XMLTYPEFACTORY_STR, true, this.getClass().getClassLoader())); +- xmlTypeFactoryConstructor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(xmlTypeFactoryClass, new Class[0], true)); ++ oracleOPAQUE = (Class)AccessController.doPrivileged(new PrivilegedClassForName(ORACLEOPAQUE_STR, true, this.getClass().getClassLoader())); ++ xmlTypeFactoryClass = (Class)AccessController.doPrivileged(new PrivilegedClassForName(XMLTYPEFACTORY_STR, true, this.getClass().getClassLoader())); ++ xmlTypeFactoryConstructor = (Constructor)AccessController.doPrivileged(new PrivilegedGetConstructorFor(xmlTypeFactoryClass, new Class[0], true)); + xmlTypeFactory = AccessController.doPrivileged(new PrivilegedInvokeConstructor(xmlTypeFactoryConstructor, new Object[0])); +- getStringMethod = AccessController.doPrivileged(new PrivilegedGetDeclaredMethod(xmlTypeFactoryClass, GETSTRING_METHOD, new Class[] {oracleOPAQUE})); ++ getStringMethod = (Method)AccessController.doPrivileged(new PrivilegedGetDeclaredMethod(xmlTypeFactoryClass, GETSTRING_METHOD, new Class[] {oracleOPAQUE})); + fieldValue = (String) AccessController.doPrivileged(new PrivilegedMethodInvoker(getStringMethod, fieldValue, new Object[] {})); + } else { + oracleOPAQUE = PrivilegedAccessHelper.getClassForName(ORACLEOPAQUE_STR, false, this.getClass().getClassLoader()); +--- a/org/eclipse/persistence/internal/jaxb/XMLJavaTypeConverter.java ++++ b/org/eclipse/persistence/internal/jaxb/XMLJavaTypeConverter.java +@@ -289,7 +289,7 @@ + } catch (IllegalAccessException e) { + Constructor ctor = null; + if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) { +- ctor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(xmlAdapterClass, new Class[0], true)); ++ ctor = (Constructor)AccessController.doPrivileged(new PrivilegedGetConstructorFor(xmlAdapterClass, new Class[0], true)); + } else { + ctor = PrivilegedAccessHelper.getDeclaredConstructorFor(xmlAdapterClass, new Class[0], true); + } diff -Nru eclipselink-2.1.3/debian/patches/java7-compat.diff eclipselink-2.5.1/debian/patches/java7-compat.diff --- eclipselink-2.1.3/debian/patches/java7-compat.diff 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/java7-compat.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Description: FTBFS with Java7 as default-java due to an API change in Java's SQL libraries -Author: Niels Thykier -Bug-Debian: http://bugs.debian.org/678288 -Forwarded: no -Last-Update: <2012-06-20> - ---- eclipselink-2.1.3.orig/org/eclipse/persistence/internal/jpa/jdbc/DataSourceImpl.java -+++ eclipselink-2.1.3/org/eclipse/persistence/internal/jpa/jdbc/DataSourceImpl.java -@@ -154,4 +154,11 @@ public class DataSourceImpl implements DataSource { - return false; - } - -+ /* -+ * Java7 compat. -+ */ -+ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException { -+ throw new java.sql.SQLFeatureNotSupportedException(); -+ } -+ - } diff -Nru eclipselink-2.1.3/debian/patches/series eclipselink-2.5.1/debian/patches/series --- eclipselink-2.1.3/debian/patches/series 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/series 2013-11-04 16:56:58.000000000 +0000 @@ -1,4 +1,5 @@ disable_antlr3_embedded_copy.diff disable_asm_embedded_copy.diff -antlr32.diff -java7-compat.diff +charset.patch +typeparameters.patch +explicitcast.patch diff -Nru eclipselink-2.1.3/debian/patches/typeparameters.patch eclipselink-2.5.1/debian/patches/typeparameters.patch --- eclipselink-2.1.3/debian/patches/typeparameters.patch 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/debian/patches/typeparameters.patch 2013-11-04 16:56:58.000000000 +0000 @@ -0,0 +1,13 @@ +Fix parameters to meet the java spec, so that the build works in OpenJDK as well as ECJ. + +--- a/org/eclipse/persistence/internal/oxm/XMLMarshaller.java ++++ b/org/eclipse/persistence/internal/oxm/XMLMarshaller.java +@@ -68,7 +68,7 @@ + public abstract class XMLMarshaller< + ABSTRACT_SESSION extends CoreAbstractSession, + CONTEXT extends Context, +- DESCRIPTOR extends Descriptor, ++ DESCRIPTOR extends Descriptor, + MEDIA_TYPE extends MediaType, + NAMESPACE_PREFIX_MAPPER extends NamespacePrefixMapper, + OBJECT_BUILDER extends ObjectBuilder> extends Marshaller { diff -Nru eclipselink-2.1.3/debian/regenerate-patches.sh eclipselink-2.5.1/debian/regenerate-patches.sh --- eclipselink-2.1.3/debian/regenerate-patches.sh 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/debian/regenerate-patches.sh 2013-11-04 16:56:58.000000000 +0000 @@ -0,0 +1,32 @@ +#!/bin/bash + +quilt delete disable_antlr3_embedded_copy.diff +quilt delete disable_asm_embedded_copy.diff + +mv debian/patches/disable_antlr3_embedded_copy.diff debian/patches/disable_antlr3_embedded_copy.diff.old +mv debian/patches/disable_asm_embedded_copy.diff debian/patches/disable_asm_embedded_copy.diff.old + +quilt new disable_antlr3_embedded_copy.diff + +for file in `fgrep -l -r "org.eclipse.persistence.internal.libraries.antlr" org/ | fgrep -v "org/eclipse/persistence/internal/libraries/antlr"` +do + echo $file + quilt add $file + sed -i -e 's/org\.eclipse\.persistence\.internal\.libraries\.antlr/org.antlr/g' $file + quilt refresh +done + + +quilt new disable_asm_embedded_copy.diff + +for file in `fgrep -l -r "org.eclipse.persistence.internal.libraries.asm" org/ | fgrep -v "org/eclipse/persistence/internal/libraries/asm"` +do + echo $file + quilt add $file + sed -i -e 's/org\.eclipse\.persistence\.internal\.libraries\.asm/org.objectweb.asm/g' $file + quilt refresh +done + +echo "*****************************************" +echo "Now copy the headers from the old patches" +echo "*****************************************" diff -Nru eclipselink-2.1.3/debian/rules eclipselink-2.5.1/debian/rules --- eclipselink-2.1.3/debian/rules 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/rules 2013-11-04 16:56:58.000000000 +0000 @@ -6,17 +6,11 @@ dh --with javahelper $@ override_dh_auto_build: - # Use upstream JPQL.g (copied to debian/) to rebuild JPQL lexer using ANTLR 3.2 - antlr3 -fo org/eclipse/persistence/internal/jpa/parsing/jpql/antlr/ debian/JPQL.g ant -f debian/build.xml override_dh_auto_clean: ant -f debian/build.xml clean -override_jh_installlibs: - jh_installlibs - jh_manifest -v - get-orig-source: cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \ uscan \ diff -Nru eclipselink-2.1.3/debian/watch eclipselink-2.5.1/debian/watch --- eclipselink-2.1.3/debian/watch 2012-06-27 07:52:21.000000000 +0000 +++ eclipselink-2.5.1/debian/watch 2013-11-04 16:56:58.000000000 +0000 @@ -1,5 +1,5 @@ version=3 opts=downloadurlmangle=s%www\.eclipse\.org/downloads/download\.php\?file=%download.eclipse.org% \ http://www.eclipse.org/eclipselink/downloads/ \ -http://www.eclipse.org/downloads/download\.php\?file=/rt/eclipselink/releases/.*/eclipselink-src-(.*2\.1.*)\.v[0-9]+-r[0-9]+\.zip \ +http://www.eclipse.org/downloads/download\.php\?file=/rt/eclipselink/releases/.*/eclipselink-src-(.*2\..*)\.v[0-9]+-[0-9a-z]+\.zip \ debian debian/orig-tar.sh diff -Nru eclipselink-2.1.3/eclipselink_oxm_2_0.xsd eclipselink-2.5.1/eclipselink_oxm_2_0.xsd --- eclipselink-2.1.3/eclipselink_oxm_2_0.xsd 2010-11-03 19:07:00.000000000 +0000 +++ eclipselink-2.5.1/eclipselink_oxm_2_0.xsd 1970-01-01 00:00:00.000000000 +0000 @@ -1,260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru eclipselink-2.1.3/eclipselink_oxm_2_1.xsd eclipselink-2.5.1/eclipselink_oxm_2_1.xsd --- eclipselink-2.1.3/eclipselink_oxm_2_1.xsd 2010-11-03 19:07:00.000000000 +0000 +++ eclipselink-2.5.1/eclipselink_oxm_2_1.xsd 1970-01-01 00:00:00.000000000 +0000 @@ -1,462 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru eclipselink-2.1.3/org/eclipse/persistence/Version.j eclipselink-2.5.1/org/eclipse/persistence/Version.j --- eclipselink-2.1.3/org/eclipse/persistence/Version.j 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/Version.j 2013-09-18 00:44:20.000000000 +0000 @@ -0,0 +1,140 @@ +/******************************************************************************* + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation from Oracle TopLink + * egwin - Changed buildNumber to buildDate. Added buildRevision, + * buildType, getBuildDate(), getBuildRevision(), getBuildType(), + * getVersionString(), printVersionString(), and main() + ******************************************************************************/ +package org.eclipse.persistence; + +/** + * This class stores variables for the version and build numbers that are used in printouts and exceptions. + * + * @author Eric Gwin + * @since 1.0, + */ +public class Version { + // The current copyright info for EclipseLink. + private static final String CopyrightString = "Copyright (c) 1998, 2013 Oracle. All rights reserved."; + + // The current version of EclipseLink. + // This will be used by all product components and included in exceptions. + private static String product = "Eclipse Persistence Services"; + // A three part version number (major.minor.service) + private static final String version = "@VERSION@"; + // A string that describes this build i.e.( vYYYYMMDD-HHMM, etc.) + private static final String qualifier = "@QUALIFIER@"; + // Should be in the format YYYYMMDD + private static final String buildDate = "@BUILD_DATE@"; + // Should be in the format HHMM + private static final String buildTime = "@BUILD_TIME@"; + // revision of source from the repository + private static final String buildRevision = "@BUILD_REVISION@"; + // Typically SNAPSHOT, Milestone name (M1,M2,etc), or RELEASE + private static final String buildType = "@BUILD_TYPE@"; + + /** Keep track of JDK version in order to make some decisions about data structures. **/ + public static final int JDK_VERSION_NOT_SET = 0; + public static final int JDK_1_5 = 1; + public static final int JDK_1_6 = 2; + public static int JDK_VERSION = JDK_VERSION_NOT_SET; + + public static String getVersionString ( ) { + String verString; + + verString = getVersion() + "." + getQualifier(); + return( verString ); + } + + public static String getProduct() { + return product; + } + + public static void setProduct(String ProductName) { + product = ProductName; + } + + public static String getVersion() { + return version; + } + + public static String getQualifier() { + return qualifier; + } + + public static String getBuildNumber() { + return getBuildDate(); + } + + public static String getBuildDate() { + return buildDate; + } + + public static String getBuildTime() { + return buildTime; + } + + public static String getBuildRevision() { + return buildRevision; + } + + public static String getBuildType() { + return buildType; + } + + /** + * INTERNAL: + * Return the JDK version we are using. + */ + public static int getJDKVersion() { + if (JDK_VERSION == JDK_VERSION_NOT_SET) { + String version = System.getProperty("java.version"); + if ((version != null) && version.startsWith("1.5")) { + useJDK15(); + } else { + useJDK16(); + } + } + return JDK_VERSION; + } + + + public static void useJDK15() { + JDK_VERSION = JDK_1_5; + } + + public static void useJDK16() { + JDK_VERSION = JDK_1_6; + } + + public static boolean isJDK15() { + return getJDKVersion() == JDK_1_5; + } + + public static boolean isJDK16() { + return getJDKVersion() == JDK_1_6; + } + + public static void printVersion ( ) { + System.out.println( getVersionString() ); + } + + public static void main ( String[] args ) { + System.out.println( + "\n" + getProduct() + " (EclipseLink)" + + "\n Build Version: " + getVersionString() + + "\n Build Qualifier: " + getQualifier() + + "\n Build Date: " + getBuildDate() + + "\n Build Time: " + getBuildTime() + + "\n SVN Revision: " + getBuildRevision() + ); + } +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/Version.java eclipselink-2.5.1/org/eclipse/persistence/Version.java --- eclipselink-2.1.3/org/eclipse/persistence/Version.java 2011-03-04 18:41:38.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/Version.java 2013-09-18 00:44:20.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -23,21 +23,21 @@ */ public class Version { // The current copyright info for EclipseLink. - private static final String CopyrightString = "Copyright (c) 1998, 2010 Oracle. All rights reserved."; + private static final String CopyrightString = "Copyright (c) 1998, 2013 Oracle. All rights reserved."; // The current version of EclipseLink. // This will be used by all product components and included in exceptions. private static String product = "Eclipse Persistence Services"; // A three part version number (major.minor.service) - private static final String version = "2.1.3"; + private static final String version = "2.5.1"; // A string that describes this build i.e.( vYYYYMMDD-HHMM, etc.) - private static final String qualifier = "v20110304-r9073"; + private static final String qualifier = "v20130918-f2b9fc5"; // Should be in the format YYYYMMDD - private static final String buildDate = "20110304"; + private static final String buildDate = "20130918"; // Should be in the format HHMM - private static final String buildTime = "1039"; + private static final String buildTime = "0144"; // revision of source from the repository - private static final String buildRevision = "9073"; + private static final String buildRevision = "NA"; // Typically SNAPSHOT, Milestone name (M1,M2,etc), or RELEASE private static final String buildType = "SNAPSHOT"; diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/AdditionalCriteria.java eclipselink-2.5.1/org/eclipse/persistence/annotations/AdditionalCriteria.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/AdditionalCriteria.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/AdditionalCriteria.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 10/15/2010-2.2 Guy Pelletier + * - 322008: Improve usability of additional criteria applied to queries at the session/EM + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + *

An additional criteria can be specified at the Entity or MappedSuperclass + * level. When specified at the mapped superclass level, it applies to all + * inheriting entities unless those entities define their own additional + * criteria, at which point the additional criteria from the mapped superclass + * is ignored.

+ * + *

The additional criteria supports any valid JPQL string and must use 'this' + * as an alias to form your additional criteria. E.G., + *

+ * @Entity
+ * @AdditionalCriteria("this.nut.size = :NUT_SIZE and this.nut.color = :NUT_COLOR")
+ * public class Bolt {...}
+ * 
+ *

+ * + *

Additional criteria parameters are also accepted and are set through + * properties on the entity manager factory, or on an entity manager. When set + * on the entity manager, the properties must be set before any query execution + * and should not be changed for the life span of that entity manager.

+ * + *

Properties set on the entity manager will override those similarly named + * properties set on the entity manager factory.

+ * + *

Additional criteria is not supported with any native queries.

+ * + * @author Guy Pelletier + * @since EclipseLink 2.2 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface AdditionalCriteria { + /** + * (Required) The JPQL fragment to use as the additional criteria. + */ + String value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Array.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Array.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Array.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Array.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Array types are extended object-relational data-types supported by some databases. + * Array types are user define types in the database such as VARRAY types on Oracle. + * Arrays can contains basic types (VARCHAR) or other Struct types, and can be stored in + * a column or in a Struct type. + *

+ * This annotation can be defined on a collection attribute that is + * persisted to an Array type. The collection can be of basic types, or embeddable + * class mapped using a Struct. + * + * @see org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor + * @see org.eclipse.persistence.mappings.structures.ArrayMapping + * @see org.eclipse.persistence.mappings.structures.ObjectArrayMapping + * @author James Sutherland + * @since EclipseLink 2.3 + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Array { + /** + * (Optional) The basic or embeddable class that is the element + * type of the collection. This element is optional only if the + * collection field or property is defined using Java generics, + * and must be specified otherwise. It defaults to the + * paramterized type of the collection when defined using + * generics. + */ + Class targetClass() default void.class; + + /** + * (Required) The database name of the database array structure type. + */ + String databaseType(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/BasicCollection.java eclipselink-2.5.1/org/eclipse/persistence/annotations/BasicCollection.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/BasicCollection.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/BasicCollection.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/BasicMap.java eclipselink-2.5.1/org/eclipse/persistence/annotations/BasicMap.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/BasicMap.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/BasicMap.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/BatchFetch.java eclipselink-2.5.1/org/eclipse/persistence/annotations/BatchFetch.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/BatchFetch.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/BatchFetch.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/BatchFetchType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/BatchFetchType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/BatchFetchType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/BatchFetchType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Cache.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Cache.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Cache.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Cache.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -15,6 +15,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; +import org.eclipse.persistence.config.CacheIsolationType; +import static org.eclipse.persistence.config.CacheIsolationType.SHARED; + import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -63,8 +66,18 @@ * (Optional) Cached instances in the shared cache, * or only a per EntityManager isolated cache. * The default is shared. + * @deprecated As of Eclipselink 2.2. See the attribute 'isolation' */ + @Deprecated boolean shared() default true; + + /** + * (Optional) Controls the level of caching this Entity will use. + * The default is CacheIsolationType.SHARED which has EclipseLink + * Caching all Entities in the Shared Cache. + * @see org.eclipse.persistence.config.CacheIsolationType + */ + CacheIsolationType isolation() default SHARED; /** * (Optional) Expire cached instance after a fix period of time (ms). @@ -111,4 +124,10 @@ * Note that cache coordination must also be configured for the persistence unit/session. */ CacheCoordinationType coordinationType() default SEND_OBJECT_CHANGES; + + /** + * (Optional) The database change notification mode. + * Note that database event listener must also be configured for the persistence unit/session. + */ + DatabaseChangeNotificationType databaseChangeNotificationType() default DatabaseChangeNotificationType.INVALIDATE; } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheCoordinationType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheCoordinationType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheCoordinationType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheCoordinationType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheIndex.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheIndex.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheIndex.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheIndex.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Allow a cache index to be define. + * A cache index allow singleResult queries to obtain a cache hit when querying on the indexed fields. + * resultList queries cannot obtain cache hits, as it is unknown if all of the objects are in memory, + * (unless the cache usage query hint is used). + * The index should be unique, but if not unique, the first indexed object will be returned. + * Cache indexes are only relevant when caching is enabled. + * The @CacheIndex can be defined on a Entity class, or on an attribute. + * The column is defaulted when defined on a attribute. + * + * @author James Sutherland + * @since EclipseLink 2.4 + */ +@Target({METHOD, FIELD, TYPE}) +@Retention(RUNTIME) +public @interface CacheIndex { + /** + * Specify the set of columns to define the index on. + * Not required when annotated on a field/method. + */ + String[] columnNames() default {}; + + /** + * Specify if the indexed field is updateable. + * If updateable the object will be re-indexed on each update/refresh. + */ + boolean updateable() default true; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheIndexes.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheIndexes.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheIndexes.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheIndexes.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Allow a set of cache indexes to be define on an Entity. + * + * @author James Sutherland + * @since EclipseLink 2.4 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface CacheIndexes { + CacheIndex[] value() default {}; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheInterceptor.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheInterceptor.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheInterceptor.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheInterceptor.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheKeyType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheKeyType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheKeyType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheKeyType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CacheType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CacheType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -14,7 +14,7 @@ /** * The CacheType enum is used with the Cache annotation for a persistent class. - * It defines the type of IdentityMap/Cache used for the class. By default the + * It defines the type of cache (IdentityMap) used for the class. By default the * SOFT_WEAK cache type is used. * * @see org.eclipse.persistence.annotations.Cache @@ -26,14 +26,15 @@ * Provides full caching and guaranteed identity. Caches all objects * and does not remove them. * WARNING: This method may be memory intensive when many objects are - * read. + * read. If used on a large data set it will eventually causes an out of memory error. */ FULL, /** * Similar to the FULL identity map except that the map holds the * objects using weak references. This method allows full garbage - * collection and provides full caching and guaranteed identity. + * collection and guaranteed identity. It will only hold objects + * that are referenced by the application so may not provide a large caching benefit. */ WEAK, @@ -48,7 +49,7 @@ * Similar to the WEAK identity map except that it maintains a * most-frequently-used sub-cache. The size of the sub-cache is * proportional to the size of the identity map as specified by - * descriptor's setIdentityMapSize() method. The sub-cache + * @Cache size attribute. The sub-cache * uses soft references to ensure that these objects are * garbage-collected only if the system is low on memory. */ @@ -67,13 +68,16 @@ * on a least-recently-used basis. This method allows object * identity for the most commonly used objects. * WARNING: Furnishes caching and identity, but does not guarantee - * identity. + * identity. This cache type is not recommend and should normally not be used, + * except for objects that have no relationships to them. */ CACHE, /** * WARNING: Does not preserve object identity and does not cache - * objects. + * objects. This cache type is not recommend and should normally not be used. + * This cache type should not be used to disable caching, to properly disable + * caching set the @Cache isolation attribute to ISOLATED. */ NONE } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CascadeOnDelete.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CascadeOnDelete.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CascadeOnDelete.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CascadeOnDelete.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Define the foreign key defined by the relationship to cascade the delete on the database. + * This means when the source object is deleted the target object will be automatically deleted by the database. + * This will affect DDL generation as well as runtime behavior in omitting the delete statements. + *

+ * The constraint cascaded depends on the mapping, only relationship mappings are allowed. + * The relationship should also use cascade remove, or deleteOrphans. + *

For a OneToOne it can only be defined if the mapping uses a mappedBy, and will delete the target object. + *

It cannot be defined for a ManyToOne. + *

For a OneToMany it will delete the target objects, or ONLY the join table if using a join table. + *

For a ManyToMany it will delete the rows from the join table, not the target objects. + *

For an ElementCollection it will delete the target rows. + *

For an Entity it will delete the secondary or JOINED inheritance tables. + * + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({METHOD, FIELD, TYPE}) +@Retention(RUNTIME) +public @interface CascadeOnDelete { +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ChangeTracking.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ChangeTracking.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ChangeTracking.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ChangeTracking.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ChangeTrackingType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ChangeTrackingType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ChangeTrackingType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ChangeTrackingType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ClassExtractor.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ClassExtractor.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ClassExtractor.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ClassExtractor.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -22,29 +22,30 @@ /** * A ClassExtractor allows for a user defined class indicator in place of * providing a discriminator column. The class has the following restrictions: - - * - It must extend the org.eclipse.persistence.descriptors.ClassExtractor + *

    + *
  • It must extend the org.eclipse.persistence.descriptors.ClassExtractor * class and implement the extractClassFromRow(Record, Session) method. - * - That method must take a database row (a Record/Map) as an argument and + *
  • That method must take a database row (a Record/Map) as an argument and * must return the class to use for that row. - * + *
* This method will be used to decide which class to instantiate when reading * from the database. It is the application's responsibility to populate any * typing information in the database required to determine the class from the * row. - * + *

* The ClassExtractor must only be set on the root of an entity class or * sub-hierarchy in which a different inheritance strategy is applied. The * ClassExtractor can only be used with the SINGLE_TABLE and JOINED inheritance * strategies. - * + *

* If a ClassExtractor is used then a DiscriminatorColumn cannot be used. A - * ClassExtractor also cannot be used on either the root or its subclasses. - * + * DiscriminatorColumn also cannot be used on either the root or its subclasses. + *

* In addition, for more complex configurations using a ClassExtractor and a * SINGLE_TABLE strategy, the descriptor's withAllSubclasses and onlyInstances * expressions should be set through the ClassExtractor's initialize method. * + * @see org.eclipse.persistence.descriptors.ClassExtractor * @see org.eclipse.persistence.descriptors.InheritancePolicy.setWithAllSubclassesExpression(Expression) * @see org.eclipse.persistence.descriptors.InheritancePolicy.setOnlyInstancesExpression(Expression) * @@ -58,6 +59,6 @@ * (Required) Defines the name of the class extractor that should be * applied to this entity's descriptor. */ - Class value(); + Class value(); } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CloneCopyPolicy.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CloneCopyPolicy.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CloneCopyPolicy.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CloneCopyPolicy.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CollectionTable.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CollectionTable.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CollectionTable.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CollectionTable.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CompositeMember.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CompositeMember.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CompositeMember.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CompositeMember.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation from Oracle TopLink + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A CompositeMember annotation is ignored unless is in composite member persistence unit. + * It may be used in conjunction with a ElementCollection and CollectionTable annotations. + * It should be used if target type is a primitive type + * and CollectionTable designates the table that belongs to + * composite member persistence unit other than the source composite member persistence unit. + * That allows the source and target to be mapped to different databases. + * + * @see javax.persistence.ElementCollection + * @see javax.persistence.CollectionTable + * @see org.eclipse.persistence.config.PersistenceUnitProperties#COMPOSITE_UNIT + * + * A CompositeMember can be specified on within an Entity, MappedSuperclass + * and Embeddable class. + * + * @author Andrei Ilitchev + * @since Eclipselink 2.3 + **/ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface CompositeMember { + /** + * The name of a target composite member persistence unit to which element table belongs (if differs from source composite member persistence unit) + */ + String value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ConversionValue.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ConversionValue.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ConversionValue.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ConversionValue.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Convert.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Convert.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Convert.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Convert.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Converter.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Converter.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Converter.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Converter.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Converters.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Converters.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Converters.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Converters.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 08/19/2010-2.2 Guy Pelletier + * - 282773: Add plural converter annotations + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A Converters annotation allows the definition of multiple Converter. + * + * @see org.eclipse.persistence.annotations.Converter + * + * @author Guy Pelletier + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Converters { + /** + * (Required) An array of converter. + */ + Converter[] value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/CopyPolicy.java eclipselink-2.5.1/org/eclipse/persistence/annotations/CopyPolicy.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/CopyPolicy.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/CopyPolicy.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Customizer.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Customizer.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Customizer.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Customizer.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/DatabaseChangeNotificationType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/DatabaseChangeNotificationType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/DatabaseChangeNotificationType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/DatabaseChangeNotificationType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial design and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + + +/** + * Configures what type of database change notification an entity/descriptor should use. + * This is only relevant if the persistence unit/session has been configured with a DatabaseEventListener, + * such as the OracleChangeNotificationListener that receives database change events. + * This allows for the EclipseLink cache to be invalidated or updated from database changes. + * + * @see Cache#databaseChangeNotificationType() + * @see org.eclipse.persistence.descriptors.CachePolicy#setDatabaseChangeNotificationType(DatabaseChangeNotificationType) + * @author James Sutherland + * @since EclipseLink 2.4 + */ +public enum DatabaseChangeNotificationType { + /** + * No database change events will be processed. + */ + NONE, + + /** + * Invalidates the EclipseLink cache when a database change event is received for an object. + * This requires a DatabaseEventListener to be configured with the persistence unit or session. + * This requires that the database change can be determine to affect the object, some database change events, + * such as the OracleChangeNotificationListener (Oracle DCN/QCN) only give the ROWID, so changes to secondary + * table or relationships may not be able to be determined to affect and object unless its version is also changed. + */ + INVALIDATE +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/DeleteAll.java eclipselink-2.5.1/org/eclipse/persistence/annotations/DeleteAll.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/DeleteAll.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/DeleteAll.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * tware - part of fix for bug 351186 + ******************************************************************************/ +package org.eclipse.persistence.annotations; + + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A DeleteAll annotation is specified to indicate that when an relationship + * is deleted, it should use a delete all query. This typically happens if the + * relationship is PrivateOwned and its owner is deleted. In that case, the members + * of the relationship will be deleted without reading them in. + * + * Use this annotation with caution. EclipseLink will not validate for you whether the + * target entity is mapped in such a way as to allow the delete all to work. + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface DeleteAll { +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Direction.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Direction.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Direction.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Direction.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/DiscriminatorClass.java eclipselink-2.5.1/org/eclipse/persistence/annotations/DiscriminatorClass.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/DiscriminatorClass.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/DiscriminatorClass.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ExcludeDefaultMappings.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ExcludeDefaultMappings.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ExcludeDefaultMappings.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ExcludeDefaultMappings.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 12/02/2010-2.2 Guy Pelletier + * - 251554: ExcludeDefaultMapping annotation needed + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Target; +import java.lang.annotation.Retention; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Specifies default mappings (those that are not explicitly decorated in XML or + * using annotations)should be omitted. + * + * An ExcludeDefaultMappings annotation can be specified on an entity, + * embeddable or mapped superclass and applies solely to the mappings + * of the class it is defined on. + * + * @author Guy Pelletier + * @since EclipseLink 2.2 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface ExcludeDefaultMappings { +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ExistenceChecking.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ExistenceChecking.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ExistenceChecking.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ExistenceChecking.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ExistenceType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ExistenceType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ExistenceType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ExistenceType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/FetchAttribute.java eclipselink-2.5.1/org/eclipse/persistence/annotations/FetchAttribute.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/FetchAttribute.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/FetchAttribute.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/FetchGroup.java eclipselink-2.5.1/org/eclipse/persistence/annotations/FetchGroup.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/FetchGroup.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/FetchGroup.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/FetchGroups.java eclipselink-2.5.1/org/eclipse/persistence/annotations/FetchGroups.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/FetchGroups.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/FetchGroups.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/HashPartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/HashPartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/HashPartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/HashPartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.persistence.Column; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * HashPartitioning partitions access to a database cluster by the hash of a field value from the object, + * such as the object's location, or tenant. + * The hash indexes into the list of connection pools. + * All write or read request for object's with that hash value are sent to the server. + * If a query does not include the field as a parameter, then it can either be sent + * to all server's and unioned, or left to the sesion's default behavior. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.HashPartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface HashPartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * The database column or query parameter to partition queries by. + * This is the table column name, not the class attribute name. + * The column value must be included in the query and should normally be part of the object's Id. + * This can also be the name of a query parameter. + * If a query does not contain the field the query will not be partitioned. + */ + Column partitionColumn(); + + /** + * List of connection pool names to partition across. + * Defaults to all defined pools in the ServerSession. + */ + String[] connectionPools() default {}; + + /** + * Defines if queries that do not contain the partition field should be sent + * to every database and have the result unioned. + */ + boolean unionUnpartitionableQueries() default false; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/IdValidation.java eclipselink-2.5.1/org/eclipse/persistence/annotations/IdValidation.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/IdValidation.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/IdValidation.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Index.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Index.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Index.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Index.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Allow a database INDEX to be define when generating DDL. + * The @Index can be defined on a Entity class, or on an attribute. + * The column is defaulted when defined on a attribute. + * + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({METHOD, FIELD, TYPE}) +@Retention(RUNTIME) +public @interface Index { + /** The name of the INDEX, defaults to INDEX_ */ + String name() default ""; + + /** The schema of the INDEX */ + String schema() default ""; + + /** The catalog of the INDEX */ + String catalog() default ""; + + /** The table to define the index on, defaults to entities primary table. */ + String table() default ""; + + boolean unique() default false; + + /** + * Specify the set of columns to define the index on. + * Not required when annotated on a field/method. + */ + String[] columnNames() default {}; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Indexes.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Indexes.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Indexes.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Indexes.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Allow a set of database indexes to be define on an Entity. + * + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({METHOD, FIELD, TYPE}) +@Retention(RUNTIME) +public @interface Indexes { + Index[] value() default {}; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/InstantiationCopyPolicy.java eclipselink-2.5.1/org/eclipse/persistence/annotations/InstantiationCopyPolicy.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/InstantiationCopyPolicy.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/InstantiationCopyPolicy.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -22,16 +22,22 @@ /** * An InstantiationCopyPolicy is used to set an * org.eclipse.persistence.descriptors.copying.InstantiationCopyPolicy on an - * Entity. InstantiationCopyPolicy is the default CopyPolicy in EclipseLink and - * therefore this configuration option is only used to override other types of - * copy policies + * Entity. + * + * InstantiationCopyPolicy is the default CopyPolicy if weaving is not used, + * or if property access is used. + * + * A special CloneCopyPolicy is used if weaving and field access is used. * * An InstantiationCopyPolicy should be specified on an Entity, * MappedSuperclass or Embeddable. - * + *

* Example: + *

  * @Entity
  * @InstantiationCopyPolicy 
+ * public class Employee {
+ * 
* * @see org.eclipse.persistence.descriptors.copying.InstantiationCopyPolicy * @see org.eclipse.persistence.annotations.CloneCopyPolicy diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/JoinFetch.java eclipselink-2.5.1/org/eclipse/persistence/annotations/JoinFetch.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/JoinFetch.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/JoinFetch.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/JoinFetchType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/JoinFetchType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/JoinFetchType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/JoinFetchType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/MapKeyConvert.java eclipselink-2.5.1/org/eclipse/persistence/annotations/MapKeyConvert.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/MapKeyConvert.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/MapKeyConvert.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Multitenant.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Multitenant.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Multitenant.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Multitenant.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 03/24/2011-2.3 Guy Pelletier + * - 337323: Multi-tenant with shared schema support (part 1) + * 08/18/2011-2.3.1 Guy Pelletier + * - 355093: Add new 'includeCriteria' flag to Multitenant metadata + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Multitenant specifies that a given entity is shared amongst multiple tenants + * of a given application. The multitenant type specifies how the data for these + * entities are to be stored on the database for each tenant. + * + * Multitenant can be specified at the Entity or MappedSuperclass level. + * + * @see org.eclipse.persistence.annotations.MultitenantType + * @see org.eclipse.persistence.annotations.TenantDiscriminatorColumn + * @see org.eclipse.persistence.annotations.TenantDiscriminatorColumns + * + * @author Guy Pelletier + * @since EclipseLink 2.3 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface Multitenant { + /** + * (Optional) Specify the multi-tenant strategy to use. + */ + MultitenantType value() default MultitenantType.SINGLE_TABLE; + + /** + * (Optional) Indicate if the database requires the tenant criteria to + * be added to the SELECT, UPDATE, and DELETE queries. By default this is + * done but when set to false the queries will not be modified and it will + * be up to the application or database to ensure that the correct criteria + * is applied to all queries. + */ + boolean includeCriteria() default true; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/MultitenantType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/MultitenantType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/MultitenantType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/MultitenantType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 03/24/2011-2.3 Guy Pelletier + * - 337323: Multi-tenant with shared schema support (part 1) + * 09/09/2011-2.3.1 Guy Pelletier + * - 356197: Add new VPD type to MultitenantType + * 14/05/2012-2.4 Guy Pelletier + * - 376603: Provide for table per tenant support for multitenant applications + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +/** + * An enum that is used within the Multitenant annotation. + * + * @see org.eclipse.persistence.annotations.Multitenant. + * @author Guy Pelletier + * @since EclipseLink 2.3 + */ +public enum MultitenantType { + /** + * Specifies that table(s) the entity maps to includes rows for multiple + * tenants. The tenant discriminator column(s) are used with application + * context values to limit what a persistence context can access. + */ + SINGLE_TABLE, + + /** + * Specifies that the DB will handle the tenant filtering on all SELECT, + * UPDATE and DELETE queries. Using this type assumes that the platform + * used with your persistence unit does indeed support VPD. + * + * @since 2.3.1 + */ + VPD, + + /** + * Specifies that different tables are used for each tenant and used in + * conjunction with the tenant table discriminator which describes how the + * tables are uniquely identified, that is, using a suffix/prefix or a + * separate schema. + * + * @since 2.4 + */ + TABLE_PER_TENANT +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Mutable.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Mutable.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Mutable.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Mutable.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredFunctionQueries.java eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredFunctionQueries.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredFunctionQueries.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredFunctionQueries.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A NamedStoredFunctionQueries annotation allows the definition of multiple + * NamedStoredFunctionQuery. + * + * @author James + * @since EclipseLink 2.3 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface NamedStoredFunctionQueries { + /** + * (Required) An array of named stored procedure query. + */ + NamedStoredFunctionQuery[] value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredFunctionQuery.java eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredFunctionQuery.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredFunctionQuery.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredFunctionQuery.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import javax.persistence.QueryHint; + +/** + * A NamedStoredFunctionQuery annotation allows the definition of queries that + * call stored functions as named queries. + * + * A NamedStoredFunctionQuery annotation may be defined on an Entity or + * MappedSuperclass. + * + * @author James + * @since EclipseLink 2.3 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface NamedStoredFunctionQuery { + /** + * (Required) Unique name that references this stored function query. + */ + String name(); + + /** + * (Optional) Query hints. + */ + QueryHint[] hints() default {}; + + /** + * (Optional) The name of the SQLResultMapping. + */ + String resultSetMapping() default ""; + + /** + * (Required) The name of the stored function. + */ + String functionName(); + + /** + * (Optional) Defines if the stored procedure should be called by index or by name. + * By index requires that the StoredProcedureParameter are defined in the same order as the procedure on the database. + * By name requires the database platform support naming procedure parameters. + */ + boolean callByIndex() default false; + + /** + * (Optional) Defines the parameters to the stored function. + */ + StoredProcedureParameter[] parameters() default {}; + + /** + * (Required) Defines the return value of the stored function. + */ + StoredProcedureParameter returnParameter(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredProcedureQueries.java eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredProcedureQueries.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredProcedureQueries.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredProcedureQueries.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredProcedureQuery.java eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredProcedureQuery.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/NamedStoredProcedureQuery.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/NamedStoredProcedureQuery.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -9,6 +9,8 @@ * * Contributors: * Oracle - initial API and implementation from Oracle TopLink + * 02/08/2012-2.4 Guy Pelletier + * - 350487: JPA 2.1 Specification defined support for Stored Procedure Calls ******************************************************************************/ package org.eclipse.persistence.annotations; @@ -46,13 +48,27 @@ /** * (Optional) Refers to the class of the result. + * @deprecated + * @see resultClasses */ Class resultClass() default void.class; /** + * (Optional) Refers to the classes of the result. + */ + Class[] resultClasses() default {}; + + /** * (Optional) The name of the SQLResultMapping. + * @deprecated + * @see resultSetMappings */ String resultSetMapping() default ""; + + /** + * (Optional) The names of the SQLResultMappings. + */ + String[] resultSetMappings() default {}; /** * (Required) The name of the stored procedure. @@ -60,14 +76,29 @@ String procedureName(); /** - * (Optional) Whether the query should return a result set. You should only - * set this flag to true if you expect a raw JDBC ResultSet to be returned - * from your stored procedure. Otherwise, you should let the default apply. + * (Optional) Defines if stored procedure returns a result set. + * This is only relevant on databases that support returning result sets + * from stored procedures. + */ + boolean returnsResultSet() default false; + + /** + * (Optional) Defines if the stored procedure returns multiple result sets. + * This is only relevant on databases that support multiple result sets from + * stored procedures. + */ + boolean multipleResultSets() default false; + + /** + * (Optional) Defines if the stored procedure should be called by index or + * by name. By index requires that the StoredProcedureParameter are defined + * in the same order as the procedure on the database. By name requires the + * database platform support naming procedure parameters. */ - boolean returnsResultSet() default false; + boolean callByIndex() default false; /** - * (Optional) Defines arguments to the stored procedure. + * (Optional) Defines the parameters to the stored procedure. */ StoredProcedureParameter[] parameters() default {}; } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Noncacheable.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Noncacheable.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Noncacheable.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Noncacheable.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Gordon Yorke - Initial Contribution + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * The NonCacheable annotation is used to configure caching behavior for + * relationships. If this annotation is set on a relationship that relationship + * will not be cached even though the parent Entity may be cached. Each time the + * Entity is retrieved the relationship will be reloaded from the data-source. + * + * This may be useful for situations where caching of relationships is not + * desired or when using different EclipseLink IdentityMap types and having + * cached references extends the cache lifetime of related Entities using a + * different caching scheme. + * For instance Entity A references Entity B, Entity A is FullIdentityMap and + * Entity B is WeakIdentityMap. Without removing the caching of the relationship + * the Entity B's cache effectively become a FullIdentityMap. + * + * @author Gordon Yorke + * @since EclipseLink 2.2 + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Noncacheable { +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ObjectTypeConverter.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ObjectTypeConverter.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ObjectTypeConverter.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ObjectTypeConverter.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ObjectTypeConverters.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ObjectTypeConverters.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ObjectTypeConverters.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ObjectTypeConverters.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 08/19/2010-2.2 Guy Pelletier + * - 282773: Add plural converter annotations + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * An ObjectTypeConverters annotation allows the definition of multiple + * ObjectTypeConverter. + * + * @see org.eclipse.persistence.annotations.ObjectTypeConverter + * + * @author Guy Pelletier + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface ObjectTypeConverters { + /** + * (Required) An array of object type converter. + */ + ObjectTypeConverter[] value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/OptimisticLocking.java eclipselink-2.5.1/org/eclipse/persistence/annotations/OptimisticLocking.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/OptimisticLocking.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/OptimisticLocking.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/OptimisticLockingType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/OptimisticLockingType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/OptimisticLockingType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/OptimisticLockingType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/OrderCorrection.java eclipselink-2.5.1/org/eclipse/persistence/annotations/OrderCorrection.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/OrderCorrection.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/OrderCorrection.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/OrderCorrectionType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/OrderCorrectionType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/OrderCorrectionType.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/OrderCorrectionType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Partitioned.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Partitioned.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Partitioned.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Partitioned.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Partitioning is used to partition the data for a class across multiple difference databases + * or across a database cluster such as Oracle RAC. + * Partitioning can provide improved scalability by allowing multiple database machines to service requests. + * This annotation configures the named partitioning policy to be used for this Entity or relationship. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * + * @see Partitioning + * @see RoundRobinPartitioning + * @see ReplicationPartitioning + * @see RangePartitioning + * @see ValuePartitioning + * @see HashPartitioning + * @see PinnedPartitioning + * @see UnionPartitioning + * @see org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Partitioned { + /** + * (Required) name of partitioning policy to use. + */ + String value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Partitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Partitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Partitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Partitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A Partitioning is used to partition the data for a class across multiple difference databases + * or across a database cluster such as Oracle RAC. + * Partitioning can provide improved scalability by allowing multiple database machines to service requests. + * This annotation configures a custom PartitioningPolicy. + *

+ * If multiple partitions are used to process a single transaction, JTA should be used for proper XA transaction support. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Partitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * (Required) Full package.class name of a subclass of PartitioningPolicy. + */ + Class partitioningClass(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/PinnedPartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/PinnedPartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/PinnedPartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/PinnedPartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * PinnedPartitionPolicy pins requests to a single connection pool. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.PinnedPartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface PinnedPartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * The connection pool name to pin queries to. + */ + String connectionPool(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/PrimaryKey.java eclipselink-2.5.1/org/eclipse/persistence/annotations/PrimaryKey.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/PrimaryKey.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/PrimaryKey.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/PrivateOwned.java eclipselink-2.5.1/org/eclipse/persistence/annotations/PrivateOwned.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/PrivateOwned.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/PrivateOwned.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Properties.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Properties.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Properties.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Properties.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Property.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Property.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Property.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Property.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/QueryRedirectors.java eclipselink-2.5.1/org/eclipse/persistence/annotations/QueryRedirectors.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/QueryRedirectors.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/QueryRedirectors.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/RangePartition.java eclipselink-2.5.1/org/eclipse/persistence/annotations/RangePartition.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/RangePartition.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/RangePartition.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Represent a specific range partition. + * Values >= startValue and <= endValue will be routed to the connection pool. + * + * @see RangePartitioning + * @see org.eclipse.persistence.descriptors.partitioning.RangePartitioningPolicy + * @see org.eclipse.persistence.descriptors.partitioning.RangePartition + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface RangePartition { + /** The String representation of the range start value. */ + String startValue() default ""; + /** The String representation of the range start value. */ + String endValue() default ""; + /** The connection pool to route queries to for this range. */ + String connectionPool(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/RangePartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/RangePartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/RangePartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/RangePartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.persistence.Column; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * RangePartitioningPolicy partitions access to a database cluster by a field value from the object, + * such as the object's id, location, or tenant. + * Each server is assigned a range of values. + * All write or read request for object's with that value are sent to the server. + * If a query does not include the field as a parameter, then it can either be sent + * to all server's and unioned, or left to the sesion's default behavior. + *

+ * If multiple partitions are used to process a single transaction, JTA should be used for proper XA transaction support. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.RangePartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface RangePartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * The database column or query parameter to partition queries by. + * This is the table column name, not the class attribute name. + * The column value must be included in the query and should normally be part of the object's Id. + * This can also be the name of a query parameter. + * If a query does not contain the field the query will not be partitioned. + */ + Column partitionColumn(); + + /** + * (Required) List of connection pool names to load balance across. + */ + RangePartition[] partitions(); + + /** The type of the start and end values. */ + Class partitionValueType() default String.class; + + /** + * Defines if queries that do not contain the partition field should be sent + * to every database and have the result unioned. + */ + boolean unionUnpartitionableQueries() default false; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ReadOnly.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ReadOnly.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ReadOnly.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ReadOnly.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ReadTransformer.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ReadTransformer.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ReadTransformer.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ReadTransformer.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ReplicationPartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ReplicationPartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ReplicationPartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ReplicationPartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * ReplicationPartitioning sends requests to a set of connection pools. + * It is for replicating data across a cluster of database machines. + * Only modification queries are replicated. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.ReplicationPartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface ReplicationPartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * List of connection pool names to load balance across. + * Defaults to all defined pools in the ServerSession. + */ + String[] connectionPools() default {}; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ReturnInsert.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ReturnInsert.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ReturnInsert.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ReturnInsert.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -32,5 +32,10 @@ @Target({METHOD, FIELD}) @Retention(RUNTIME) public @interface ReturnInsert { + + /** + * Set return only to true if you want the mapping field to be excluded + * from the INSERT clause during SQL generation. + */ boolean returnOnly() default false; } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ReturnUpdate.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ReturnUpdate.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ReturnUpdate.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ReturnUpdate.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/RoundRobinPartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/RoundRobinPartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/RoundRobinPartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/RoundRobinPartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * RoundRobinPartitioning sends requests in a round robin fashion to the set of connection pools. + * It is for load-balancing read queries across a cluster of database machines. + * It requires that the full database be replicated on each machine, so does not support partitioning. + * The data should either be read-only, or writes should be replicated on the database. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.RoundRobinPartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface RoundRobinPartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * List of connection pool names to load balance across. + * Defaults to all defined pools in the ServerSession. + */ + String[] connectionPools() default {}; + + /** + * This allows for a set of database to be written to and kept in synch, + * and have reads load-balanced across the databases. + */ + boolean replicateWrites() default false; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/SerializedObject.java eclipselink-2.5.1/org/eclipse/persistence/annotations/SerializedObject.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/SerializedObject.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/SerializedObject.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,95 @@ +/******************************************************************************* + * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 24 April 2013-2.5.1 ailitche + * SerializedObjectPolicy initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.persistence.Column; + +/** + * SerializedObject annotation is used to set an + * org.eclipse.persistence.descriptors.SerializedObjectPolicy on an Entity or MappedSuperClass. + * + * If SerializedObjectPolicy is specified Eclipselink writes out the whole entity object with its + * privately owned (and nested privately owned) entities and element collections into an additional + * (likely BLOB) field in the database. That field could be specified in the annotation, it defaults to "SOP" in the main table. + * + *

+ * Examples: + *

+ * @Entity
+ * @SerializedObject(MySerializedObjectPolicy.class); 
+ * public class Employee {...
+ * 
+ *
+ * @Entity
+ * @SerializedObject(value = MySerializedObjectPolicy.class, column = @Column(name="SERIALIZED")); 
+ * public class Address {...
+ * 
+ * + * If SerializedObjectPolicy is set on an entity then SerializedObjectPolicies with the same field are set + * on all inheriting entities. + * + * The query that uses SerializedObjectPolicy extracts the whole object from that field. + * To read object(s) using SerializedObjectPolicy the query should specify + * @see QueryHints#SERIALIZED_OBJECT + * + *

+ * Examples: + *

+ * Query query = em.createQuery("SELECT e FROM Employee e").setHint(QueryHints.SERIALIZED_OBJECT, "true");
+ * 
+ *
+ * Map hints = new HashMap();
+ * hints.put("eclipselink.serialized-object", "true");
+ * Address address = em.find(Address.class, id, hints);
+ * 
+ * + * The goal is to make reads from the database faster. + * The draw back is slower writes into the database. + * So SerializedObjectPolicy may make sense for read-only / read-mostly application + * for Entity, which always loads all its dependent entities and / or ElementCollections. + * + * In case the serialized object column contains null or obsolete version of the object + * the query using SerializedObjectPolicy would either throw exception or - if all other fields have been read, too - + * would build the object using these fields (exactly as in case SerializedObjectPolicy is not used). + * + * Note that currently no default implementation of SerializedObjectPolicy is available + * and this class should be provided by the user. + * + * @see org.eclipse.persistence.descriptors.SerializedObject + * + * @author ailitche + * @since EclipseLink 2.5.1 + * + * @see SerializedObjectPolicy + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface SerializedObject { + /** + * The Class that implements org.eclipse.persistence.descriptors.SerializedObjectPolicy interface. + * This class must be specified. + */ + Class value(); + + /** + * (Optional) The column that holds the serialized object. By default it's a BLOB column named "SOP" in entity's main table. + */ + Column column() default @Column(name="SOP"); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/StoredProcedureParameter.java eclipselink-2.5.1/org/eclipse/persistence/annotations/StoredProcedureParameter.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/StoredProcedureParameter.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/StoredProcedureParameter.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -9,12 +9,16 @@ * * Contributors: * Oracle - initial API and implementation from Oracle TopLink + * 02/08/2012-2.4 Guy Pelletier + * - 350487: JPA 2.1 Specification defined support for Stored Procedure Calls ******************************************************************************/ package org.eclipse.persistence.annotations; import java.lang.annotation.Retention; import java.lang.annotation.Target; +import javax.persistence.ParameterMode; + import static java.lang.annotation.RetentionPolicy.RUNTIME; import static org.eclipse.persistence.annotations.Direction.IN; @@ -32,8 +36,15 @@ public @interface StoredProcedureParameter { /** * (Optional) The direction of the stored procedure parameter. + * @deprecated + * @see mode() */ Direction direction() default IN; + + /** + * (Optional) The direction of the stored procedure parameter. + */ + ParameterMode mode() default ParameterMode.IN; /** * (Optional) Stored procedure parameter name. @@ -44,7 +55,12 @@ * (Required) The query parameter name. */ String queryParameter(); - + + /** + * (Optional) Define if the parameter is required, or optional and defaulted by the procedure. + */ + boolean optional() default false; + /** * (Optional) The type of Java class desired back from the procedure, * this is dependent on the type returned from the procedure. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Struct.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Struct.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Struct.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Struct.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Struct types are extended object-relational data-types supported by some databases. + * Struct types are user define types in the database such as OBJECT types on Oracle. + * Structs can normally contains Arrays (VARRAY) or other Struct types, and can be stored in + * a column or a table. + *

+ * This annotation define a class to map to a database Struct type. + * The class should normally be an Embeddable, but could also be an Entity if stored in a object table. + * + * @see org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor + * @see org.eclipse.persistence.mappings.structures.StructureMapping + * @author James Sutherland + * @since EclipseLink 2.3 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface Struct { + /** + * (Required) The database name of the database structure type. + */ + String name(); + + /** + * (Optional) Defines the order of the fields contained in the database structure type. + */ + String[] fields() default {}; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/StructConverter.java eclipselink-2.5.1/org/eclipse/persistence/annotations/StructConverter.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/StructConverter.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/StructConverter.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -20,6 +20,15 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; +/** + * A StructConverter is a special type of converter that handles the conversion of a specific + * database Struct type. This is normally used for extended database types such as spatial geometric types. + * + * A StructConverter is different than a regular attribute Converter, and does not implement the same interface. + * A StructConverter will be used to convert any matching Struct type. + * + * @see org.eclipse.persistence.platform.database.converters.StructConverter + */ @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) public @interface StructConverter { @@ -30,12 +39,15 @@ String name(); /** - * (Required) The converter class to be used. This class must implement the + * (Required) The StructConverter class to be used. This class must implement the * EclipseLink org.eclipse.persistence.platform.database.converters.StructConverter * interface. * * You may also alternatively specify a pre-defined EclipseLink - * org.eclipse.persistence.config.StructConverterType + * org.eclipse.persistence.config.StructConverterType + * + * @see org.eclipse.persistence.platform.database.converters.StructConverter + * @see org.eclipse.persistence.config.StructConverterType */ String converter(); } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/StructConverters.java eclipselink-2.5.1/org/eclipse/persistence/annotations/StructConverters.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/StructConverters.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/StructConverters.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 08/19/2010-2.2 Guy Pelletier + * - 282773: Add plural converter annotations + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A StructConverters annotation allows the definition of multiple + * StructConverter. + * + * @see org.eclipse.persistence.annotations.StructConverter + * + * @author Guy Pelletier + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface StructConverters { + /** + * (Required) An array of struct converter. + */ + StructConverter[] value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Structure.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Structure.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Structure.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Structure.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Struct types are extended object-relational data-types supported by some databases. + * Struct types are user define types in the database such as OBJECT types on Oracle. + * Structs can normally contains Arrays (VARRAY) or other Struct types, and can be stored in + * a column or a table. + *

+ * This annotation can be defined on a field/method to define an StructureMapping to an embedded Struct type. + * The target Embeddable must be mapped using the Struct annotation. + * + * @see Struct + * @see org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor + * @see org.eclipse.persistence.mappings.structures.StructureMapping + * @author James Sutherland + * @since EclipseLink 2.3 + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Structure { +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantDiscriminatorColumn.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantDiscriminatorColumn.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantDiscriminatorColumn.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantDiscriminatorColumn.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 03/24/2011-2.3 Guy Pelletier + * - 337323: Multi-tenant with shared schema support (part 1) + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.persistence.DiscriminatorType; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Tenant discriminator column(s) are used with a SINGLE_TABLE multitenant + * strategy. Tenant discriminator column(s) are completely user specified and + * there is no limit on how many tenant discriminator columns an application + * can define (using the TenantDiscriminatorColumns annotation) + * + * Tenant discriminator column(s) can be specified at the Entity or + * MappedSuperclass level and must always be accompanied with a + * Multitenant(SINGLE_TABLE) specification. It is not sufficient to specify + * only tenant discriminator column(s). + * + * @see org.eclipse.persistence.annotations.TenantDiscriminatorColumns + * @see org.eclipse.persistence.annotations.Multitenant + * @see org.eclipse.persistence.annotations.MultitenantType + * + * @author Guy Pelletier + * @since EclipseLink 2.3 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface TenantDiscriminatorColumn { + /** + * (Optional) The name of column to be used for the tenant discriminator. + */ + String name() default "TENANT_ID"; + + /** + * (Optional) The name of the context property to apply to the + * tenant discriminator column. + */ + String contextProperty() default "eclipselink.tenant-id"; + + /** + * (Optional) The type of object/column to use as a class discriminator. + * Defaults to {@link DiscriminatorType#STRING DiscriminatorType.STRING}. + */ + DiscriminatorType discriminatorType() default DiscriminatorType.STRING; + + /** + * (Optional) The SQL fragment that is used when generating the DDL + * for the discriminator column. + *

Defaults to the provider-generated SQL to create a column + * of the specified discriminator type. + */ + String columnDefinition() default ""; + + /** + * (Optional) The column length for String-based discriminator types. + * Ignored for other discriminator types. + */ + int length() default 31; + + /** + * (Optional) The name of the table that contains the column. + * If absent the column is assumed to be in the primary table. + */ + String table() default ""; + + /** + * Specifies that the tenant discriminator column is part of the primary + * key of the tables. + */ + boolean primaryKey() default false; +} + diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantDiscriminatorColumns.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantDiscriminatorColumns.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantDiscriminatorColumns.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantDiscriminatorColumns.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 03/24/2011-2.3 Guy Pelletier + * - 337323: Multi-tenant with shared schema support (part 1) + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A TenantDiscriminatorColumns annotation allows the definition of multiple + * TenantDiscriminatorColumn. + * + * @see org.eclipse.persistence.annotations.TenantDiscriminatorColumn + * @author Guy Pelletier + * @since EclipseLink 2.3 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface TenantDiscriminatorColumns { + /** + * (Required) One or more TenantDiscriminatorColumn annotations. + */ + TenantDiscriminatorColumn[] value(); +} + diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantTableDiscriminator.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantTableDiscriminator.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantTableDiscriminator.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantTableDiscriminator.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 14/05/2012-2.4 Guy Pelletier + * - 376603: Provide for table per tenant support for multitenant applications + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import org.eclipse.persistence.config.PersistenceUnitProperties; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + *

+ * A tenant table discriminator is used with a TABLE_PER_TENANT multitenant + * strategy. The tenant table discriminator describes the type of table + * discriminator to use. The user may choose their own tenant identifier + * property or use the default property: + * + * org.eclipse.persistence.config.PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT = "eclipselink.tenant-id" + * + *

+ * Tenant table discriminator can be specified at the Entity or MappedSuperclass + * level and must always be accompanied with a Multitenant(TABLE_PER_TENANT) + * specification. It is not sufficient to specify only a tenant table discriminator. + * + * @see org.eclipse.persistence.annotations.TenantTableDiscriminator + * @see org.eclipse.persistence.annotations.Multitenant + * @see org.eclipse.persistence.annotations.MultitenantType + * + * @author Guy Pelletier + * @since EclipseLink 2.4 + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface TenantTableDiscriminator { + /** + * (Optional) The name of the context property to apply to as + * tenant table discriminator. Default is "eclipselink-tenant.id" + */ + String contextProperty() default PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT; + + /** + * (Optional) The type of tenant table discriminator to use with the tables + * of the persistence unit. + * Defaults to {@link TenantTableDiscriminatorType#SUFFIX TenantTableDiscriminatorType.SUFFIX}. + */ + TenantTableDiscriminatorType type() default TenantTableDiscriminatorType.SUFFIX; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantTableDiscriminatorType.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantTableDiscriminatorType.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TenantTableDiscriminatorType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TenantTableDiscriminatorType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 14/05/2012-2.4 Guy Pelletier + * - 376603: Provide for table per tenant support for multitenant applications + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +/** + * An enum that is used within the TenantTableDiscriminator annotation. + * + * @author Guy Pelletier + * @since EclipseLink 2.4 + */ +public enum TenantTableDiscriminatorType { + /** + * Apply the tenant table discriminator as a schema to all multitenant tables. + * NOTE: this strategy requires appropriate database provisioning. + */ + SCHEMA, + + /** + * Apply the tenant table discriminator as a suffix to all multitenant tables. This + * is the default strategy. + */ + SUFFIX, + + /** + * Apply the tenant table discriminator as a prefix to all multitenant tables. + */ + PREFIX +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TimeOfDay.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TimeOfDay.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TimeOfDay.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TimeOfDay.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/Transformation.java eclipselink-2.5.1/org/eclipse/persistence/annotations/Transformation.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/Transformation.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/Transformation.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TransientCompatibleAnnotations.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TransientCompatibleAnnotations.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TransientCompatibleAnnotations.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TransientCompatibleAnnotations.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -43,6 +43,7 @@ transientCompatibleAnnotations.add("javax.persistence.PersistenceContext"); transientCompatibleAnnotations.add("javax.persistence.PersistenceContexts"); transientCompatibleAnnotations.add("javax.persistence.Access"); + transientCompatibleAnnotations.add("javax.persistence.Transient"); } return transientCompatibleAnnotations; } diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TypeConverter.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TypeConverter.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TypeConverter.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TypeConverter.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/TypeConverters.java eclipselink-2.5.1/org/eclipse/persistence/annotations/TypeConverters.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/TypeConverters.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/TypeConverters.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * 08/19/2010-2.2 Guy Pelletier + * - 282773: Add plural converter annotations + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * A TypeConverters annotation allows the definition of multiple TypeConverter. + * + * @see org.eclipse.persistence.annotations.TypeConverter + * + * @author Guy Pelletier + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface TypeConverters { + /** + * (Required) An array of type converter. + */ + TypeConverter[] value(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/UnionPartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/UnionPartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/UnionPartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/UnionPartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * UnionPartitioning sends queries to all connection pools and unions the results. + * This is for queries or relationships that span partitions when partitioning is used, + * such as on a ManyToMany cross partition relationship. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.UnionPartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface UnionPartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * List of connection pool names to load balance across. + * Defaults to all defined pools in the ServerSession. + */ + String[] connectionPools() default {}; + + /** + * Defines if write queries should be replicated. + * Writes are normally not replicated when unioning, + * but can be for ManyToMany relationships, when the join table needs to be replicated. + */ + boolean replicateWrites() default false; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/UuidGenerator.java eclipselink-2.5.1/org/eclipse/persistence/annotations/UuidGenerator.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/UuidGenerator.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/UuidGenerator.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.persistence.GeneratedValue; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Defines a primary key generator that may be + * referenced by name when a generator element is specified for + * the {@link GeneratedValue} annotation. A UUID generator + * may be specified on the entity class or on the primary key + * field or property. The scope of the generator name is global + * to the persistence unit (across all generator types). + * + *

+ *    Example 1:
+ *    
+ *    @Entity public class Employee {
+ *        ...
+ *        @UuidGenerator(name="uuid")
+ *        @Id
+ *        @GeneratedValue(generator="uuid")
+ *        int id;
+ *        ...
+ *    }
+ * 
+ * + * @see javax.persistence.GeneratedValue + * @author James Sutherland + * @since EclipseLink 2.4 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface UuidGenerator { + /** + * The name of the UUID generator, names must be unique for the persistence unit. + */ + String name(); + +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ValuePartition.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ValuePartition.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ValuePartition.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ValuePartition.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Represent a specific value partition. + * The value will be routed to the connection pool. + * + * @see ValuePartitioning + * @see org.eclipse.persistence.descriptors.partitioning.ValuePartitioningPolicy + * @see org.eclipse.persistence.descriptors.partitioning.ValuePartition + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface ValuePartition { + /** The String representation of the value. */ + String value(); + + /** The connection pool to route queries to for this value. */ + String connectionPool(); +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/ValuePartitioning.java eclipselink-2.5.1/org/eclipse/persistence/annotations/ValuePartitioning.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/ValuePartitioning.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/ValuePartitioning.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * James Sutherland - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.persistence.Column; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * ValuePartitioning partitions access to a database cluster by a field value from the object, + * such as the object's location, or tenant. + * Each value is assigned a specific server. + * All write or read request for object's with that value are sent to the server. + * If a query does not include the field as a parameter, then it can either be sent + * to all server's and unioned, or left to the sesion's default behavior. + *

+ * Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. + * Partition policies are globally named to allow reuse, + * the partitioning policy must also be set using the @Partitioned annotation to be used. + * + * @see Partitioned + * @see org.eclipse.persistence.descriptors.partitioning.ValuePartitioningPolicy + * @author James Sutherland + * @since EclipseLink 2.2 + */ +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface ValuePartitioning { + /** + * The name of the partition policy, names must be unique for the persistence unit. + */ + String name(); + + /** + * The database column or query parameter to partition queries by. + * This is the table column name, not the class attribute name. + * The column value must be included in the query and should normally be part of the object's Id. + * This can also be the name of a query parameter. + * If a query does not contain the field the query will not be partitioned. + */ + Column partitionColumn(); + + /** Store the value partitions. Each partition maps a value to a connectionPool. */ + ValuePartition[] partitions(); + + /** The type of the start and end values. */ + Class partitionValueType() default String.class; + + /** The default connection pool is used for any unmapped values. */ + String defaultConnectionPool() default ""; + + /** + * Defines if queries that do not contain the partition field should be sent + * to every database and have the result unioned. + */ + boolean unionUnpartitionableQueries() default false; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/VariableOneToOne.java eclipselink-2.5.1/org/eclipse/persistence/annotations/VariableOneToOne.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/VariableOneToOne.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/VariableOneToOne.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/VirtualAccessMethods.java eclipselink-2.5.1/org/eclipse/persistence/annotations/VirtualAccessMethods.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/VirtualAccessMethods.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/VirtualAccessMethods.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * tware - initial implementation as part of extensibility feature + ******************************************************************************/ +package org.eclipse.persistence.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Specifies that this class contains virtual attributes. + * This annotation is used in an EclipseLink-specific way to define + * access methods used by mappings with accessType=VIRTUAL. + * The xml-equivalent is the tag + */ +@Documented +@Target(TYPE) +@Retention(RUNTIME) +public @interface VirtualAccessMethods { + + /** + * (Optional) The name of the getter method to use for the virtual property + * This method must take a single java.lang.String parameter and return a java.lang.Object. + * If setMethod is specified, getMethod must be specified + */ + String get() default "get"; + + /** + * (Optional) The name of the setter method to use for the virtual property + * This method must take a java.lang.String parameter and a java.lang.Object parameter. + * If getMethod is specified, setMethod must be specified + */ + String set() default "set"; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/WriteTransformer.java eclipselink-2.5.1/org/eclipse/persistence/annotations/WriteTransformer.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/WriteTransformer.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/WriteTransformer.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/annotations/WriteTransformers.java eclipselink-2.5.1/org/eclipse/persistence/annotations/WriteTransformers.java --- eclipselink-2.1.3/org/eclipse/persistence/annotations/WriteTransformers.java 2010-11-03 19:10:36.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/annotations/WriteTransformers.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/BatchWriting.java eclipselink-2.5.1/org/eclipse/persistence/config/BatchWriting.java --- eclipselink-2.1.3/org/eclipse/persistence/config/BatchWriting.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/BatchWriting.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -12,15 +12,28 @@ ******************************************************************************/ package org.eclipse.persistence.config; +import org.eclipse.persistence.internal.databaseaccess.BatchWritingMechanism; + /** * Specify the use of batch writing to optimize transactions with multiple writes, * by default batch writing is not used. + * Batch writing allows multiple heterogeneous dynamic SQL statements to be sent to the database as a single + * execution, or multiple homogeneous parameterized SQL statements to be executed as a single batch execution. + *

Note that not all JDBC drivers, or databases support batch writing. * *

JPA persistence property Usage: * *

properties.add(PersistenceUnitProperties.BATCH_WRITING, BatchWriting.JDBC); * *

Property values are case-insensitive + * + *

    + *
  • JDBC - JDBC batch API's are used (dynamic, or parameterized). + *
  • Bufferred - dynamic SQL is concatenated into a batch SQL string. + *
  • Oracle-JDBC - Oracle JDBC batch API's are used (allows row count to be returned for optimistic locking). + *
  • <custom-class> - A custom class that extends the BatchWritingMechansim class. + *
+ * @see BatchWritingMechanism */ public class BatchWriting { public static final String None = "None"; diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/CacheCoordinationProtocol.java eclipselink-2.5.1/org/eclipse/persistence/config/CacheCoordinationProtocol.java --- eclipselink-2.1.3/org/eclipse/persistence/config/CacheCoordinationProtocol.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/CacheCoordinationProtocol.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation from Oracle TopLink + ******************************************************************************/ +package org.eclipse.persistence.config; + +/** + * Cache coordination protocol persistence property values. + * + *

JPA persistence property Usage: + * + *

properties.add(PersistenceUnitProperties.COORDINATION_PROTOCOL, CacheCoordinationProtocol.RMI); + *

Property values are case-insensitive. + * + * @see PersistenceUnitProperties#COORDINATION_PROTOCOL + */ +public class CacheCoordinationProtocol { + public static final String RMI = "rmi"; + public static final String RMIIIOP = "rmi-iiop"; + public static final String JMS = "jms"; + public static final String JMSPublishing = "jms-publishing"; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/CacheIsolationType.java eclipselink-2.5.1/org/eclipse/persistence/config/CacheIsolationType.java --- eclipselink-2.1.3/org/eclipse/persistence/config/CacheIsolationType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/CacheIsolationType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Gordon Yorke - initial API and implementation + ******************************************************************************/ +package org.eclipse.persistence.config; + +import org.eclipse.persistence.descriptors.ClassDescriptor; + +/** + * Options for how Entity instances should be shared within an EclipseLink Persistence Unit / ServerSession + * @see ClassDescriptor#setCacheIsolationType(CacheIsolationType) + * @see org.eclipse.persistence annotations.Cache + * @author Gordon Yorke + * @since EclipseLink 2.2 + */ + +public enum CacheIsolationType { + // These enums are ordered with ascending protective requirements + // This is intentional and any additions/alterations should take that into account + + /** + * Entity instances will be cached within the EntityManagerFactory/ServerSession level. + * Any user queries for shared cache instances (ie Read-Only query hint) will return an Entity + * instance that may be shared by multiple clients. + * + * This setting is the default isolation level. + */ + SHARED, + + /** + * Entity state information will be cached in the shared cache but Entity + * instances will not be shared. Any user queries for shared cache instances + * (ie Read-Only query hint) will return a new Entity instance with the cached state. + * This will ensure the instance is protected from any concurrent + * state change. + */ + PROTECTED, + + /** + * The Entity and its data is not stored in the shared cache but is + * isolated to the Persistence Context/UnitOfWork or + * IsolatedClientSession. This setting effectively disables second level + * caching for this entity and should be used when users do not want caching for + * a particular Entity. + */ + ISOLATED; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/CacheType.java eclipselink-2.5.1/org/eclipse/persistence/config/CacheType.java --- eclipselink-2.1.3/org/eclipse/persistence/config/CacheType.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/CacheType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/CacheUsage.java eclipselink-2.5.1/org/eclipse/persistence/config/CacheUsage.java --- eclipselink-2.1.3/org/eclipse/persistence/config/CacheUsage.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/CacheUsage.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/CacheUsageIndirectionPolicy.java eclipselink-2.5.1/org/eclipse/persistence/config/CacheUsageIndirectionPolicy.java --- eclipselink-2.1.3/org/eclipse/persistence/config/CacheUsageIndirectionPolicy.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/CacheUsageIndirectionPolicy.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/CascadePolicy.java eclipselink-2.5.1/org/eclipse/persistence/config/CascadePolicy.java --- eclipselink-2.1.3/org/eclipse/persistence/config/CascadePolicy.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/CascadePolicy.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/DescriptorCustomizer.java eclipselink-2.5.1/org/eclipse/persistence/config/DescriptorCustomizer.java --- eclipselink-2.1.3/org/eclipse/persistence/config/DescriptorCustomizer.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/DescriptorCustomizer.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/EntityManagerProperties.java eclipselink-2.5.1/org/eclipse/persistence/config/EntityManagerProperties.java --- eclipselink-2.1.3/org/eclipse/persistence/config/EntityManagerProperties.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/EntityManagerProperties.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -54,11 +54,30 @@ * in that case it affects all EntityManagers created by the factory. * The property cannot be applied to existing active persistence unit context. * The context could be removed by calling clear method on the EntityManager when there is no active transaction. - * @see org.eclipse.persistence.sessions.factories.ReferenceMode + * @see org.eclipse.persistence.config.ReferenceMode */ public static final String PERSISTENCE_CONTEXT_REFERENCE_MODE = PersistenceUnitProperties.PERSISTENCE_CONTEXT_REFERENCE_MODE; /** + * The "eclipselink.tenant-id" property specifies the + * default context property used to populate multitenant entities. + * + * NOTE: This is merely a default multitenant property than can be used on + * its own or with other properties defined by the user. Users are not + * obligated to use this property and are free to specify their own. + * + * Example: persistence.xml file + * + * Example: property Map + * propertiesMap.put(PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT, "Oracle"); + * + * + * @see org.eclipse.persistence.annotations.Multitenant + * @see org.eclipse.persistence.annotations.TenantDiscriminatorColumn + */ + public static final String MULTITENANT_PROPERTY_DEFAULT = PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT; + + /** * Specifies that the EntityManager will be closed or not used after commit (not extended). * In general this is normally always the case for a container managed EntityManager, * and common for application managed. @@ -241,6 +260,27 @@ */ public static final String FLUSH_CLEAR_CACHE = PersistenceUnitProperties.FLUSH_CLEAR_CACHE; + /** + * The property may be passed to createEntityManager method of a composite persistence unit + * to pass properties to member persistence units. + * The value is a map: + * the key is a member persistence unit's name, + * the value is a map of properties to be passed to this persistence unit. + * "eclipselink.composite-unit.properties" -> ( + * ("memberPu1" -> ( "javax.persistence.jdbc.user" -> "user1", + * "javax.persistence.jdbc.password" -> "password1", + * "javax.persistence.jdbc.driver" -> "oracle.jdbc.OracleDriver", + * "javax.persistence.jdbc.url" -> "jdbc:oracle:thin:@oracle_db_url:1521:db", + * ) , + * ("memberPu2" -> ( "javax.persistence.jdbc.user" -> "user2", + * "javax.persistence.jdbc.password" -> "password2" + * "javax.persistence.jdbc.driver" -> "com.mysql.jdbc.Driver", + * "javax.persistence.jdbc.url" -> "jdbc:mysql://my_sql_db_url:3306/user2", + * ) + * ) + */ + public static final String COMPOSITE_UNIT_PROPERTIES = PersistenceUnitProperties.COMPOSITE_UNIT_PROPERTIES; + private static final Set supportedProperties = new HashSet() { { @@ -263,6 +303,7 @@ add(VALIDATE_EXISTENCE); add(ORDER_UPDATES); add(FLUSH_CLEAR_CACHE); + add(COMPOSITE_UNIT_PROPERTIES); } }; diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/ExclusiveConnectionMode.java eclipselink-2.5.1/org/eclipse/persistence/config/ExclusiveConnectionMode.java --- eclipselink-2.1.3/org/eclipse/persistence/config/ExclusiveConnectionMode.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/ExclusiveConnectionMode.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/FlushClearCache.java eclipselink-2.5.1/org/eclipse/persistence/config/FlushClearCache.java --- eclipselink-2.1.3/org/eclipse/persistence/config/FlushClearCache.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/FlushClearCache.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/HintValues.java eclipselink-2.5.1/org/eclipse/persistence/config/HintValues.java --- eclipselink-2.1.3/org/eclipse/persistence/config/HintValues.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/HintValues.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/LoggerType.java eclipselink-2.5.1/org/eclipse/persistence/config/LoggerType.java --- eclipselink-2.1.3/org/eclipse/persistence/config/LoggerType.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/LoggerType.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/ParameterDelimiterType.java eclipselink-2.5.1/org/eclipse/persistence/config/ParameterDelimiterType.java --- eclipselink-2.1.3/org/eclipse/persistence/config/ParameterDelimiterType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/ParameterDelimiterType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation from Oracle TopLink + * 10/29/2010-2.2 Michael O'Brien + * - 325167: Make reserved # bind parameter char generic to enable native SQL pass through + ******************************************************************************/ +package org.eclipse.persistence.config; + +/** + * Parameter delimiter char hint values. + * + * The class contains the default value for QueryHints.PARAMETER_DELIMITER query hint. + * A single char should be specified if the default hash symbol needs to be overridden. + *

i.e. "%" + * + * JPA Query Hint Usage: + * + *

query.setHint(QueryHints.PARAMETER_DELIMITER, "%"); + *

or + *

@QueryHint(name=QueryHints.PARAMETER_DELIMITER, value="%") + * + *

Hint values are case-insensitive. + * "" cannot be used - and will be replaced with the default value ParameterDelimiterType.DEFAULT + * + * @see QueryHints#PARAMETER_DELIMITER + */ +public class ParameterDelimiterType { + public static final String Hash = "#"; + public static final String DEFAULT = Hash; +} diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/ParserType.java eclipselink-2.5.1/org/eclipse/persistence/config/ParserType.java --- eclipselink-2.1.3/org/eclipse/persistence/config/ParserType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/ParserType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation from Oracle TopLink + ******************************************************************************/ +package org.eclipse.persistence.config; + +import org.eclipse.persistence.queries.JPAQueryBuilder; + +/** + * Parser type property values. + * + *

JPA persistence property Usage: + * + *

properties.add(PersistenceUnitProperties.JPQL_PARSER, ParserType.Hermes); + *

Property values are case-insensitive. + * + * @see JPAQueryBuilder + */ +public class ParserType { + public static final String Hermes = "Hermes"; + @Deprecated + public static final String ANTLR = "ANTLR"; + + public static final String DEFAULT = Hermes; +} + diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/ParserValidationType.java eclipselink-2.5.1/org/eclipse/persistence/config/ParserValidationType.java --- eclipselink-2.1.3/org/eclipse/persistence/config/ParserValidationType.java 1970-01-01 00:00:00.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/ParserValidationType.java 2013-09-18 00:39:50.000000000 +0000 @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 + * which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Oracle - initial API and implementation from Oracle TopLink + ******************************************************************************/ +package org.eclipse.persistence.config; + +/** + * Parser type property values. + * + *

JPA persistence property Usage: + * + *

properties.add(PersistenceUnitProperties.JPQL_VALIDATION, ParserValidationType.JPA21); + *

Property values are case-insensitive. + * + * @see JPAQueryBuilder + */ +public class ParserValidationType { + public static final String EclipseLink = "EclipseLink"; + public static final String JPA10 = "JPA 1.0"; + public static final String JPA20 = "JPA 2.0"; + public static final String JPA21 = "JPA 2.1"; + public static final String None = "None"; + + public static final String DEFAULT = EclipseLink; +} \ No newline at end of file diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/PersistenceUnitProperties.java eclipselink-2.5.1/org/eclipse/persistence/config/PersistenceUnitProperties.java --- eclipselink-2.1.3/org/eclipse/persistence/config/PersistenceUnitProperties.java 2010-11-03 19:10:42.000000000 +0000 +++ eclipselink-2.5.1/org/eclipse/persistence/config/PersistenceUnitProperties.java 2013-09-18 00:39:50.000000000 +0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2010 Oracle. All rights reserved. + * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -11,6 +11,22 @@ * Oracle - initial API and implementation from Oracle TopLink * dclarke - Bug 294985: update of comments and addition of connection logging property * cdelahun - Bug 214534: added COORDINATION_JMS_REUSE_PUBLISHER property to enable JMS rcm legacy behavior + * 04/01/2011-2.3 Guy Pelletier + * - 337323: Multi-tenant with shared schema support (part 2) + * 06/30/2011-2.3.1 Guy Pelletier + * - 341940: Add disable/enable allowing native queries + * 09/20/2011-2.3.1 Guy Pelletier + * - 357476: Change caching default to ISOLATED for multitenant's using a shared EMF. + * 12/24/2012-2.5 Guy Pelletier + * - 389090: JPA 2.1 DDL Generation Support + * 01/08/2013-2.5 Guy Pelletier + * - 389090: JPA 2.1 DDL Generation Support + * 01/11/2013-2.5 Guy Pelletier + * - 389090: JPA 2.1 DDL Generation Support + * 02/04/2013-2.5 Guy Pelletier + * - 389090: JPA 2.1 DDL Generation Support + * 02/19/2013-2.5 Guy Pelletier + * - 389090: JPA 2.1 DDL Generation Support ******************************************************************************/ package org.eclipse.persistence.config; @@ -27,19 +43,27 @@ import javax.persistence.Persistence; import org.eclipse.persistence.annotations.Cache; -import org.eclipse.persistence.annotations.CacheCoordinationType; import org.eclipse.persistence.exceptions.ExceptionHandler; +import org.eclipse.persistence.internal.databaseaccess.BatchWritingMechanism; +import org.eclipse.persistence.internal.helper.Helper; import org.eclipse.persistence.logging.SessionLog; import org.eclipse.persistence.platform.database.DatabasePlatform; +import org.eclipse.persistence.platform.database.events.DatabaseEventListener; import org.eclipse.persistence.platform.server.ServerPlatform; +import org.eclipse.persistence.queries.JPAQueryBuilder; import org.eclipse.persistence.sessions.DatabaseLogin; +import org.eclipse.persistence.sessions.Project; import org.eclipse.persistence.sessions.SessionEventListener; import org.eclipse.persistence.sessions.SessionProfiler; import org.eclipse.persistence.sessions.coordination.RemoteCommandManager; -import org.eclipse.persistence.sessions.factories.ReferenceMode; import org.eclipse.persistence.sessions.factories.SessionManager; +import org.eclipse.persistence.tools.profiler.PerformanceMonitor; +import org.eclipse.persistence.sessions.remote.RemoteSession; +import org.eclipse.persistence.sessions.serializers.Serializer; import org.eclipse.persistence.tools.profiler.PerformanceProfiler; import org.eclipse.persistence.tools.profiler.QueryMonitor; +import org.eclipse.persistence.tools.tuning.SafeModeTuner; +import org.eclipse.persistence.tools.tuning.SessionTuner; /** * The class defines EclipseLink persistence unit property names. These values @@ -53,7 +77,7 @@ * props.put(PersistenceUnitProperties.JDBC_USER, "user-name");
* props.put(PersistenceUnitProperties.JDBC_PASSWORD, "password");
*
- * EntityManagerFactory emf = Persistence.createENtityManagerFactory("pu-name", props); + * EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu-name", props); * *

* Property values are usually case-insensitive with some common sense @@ -168,9 +192,9 @@ public static final String NATIVE_SQL = "eclipselink.jdbc.native-sql"; /** - * The "eclipselink.jdbc.sql-cast" property specifies is + * The "eclipselink.jdbc.sql-cast" property specifies if * platform specific CAST SQL operations should be used. Casting is normally - * not required, and can cause issue when used. Allowed Values (String): + * not required, and can cause issues when used. Allowed Values (String): *