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 @@ - - -
- -June 23rd, 2010
-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: -
- -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.
-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.
---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:
--
-- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer.
-- 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.
-- 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.
-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.
-
--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.
-
--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:
--
-- javax.xml.bind_2.2.0.v201005080402.jar (jaxb-api.jar)
-- com.sun.xml.bind_2.2.0.v201004141950.jar (jaxb-impl.jar)
-- com.sun.tools.xjc_2.2.0.jar (jaxb.xjc.jar)
-
-- -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.
-
--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.
-
--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).
-
--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).
-
--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.
-
--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.
-
--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 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.
-
--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 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.
-
Target Date - June 2013
+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: +
+ +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.
+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.
+++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:
++
+- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer.
+- 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.
+- 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.
+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.
+
++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.
+
++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:
++
+- javax.xml.bind_2.2.0.v201105210648.jar (jaxb-api.jar)
+- com.sun.xml.bind_2.2.0.v201004141950.jar (jaxb-impl.jar)
+- com.sun.tools.xjc_2.2.0.jar (jaxb.xjc.jar)
+
++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.
+
++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).
+
++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).
+
++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.
+
++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.
+
++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 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.
+
++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.
+
++ + + 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 @@ -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.
+
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 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 + *
* 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 extends org.eclipse.persistence.descriptors.ClassExtractor> 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_
* Example:
+ *
+ * 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 extends PartitioningPolicy> 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:
+ *
+ * Examples:
+ *
+ * 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
+ * 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).
+ *
+ *
+ * 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 Note that not all JDBC drivers, or databases support batch writing.
*
* JPA persistence property Usage:
*
* Property values are case-insensitive
+ *
+ * JPA persistence property Usage:
+ *
+ * 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 i.e. "%"
+ *
+ * JPA Query Hint Usage:
+ *
+ * or
+ * 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:
+ *
+ * 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:
+ *
+ * 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
+ * Default: 180000 ms (3 minutes).
+ *
+ * The value specified should be a string containing a positive integer
+ * value. A value of 0 means wait forever.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_WAIT = "wait";
+
+ /**
+ * The
+ * The value specified should be a string containing a positive integer
+ * value.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_MAX = "max";
+
+ /**
+ * The
+ * Ignored in case external connection pools are used. Connections beyond
+ * the minimum will be disconnected when returned to the pool, so this
+ * should normally be equal to the number of active threads, or server's
+ * thread pool size. By default a single shared (exclusive) read/write pool
+ * is used with min/max 32 connections and 1 initial.
+ *
+ * The value specified should be a string containing a positive integer
+ * value.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_MIN = "min";
+
+ /**
+ * The
+ * The value specified should be a string containing a positive integer
+ * value.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_INITIAL = "initial";
+
+ /**
+ * The
+ * This property is ignored in case external connection pools are used.
+ *
+ * Values (case insensitive):
+ *
+ * A user defined connection pool can be configured or one of the following system pools:
+ *
+ * The following connection pool properties can be configured:
+ *
+ * Example:
+ *
+ * One of the following connection pool properties must be appended.
+ * @see #CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_WAIT
+ * @see #CONNECTION_POOL_USER
+ * @see #CONNECTION_POOL_PASSWORD
+ * @see #CONNECTION_POOL_URL
+ * @see #CONNECTION_POOL_JTA_DATA_SOURCE
+ * @see #CONNECTION_POOL_NON_JTA_DATA_SOURCE
+ * @see org.eclipse.persistence.sessions.server.ReadConnectionPool
+ */
+ public static final String CONNECTION_POOL_READ = "eclipselink.connection-pool.read.";
+
+ /**
+ * Allow configuring the
+ * One of the following connection pool properties must be appended.
+ * @see #CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_WAIT
+ * @see #CONNECTION_POOL_USER
+ * @see #CONNECTION_POOL_PASSWORD
+ * @see #CONNECTION_POOL_URL
+ * @see #CONNECTION_POOL_JTA_DATA_SOURCE
+ * @see #CONNECTION_POOL_NON_JTA_DATA_SOURCE
+ * @see org.eclipse.persistence.sessions.server.ReadConnectionPool
+ */
+ public static final String CONNECTION_POOL_SEQUENCE = "eclipselink.connection-pool.sequence.";
+
+ /**
+ * Tell EclipseLink to use it's internal connection pool to pool connections from a datasource.
+ *
+ * This property is useful when using EclipseLink with Gemini JPA because it internally wraps local
+ * database information in a datasource.
+ *
+ * Default: false
+ */
+ public static final String CONNECTION_POOL_INTERNALLY_POOL_DATASOURCE = "eclipselink.connection-pool.force-internal-pool";
+
+
+ /**
* The
* The value specified should be a string containing a positive integer
* value. A value of 0 means wait forever.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_WAIT
+ * @see #CONNECTION_POOL_WAIT
*/
+ @Deprecated
public static final String JDBC_CONNECTIONS_WAIT = "eclipselink.jdbc.connections.wait-timeout";
/**
@@ -203,7 +509,10 @@
*
* The value specified should be a string containing a positive integer
* value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_MAX
*/
+ @Deprecated
public static final String JDBC_CONNECTIONS_MAX = "eclipselink.jdbc.connections.max";
/**
@@ -218,7 +527,10 @@
*
* The value specified should be a string containing a positive integer
* value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MIN
*/
+ @Deprecated
public static final String JDBC_CONNECTIONS_MIN = "eclipselink.jdbc.connections.min";
/**
@@ -226,12 +538,15 @@
* EclipseLink JDBC (internal) connection pools properties. Initial number
* of connections in EclipseLink connection pool. This is the number of
* connections connected at startup. By default a single shared (exclusive)
- * read/write pool is used with min/max 32 connections and 1 initial.Ignored
+ * read/write pool is used with min/max 32 connections and 1 initial. Ignored
* in case external connection pools are used.
*
* The value specified should be a string containing a positive integer
* value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_INITIAL
*/
+ @Deprecated
public static final String JDBC_CONNECTIONS_INITIAL = "eclipselink.jdbc.connections.initial";
/**
@@ -241,12 +556,15 @@
* connection pool. If the maximum size is reached, threads requiring a
* connection will wait until one is released back to the pool. By default a
* single shared (exclusive) read/write pool is used with min/max 32
- * connections and 1 initial.Ignored in case external connection pools are
+ * connections and 1 initial. Ignored in case external connection pools are
* used.
*
* The value specified should be a string containing a positive integer
* value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_MAX
*/
+ @Deprecated
public static final String JDBC_WRITE_CONNECTIONS_MAX = "eclipselink.jdbc.write-connections.max";
/**
@@ -260,7 +578,10 @@
*
* The value specified should be a string containing a positive integer
* value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MIN
*/
+ @Deprecated
public static final String JDBC_WRITE_CONNECTIONS_MIN = "eclipselink.jdbc.write-connections.min";
/**
@@ -270,10 +591,12 @@
* read/write pool is used with min/max 32 connections and 1 initial.
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value must be a string containing a zero or greater integer value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_INITIAL
*/
+ @Deprecated
public static final String JDBC_WRITE_CONNECTIONS_INITIAL = "eclipselink.jdbc.write-connections.initial";
/**
@@ -286,14 +609,16 @@
* initial.
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value specified should be a string containing a zero or greater
* integer value.
*
* @see #JDBC_CONNECTIONS_WAIT to configure the timeout waiting on a
* connection.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_MAX
*/
+ @Deprecated
public static final String JDBC_READ_CONNECTIONS_MAX = "eclipselink.jdbc.read-connections.max";
/**
@@ -306,11 +631,13 @@
* used with min/max 32 connections and 1 initial.
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value specified should be a string containing a zero or greater
* integer value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MIN
*/
+ @Deprecated
public static final String JDBC_READ_CONNECTIONS_MIN = "eclipselink.jdbc.read-connections.min";
/**
@@ -320,10 +647,12 @@
* read/write pool is used with min/max 32 connections and 1 initial.
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value must be a string containing a zero or greater integer value.
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_INITIAL
*/
+ @Deprecated
public static final String JDBC_READ_CONNECTIONS_INITIAL = "eclipselink.jdbc.read-connections.initial";
/**
@@ -333,15 +662,16 @@
* connection will be used concurrently for multiple reading threads.
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* Values (case insensitive):
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value must be a string containing a zero or greater integer value.
* The default value is two (2).
@@ -362,7 +691,10 @@
* @see #JDBC_SEQUENCE_CONNECTION_POOL Required to configure the use of a
* sequence pool/data-source
* @see #JDBC_CONNECTIONS_WAIT to configure the timeout
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_MAX
*/
+ @Deprecated
public static final String JDBC_SEQUENCE_CONNECTION_POOL_MAX = "eclipselink.jdbc.sequence-connection-pool.max";
/**
@@ -376,14 +708,16 @@
* is allocated on the write connection).
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value must be a string containing a zero or greater integer value.
* The default value is two (2).
*
* @see #JDBC_SEQUENCE_CONNECTION_POOL Required to configure the use of a
* sequence pool/data-source
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MIN
*/
+ @Deprecated
public static final String JDBC_SEQUENCE_CONNECTION_POOL_MIN = "eclipselink.jdbc.sequence-connection-pool.min";
/**
@@ -395,14 +729,16 @@
* is allocated on the write connection).
*
* This property is ignored in case external connection pools are used.
- * Initial number of connections in EclipseLink write connection pool.
*
* The value must be a string containing a zero or greater integer value.
* The default value is two (2).
*
* @see #JDBC_SEQUENCE_CONNECTION_POOL Required to configure the use of a
* sequence pool/data-source
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_INITIAL
*/
+ @Deprecated
public static final String JDBC_SEQUENCE_CONNECTION_POOL_INITIAL = "eclipselink.jdbc.sequence-connection-pool.initial";
/**
@@ -430,7 +766,10 @@
* connections size for internal connection pooling
* @see #JDBC_SEQUENCE_CONNECTION_POOL_MAX to configure the maximum
* connections size for internal connection pooling
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_SEQUENCE
+ * @see #CONNECTION_POOL_SEQUENCE
*/
+ @Deprecated
public static final String JDBC_SEQUENCE_CONNECTION_POOL = "eclipselink.jdbc.sequence-connection-pool";
/**
@@ -438,10 +777,42 @@
* will be used for sequencing calls.
*
* @see #JDBC_SEQUENCE_CONNECTION_POOL
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_NON_JTA_DATA_SOURCE
+ * @see #CONNECTION_POOL_NON_JTA_DATA_SOURCE
*/
+ @Deprecated
public static final String JDBC_SEQUENCE_CONNECTION_POOL_DATASOURCE = "eclipselink.jdbc.sequence-connection-pool.non-jta-data-source";
/**
+ * "eclipselink.partitioning"
+ * Used to set the default PartitioningPolicy for a persistence unit.
+ * A PartitioningPolicy 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.
+ *
+ * If multiple partitions are used to process a single transaction, JTA should be used for proper XA transaction support.
+ *
+ * The value must be set to the name of an existing defined PartitioningPolicy.
+ *
+ * @see org.eclipse.persistence.annotations.Partitioning
+ * @see org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
+ */
+ public static final String PARTITIONING = "eclipselink.partitioning";
+
+ /**
+ * "eclipselink.partitioning.callback"
+ * Used to integrate with an external DataSource's data affinity support, such as UCP.
+ *
+ * The value must be set to the full class name of the implementor of the DataPartitioningCallback interface.
+ * i.e. "org.eclipse.persistence.platform.database.oracle.ucp.UCPDataPartitioningCallback".
+ *
+ * @see org.eclipse.persistence.platform.database.partitioning.DataPartitioningCallback
+ * @see org.eclipse.persistence.annotations.Partitioning
+ * @see org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
+ */
+ public static final String PARTITIONING_CALLBACK = "eclipselink.partitioning.callback";
+
+ /**
* Property
* Valid values:
*
* Example: persistence.xml file
+ * The query results cache is separate from the object cache.
+ * It caches the results of named query execution.
+ * The query results cache is not enabled by default, and
+ * can be enabled per query.
+ * This option allows it to be enabled for all named queries.
+ * Valid values are "true" or "false" (default).
+ */
+ public static final String QUERY_CACHE = "eclipselink.cache.query-results";
+
+ /**
+ * Allows integration with a database event notification service.
+ * This allows the EclipseLink cache to be invalidated by database change events.
+ * This is used to support Oracle QCN/DCN (Database Change event Notification),
+ * but could also be used by triggers or other services, or other types of events.
+ * Must be set to the name of a class that implements DatabaseEventListener,
+ * such as the OracleChangeNotificationListener (org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener).
+ * The values of "DCN" and "QCN" may also be used for Oracle.
+ *
+ * @see DatabaseEventListener
+ * @see org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener
+ */
+ public static final String DATABASE_EVENT_LISTENER = "eclipselink.cache.database-event-listener";
+
// Customizations properties
/**
@@ -705,13 +1157,24 @@
* @see SessionLog#CACHE
* @see SessionLog#PROPAGATION
* @see SessionLog#SEQUENCING
- * @see SessionLog#EJB_OR_METADATA
+ * @see SessionLog#METADATA
* @see SessionLog#METAMODEL
* @see SessionLog#WEAVER
* @see SessionLog#PROPERTIES
* @see SessionLog#SERVER
*/
public static final String CATEGORY_LOGGING_LEVEL_ = LOGGING_LEVEL + ".";
+
+ /**
+ * By default sql bind paramters are displayed in exceptions and logs
+ * when the log level is FINE or greater. To override this behavior you
+ * may set this property to specify that the data should or should not be
+ * visible. Note: this property applies only to bind parameters. When not
+ * using binding, the parameters are always displayed.
+ *
+ * @see JDBC_BIND_PARAMETERS
+ */
+ public static final String LOGGING_PARAMETERS = "eclipselink.logging.parameters";
/**
* The
+ * Java example:
+ * XML example:
+ *
+ * Java example:
+ * XML example:
+ *
@@ -777,6 +1302,16 @@
public static final String LOGGING_FILE = "eclipselink.logging.file";
// Platforms & Customization
+
+ /**
+ * The
* This property will only be considered if weaving is enabled.
*
@@ -945,8 +1485,305 @@
* @see TargetServer
*/
public static final String TARGET_SERVER = "eclipselink.target-server";
+
+ /**
+ * The The values for this property are If the The The values for this property are Scripts will only be generated if script targets are specified. If
+ * this property is not specified, no scripts will be generated. The The values for this property are If this property is not specified, and a script is specified by the
+ * The The The values for this property are If this property is not specified, and a script is specified by the
+ * The In Java EE environments, it is anticipated that the Java EE platform
+ * provider may wish to control the creation of database schemas rather than
+ * delegate this task to the persistence provider. The The value of this boolean property should be set to true if the
+ * persistence provider is to create schemas in the database or to generate
+ * DDL that contains If scripts are to be generated, the target locations for the writing
+ * of these scripts must be specified. The If scripts are to be generated, the target locations for the writing
+ * of these scripts must be specified. The If scripts are to be generated by the persistence provider and a
+ * connection to the target database is not supplied, the
+ * The value of this property should be the value returned for the target
+ * database by the JDBC DatabaseMetaData method getDatabaseProductName. If sufficient database version information is not included in the
+ * result of this method, the If sufficient database version information is not included from the
+ * JDBC DatabaseMetaData method getDatabaseProductName, the
+ * If sufficient database version information is not included from the
+ * JDBC DatabaseMetaData method getDatabaseProductName, the
+ * The In Java EE container environments, it is generally expected that the
+ * container will be responsible for executing DDL scripts, although the
+ * container is permitted to delegate this task to the persistence provider. If DDL scripts are to be used in Java SE environments or if the Java
+ * EE container delegates the execution of scripts to the persistence
+ * provider, this property must be specified. The The In Java EE container environments, it is generally expected that the
+ * container will be responsible for executing DDL scripts, although the
+ * container is permitted to delegate this task to the persistence provider. If DDL scripts are to be used in Java SE environments or if the Java
+ * EE container delegates the execution of scripts to the persistence
+ * provider, this property must be specified. The The This connection is provided by the container, and should be closed by
+ * the container when the schema generation request or entity manager
+ * factory creation completes. The connection provided must have credentials sufficient for the
+ * persistence provider to carry out the requested actions. If this property is not specified, the persistence provider should use
+ * the DataSource that has otherwise been provided. In Java EE container environments, it is generally expected that the
+ * container will be responsible for executing data load scripts, although
+ * the container is permitted to delegate this task to the persistence
+ * provider. If a load script is to be used in Java SE environments or if
+ * the Java EE container delegates the execution of the load script to the
+ * persistence provider, this property must be specified. The For use with the Specifies that database tables should be created. For use with the Specifies that database tables should be dropped, then created. For use with the Specifies that database tables should be dropped. For use with the Specifies that database tables should not be created or dropped. For use with the Specifies that DDL generation source will come from the metadata only. For use with the Specifies that DDL generation source will come from scripts only. For use with the Specifies that DDL generation source will come from the metadata first
+ * followed with the scripts. For use with the Specifies that DDL generation source will come from the scripts first
+ * followed with the metadata.
+ * This setting has been replaced by UPPERCASE_COLUMN_NAMES, which should be used instead,
+ * as it ensure both sides use upper case for comparisons.
+ * @see #UPPERCASE_COLUMN_NAMES
*/
public static final String NATIVE_QUERY_UPPERCASE_COLUMNS = "eclipselink.jdbc.uppercase-columns";
@@ -995,8 +1836,8 @@
*
* Values (case insensitive):
* 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.
*
* Values (case insensitive):
*
- * Default: "true".
+ * Default: "false".
*/
public static final String INCLUDE_DESCRIPTOR_QUERIES = "eclipselink.session.include.descriptor.queries";
@@ -1105,6 +1951,38 @@
public static final String SESSIONS_XML = "eclipselink.sessions-xml";
/**
+ * The
+ * Values (case insensitive):
+ * Specifies the name of the file to read/write a serialized project representing the application's
+ * metadata Specifies the name of the metadata repository xml file to read from using classloader to find the resource This property should be used in conjunction with
+ *
+ * Allowed Values (String):
+ *
+ * Values: A boolean value of "True" or (default "False").
+ */
+ public static final String DEPLOY_ON_STARTUP = "eclipselink.deploy-on-startup";
+
+ /**
* The
@@ -1194,23 +2115,212 @@
/**
* Allows the database schema to be generated on deployment. Valid values,
- * CREATE_ONLY, DROP_AND_CREATE, NONE ("create-tables",
- * "drop-and-create-tables", "none"). Default is NONE.
+ * CREATE_ONLY, DROP_AND_CREATE, CREATE_OR_EXTEND, NONE ("create-tables",
+ * "drop-and-create-tables", "create-or-extend-tables", "none"). Default is NONE.
*/
public static final String DDL_GENERATION = "eclipselink.ddl-generation";
+ /**
+ * The parameter value For use with the Specifies that database tables should be created. For use with the Specifies that database tables should be dropped only. For use with the Specifies that database tables should be dropped, then created. For use with the Specifies that database tables should be created and if existing, missing columns will be added. This can only be used with eclipselink.ddl-generation.output-mode with value of "database". For use with the Specifies that database tables should not be created or dropped.
+ * Values (case insensitive):
+ * Specifies the name of the metadata repository xml file to read from using classloader to find the resource This property should be used in conjunction with the
+ * Specifies the name of the metadata repository xml URL to read from. This property should be used in conjunction with the
+ * Specifies the name of the metadata repository properties file to read from using classloader to find the resource Specifies the file system directory location where
+ * DDL files are written (output) to. This property should be used in conjunction with the
+ * Specifies the name of the DDL file which is used to create
+ * database tables. This property should be used in conjunction with the
+ * Specifies the name of the DDL file which is used to drop
+ * database tables. This property should be used in conjunction with the
+ * Specified to enable or disable the execution of DDL (configured with
+ * the e.g. a command line setting of Valid values: For use with the Specifies that DDL will be written to file(s). For use with the Specifies that DDL will be written to the database. For use with the Specifies that DDL will be written to file(s) and the database.
+ * Values (case insensitive):
+ *
+ * Values (case insensitive):
+ *
* Values (caseinsensitive):
*
+ * Values:
+ *
+ * i.e.
+ * i.e.
+ * Allowed Values (String):
+ *
+ * Default value is "org.eclipse.persistence.sessions.serializers.JavaSerializer"
+ *
+ * @see org.eclipse.persistence.internal.sessions.AbstractSession#setSerializer(Serializer)
+ */
+ public static final String SERIALIZER = "eclipselink.serializer";
+
+ /**
* INTERNAL: The following properties will not be displayed through logging
* but instead have an alternate value shown in the log.
*/
@@ -1636,6 +3075,21 @@
PROPERTY_LOG_OVERRIDES.put(JDBC_PASSWORD, "xxxxxx");
}
+
+ /**
+ * The
+ * This property will only be considered if weaving is enabled.
+ *
+ * Values (case insensitive):
+ * JPA persistence property Usage:
*
- * Property values are case-insensitive.
*
* @see QueryMonitor
@@ -29,8 +29,12 @@
//A tool used to provide high level performance profiling information
public static final String PerformanceProfiler = "PerformanceProfiler";
public static final String QueryMonitor = "QueryMonitor";
+ public static final String PerformanceMonitor = "PerformanceMonitor";
+ public static final String DMSProfiler = "DMSProfiler";
public static final String NoProfiler = "NoProfiler";
public static final String DEFAULT = NoProfiler;
+
+ public static final String DMSProfilerClassName = "org.eclipse.persistence.tools.profiler.oracle.DMSPerformanceProfiler";
}
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/QueryHints.java eclipselink-2.5.1/org/eclipse/persistence/config/QueryHints.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/QueryHints.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/QueryHints.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,10 @@
* Oracle - initial API and implementation from Oracle TopLink
* 07/16/2009-2.0 Guy Pelletier
* - 277039: JPA 2.0 Cache Usage Settings
+ * 10/29/2010-2.2 Michael O'Brien
+ * - 325167: Make reserved # bind parameter char generic to enable native SQL pass through
+ * 06/30/2011-2.3.1 Guy Pelletier
+ * - 341940: Add disable/enable allowing native queries
******************************************************************************/
package org.eclipse.persistence.config;
@@ -47,25 +51,35 @@
public static final String BIND_PARAMETERS = "eclipselink.jdbc.bind-parameters";
/**
- * "javax.persistence.cacheRetrieveMode"
+ * "eclipselink.jdbc.parameter-delimiter"
+ * Configures parameter binding char to a user defined character (overrides default hash symbol).
+ * Valid values are: ParameterDelimiterType.DEFAULT, other valid single character,
+ * "" can not be used and will instead default to ParameterDelimiterType.DEFAULT
+ * @see PersistenceUnitProperties#JDBC_BIND_PARAMETERS
+ * @see org.eclipse.persistence.queries.DatabaseQuery#setShouldBindAllParameters(boolean)
+ */
+ public static final String PARAMETER_DELIMITER = "eclipselink.jdbc.parameter-delimiter";
+
+ /**
+ * "javax.persistence.cache.retrieveMode"
* Configures the behavior when data is retrieved by the find methods and
- * by the execution of queries. The cacheRetrieveMode is ignored for the
+ * by the execution of queries. The cache retrieve mode is ignored for the
* refresh method, which always causes data to be retrieved from the
- * database and not the cache.
+ * database and not the cache. Configures the behavior when data is read from the database and when
- * data is committed into the database.
+ * "javax.persistence.cache.storeMode"
+ * Configures the behavior when data is read from the database and when
+ * data is committed into the database. Used to provide a PartitioningPolicy instance or name to the query.
+ * This allows the query to execute on a specific, or on multiple connection pools.
+ * @see org.eclipse.persistence.annotations.Partitioning
+ * @see org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
+ */
+ public static final String PARTITIONING = "eclipselink.partitioning";
/**
* "eclipselink.query-type"
@@ -228,6 +251,12 @@
* Batch reading is normally more efficient than join fetch, especially for collection relationships.
* Valid values are strings that represent JPQL style navigations to a relationship.
* e.g. "e.manager.phoneNumbers"
+ * Note: Batch reading produces two lines of SQL to read the requested object graph and uses the
+ * 'where clause' of the first SQL as part of the 'where clause' of the second. When indirect attributes
+ * of the objects returned from the first query are referenced the second query is executed to return those attributes.
+ * If changes are made to data referenced in the 'where clause' after the first SQL results are returned but before the
+ * second query executes then these attributes may not be returned by the second query. To prevent this reference these
+ * attributes before changing data associated with the query."
* @see BatchFetch
* @see #BATCH_TYPE
* @see BatchFetchType
@@ -383,7 +412,7 @@
* By default queries generate their SQL the first time they are executed,
* and avoid the cost of generating the SQL on subsequent executions.
* This can be used to generate the SQL on every execution if the
- * query requires usage of dynamic SQL.
+ * query requires usage of dynamic SQL, such as to handle null parameters (use IS NULL instead of = null).
* This only effects the SQL generation, not parameter binding or statement caching.
* Valid values are: HintValues.FALSE, HintValues.TRUE,
* "" could be used instead of default value HintValues.FALSE
@@ -620,7 +649,16 @@
* @see org.eclipse.persistence.queries.FetchGroup#setShouldLoad(boolean)
*/
public static final String FETCH_GROUP_LOAD = "eclipselink.fetch-group.load";
-
+
+ /**
+ * "javax.persistence.fetchgraph"
+ * Configures a jpa entity graph to be used as a fetch graph template.
+ * Those attributes included in the entity graph will have their values fetched and populated.
+ * Attributes of the represented entity that are not present in the entity graph will be treated
+ * as FetchType.LAZY.
+ */
+ public static final String JPA_FETCH_GRAPH = "javax.persistence.fetchgraph";
+
/**
* "eclipselink.fetch-group.default"
* Configures the query not to use the default fetch group.
@@ -651,7 +689,16 @@
public static final String LOAD_GROUP = "eclipselink.load-group";
/**
- * "eclipselink.fetch-group.attribute"
+ * "javax.persistence.loadgraph"
+ * Configures a jpa entity graph to be used as a load graph template.
+ * Those attributes included in the entity graph will have their values fetched and populated.
+ * Attributes of the represented entity that are not present in the entity graph will be loaded based
+ * on their mapping based FetchType settings.
+ */
+ public static final String JPA_LOAD_GRAPH = "javax.persistence.loadgraph";
+
+ /**
+ * "eclipselink.load-group.attribute"
* Configures the query to use load group that includes a list of attributes.
* Each attribute must be defined using a separate hint.
* The query will load all relational attributes defined in the load group.
@@ -694,6 +741,24 @@
public static final String INHERITANCE_OUTER_JOIN = "eclipselink.inheritance.outer-join";
/**
+ * The
+ * Allowed Values (String):
+ * Configures the query to query the state of the object as-of a point in time.
* This can only be used if the class has been configured with historical support,
@@ -754,4 +819,53 @@
*/
public static final String PESSIMISTIC_LOCK_SCOPE = "javax.persistence.lock.scope";
+ /**
+ * "eclipselink.composite-unit.member"
+ * This must be used on a native query executed on composite persistence unit.
+ * It specifies the name of composite member persistence unit to execute the query on.
+ * @see org.eclipse.persistence.queries.DatabaseQuery#setSessionName(String)
+ */
+ public static final String COMPOSITE_UNIT_MEMBER = "eclipselink.composite-unit.member";
+
+ /**
+ * "eclipselink.jdbc.batch-writing"
+ * Configures if this modify query can be batched through batch writing.
+ * Some types of queries cannot be batched, such as DDL on some databases.
+ * Disabling batch writing will also allow the row count to be returned.
+ * Valid values are: HintValues.PERSISTENCE_UNIT_DEFAULT, HintValues.TRUE, HintValues.FALSE,
+ * "" could be used instead of default value HintValues.PERSISTENCE_UNIT_DEFAULT
+ * @see org.eclipse.persistence.queries.ModifyQuery#setIsBatchExecutionSupported(boolean)
+ */
+ public static final String BATCH_WRITING = "eclipselink.jdbc.batch-writing";
+
+ /**
+ * "eclipselink.result-set-access"
+ * Configures if this read object(s) query should keep result set until all result object(s) are built.
+ * That allows to avoid getting potentially huge objects (LOBs) from ResultSet in case they would not be used
+ * because the object is found in the cache.
+ * Valid values are: HintValues.PERSISTENCE_UNIT_DEFAULT, HintValues.TRUE, HintValues.FALSE,
+ * "" could be used instead of default value HintValues.PERSISTENCE_UNIT_DEFAULT
+ * @see org.eclipse.persistence.queries.ObjectLevelReadQuery#setIsResultSetAccessOptimizedQuery(boolean)
+ * @see org.eclipse.persistence.queries.ObjectLevelReadQuery#clearIsResultSetOptimizedQuery
+ */
+ public static final String RESULT_SET_ACCESS = "eclipselink.result-set-access";
+
+ /**
+ * "eclipselink.serialized-object"
+ * Configures if this read object(s) query use SerializedObjectPolicy if it's set on the descriptor.
+ * Valid values are: HintValues.TRUE, HintValues.FALSE,
+ * "" could be used instead of default value HintValues.FALSE
+ * @see org.eclipse.persistence.queries.ObjectLevelReadQuery#setShouldUseSerializedObjectPolicy(boolean)
+ */
+ public static final String SERIALIZED_OBJECT = "eclipselink.serialized-object";
+
+ /**
+ * "eclipselink.query-return-name-value-pairs"
+ * Configures a ResultSetMappingQuery to return populated DatabaseRecord(s)
+ * instead of raw data. This is particularly useful when the structure of the
+ * returned data is not known.
+ * @see org.eclipse.persistence.queries.ResultSetMappingQuery#setShouldReturnNameValuePairs(boolean)
+ * @see org.eclipse.persistence.queries.ResultSetMappingQuery#shouldReturnNameValuePairs()
+ */
+ public static final String RETURN_NAME_VALUE_PAIRS = "eclipselink.query-return-name-value-pairs";
}
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/QueryType.java eclipselink-2.5.1/org/eclipse/persistence/config/QueryType.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/QueryType.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/QueryType.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/ReferenceMode.java eclipselink-2.5.1/org/eclipse/persistence/config/ReferenceMode.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/ReferenceMode.java 1970-01-01 00:00:00.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/ReferenceMode.java 2013-09-18 00:39:50.000000000 +0000
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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:
+ * Gordon Yorke - ER 214661 - VM Managed Entity Detachment
+ ******************************************************************************/
+package org.eclipse.persistence.config;
+
+/**
+ * Purpose: This class is a configuration property used to specify
+ * What type of Referenes EclipseLink will use when referencing Entities
+ * within the Persistence Context / UnitOfWork. Depending on the configured
+ * ReferenceMode some Entities may be garbage collected.
+ *
+ * @author Gordon
+ *
+ */
+public enum ReferenceMode {
+ /**
+ * References to Objects will be through hard references. These objects will not be available for
+ * garbage collection until the referencing artifact (usually a Persistence Context or UnitOfWork)
+ * released or closed.
+ */
+ HARD,
+
+ /**
+ * References to Objects that support active attribute change tracking
+ * (enabled through weaving or by the developer)will be held by weak
+ * references. This means any of afore mentioned objects no longer referenced directly or
+ * indirectly will be available for garbage collection. If the object is
+ * gc'd before the EM/UnitOfWork flushes to the database then this object
+ * and any others like it will not be checked for changes. When a change is
+ * made to a change tracked object that object is moved to a hard reference
+ * and will not be available for GC until flushed. New and removed objects
+ * are also held by hard references. Non change tracked objects will always
+ * be held by "hard" references and are not available for GC. This is the
+ * default mode for EclipsLink. See:
+ * {@link java.lang.ref.WeakReference}
+ * {@link org.eclipse.persistence.descriptors.changetracking.AttributeChangeTrackingPolicy}
+ */
+ WEAK,
+
+ /**
+ * Same as weak reference except Objects that can not be changed
+ * tracked (Deferred Change Detection) will not be prevented from being
+ * garbage collected. This may result in a loss of changes if a changed object
+ * is removed before being flushed to the database.
+ * When a change is made to a change tracked object that object
+ * is moved to a hard reference and will not be available for GC until
+ * flushed. New and removed objects are also held by hard references until
+ * flush..
+ */
+ FORCE_WEAK
+
+
+
+}
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/RemoteProtocol.java eclipselink-2.5.1/org/eclipse/persistence/config/RemoteProtocol.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/RemoteProtocol.java 1970-01-01 00:00:00.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/RemoteProtocol.java 2013-09-18 00:39:50.000000000 +0000
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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;
+
+/**
+ * Remote JPA protocol persistence property values.
+ *
+ * JPA persistence property usage:
+ *
+ * Property values are case-insensitive.
+ *
+ * @see PersistenceUnitProperties#REMOTE_PROTOCOL
+ */
+public class RemoteProtocol {
+ public static final String RMI = "rmi";
+}
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/ResultSetConcurrency.java eclipselink-2.5.1/org/eclipse/persistence/config/ResultSetConcurrency.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/ResultSetConcurrency.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/ResultSetConcurrency.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/ResultSetType.java eclipselink-2.5.1/org/eclipse/persistence/config/ResultSetType.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/ResultSetType.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/ResultSetType.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/ResultType.java eclipselink-2.5.1/org/eclipse/persistence/config/ResultType.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/ResultType.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/ResultType.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/SessionCustomizer.java eclipselink-2.5.1/org/eclipse/persistence/config/SessionCustomizer.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/SessionCustomizer.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/SessionCustomizer.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/StructConverterType.java eclipselink-2.5.1/org/eclipse/persistence/config/StructConverterType.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/StructConverterType.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/StructConverterType.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/SystemProperties.java eclipselink-2.5.1/org/eclipse/persistence/config/SystemProperties.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/SystemProperties.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/SystemProperties.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.
@@ -38,6 +38,14 @@
* on the path provided to WEAVING_OUTPUT_PATH will not be overridden. If this is set to true, they will be
*/
public static final String WEAVING_SHOULD_OVERWRITE = "eclipselink.weaving.overwrite.existing";
+
+ /**
+ * This property can be used to tell EclipseLink to process classes in the ASM Default manner. The fix for bug
+ * 370975 changes EclipseLink's weaving support to use ASM itself to examine class hierarchies. Setting this flag to
+ * true will cause us to use the default reflection mechanism again. This flag provides a means to workaround any issues encountered with
+ * the ASM-based weaving introspection
+ */
+ public static final String WEAVING_REFLECTIVE_INTROSPECTION = "eclipselink.weaving.reflective-introspection";
/**
* This property is used in conjunction with
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/TargetDatabase.java eclipselink-2.5.1/org/eclipse/persistence/config/TargetDatabase.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/TargetDatabase.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/TargetDatabase.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.
@@ -35,9 +35,12 @@
public static final String DB2Mainframe = "DB2Mainframe";
public static final String DBase = "DBase";
public static final String Derby = "Derby";
+ public static final String HANA = "HANA";
public static final String HSQL = "HSQL";
public static final String Informix = "Informix";
+ public static final String Informix11 = "Informix11";
public static final String JavaDB = "JavaDB";
+ public static final String MaxDB = "MaxDB";
public static final String MySQL4 = "MySQL4";
public static final String MySQL = "MySQL";
public static final String PointBase = "PointBase";
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/TargetServer.java eclipselink-2.5.1/org/eclipse/persistence/config/TargetServer.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/TargetServer.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/TargetServer.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.
@@ -26,7 +26,9 @@
public class TargetServer {
public static final String None = "None";
public static final String OC4J = "OC4J";
+ @Deprecated
public static final String SunAS9 = "SunAS9";
+ public static final String Glassfish = "Glassfish";
public static final String WebSphere = "WebSphere";
public static final String WebSphere_6_1 = "WebSphere_6_1";
public static final String WebSphere_7 = "WebSphere_7";
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/TunerType.java eclipselink-2.5.1/org/eclipse/persistence/config/TunerType.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/TunerType.java 1970-01-01 00:00:00.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/TunerType.java 2013-09-18 00:39:50.000000000 +0000
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.persistence.config;
+
+/**
+ * Tuning persistence property values.
+ *
+ * JPA persistence property usage:
+ *
+ * Property values are case-insensitive.
+ *
+ * @see PersistenceUnitProperties#TUNING
+ */
+public class TunerType {
+ public static final String Safe = "Safe";
+ public static final String Standard = "Standard";
+}
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/core/descriptors/CoreDescriptor.java eclipselink-2.5.1/org/eclipse/persistence/core/descriptors/CoreDescriptor.java
--- eclipselink-2.1.3/org/eclipse/persistence/core/descriptors/CoreDescriptor.java 1970-01-01 00:00:00.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/core/descriptors/CoreDescriptor.java 2013-09-18 00:39:50.000000000 +0000
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * 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:
+ * Blaise Doughan - 2.5 - initial implementation
+ ******************************************************************************/
+package org.eclipse.persistence.core.descriptors;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.persistence.core.queries.CoreAttributeGroup;
+import org.eclipse.persistence.internal.core.descriptors.CoreInstantiationPolicy;
+import org.eclipse.persistence.internal.core.descriptors.CoreObjectBuilder;
+import org.eclipse.persistence.internal.core.helper.CoreField;
+import org.eclipse.persistence.internal.localization.ExceptionLocalization;
+
+/**
+ * INTERNAL
+ * A abstraction of descriptor capturing behavior common to all persistence
+ * types.
+ */
+public abstract class CoreDescriptor<
+ ATTRIBUTE_GROUP extends CoreAttributeGroup,
+ DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager,
+ FIELD extends CoreField,
+ INHERITANCE_POLICY extends CoreInheritancePolicy,
+ INSTANTIATION_POLICY extends CoreInstantiationPolicy,
+ LIST extends List,
+ OBJECT_BUILDER extends CoreObjectBuilder> implements Serializable {
+
+ protected DESCRIPTOR_EVENT_MANAGER eventManager;
+ protected FIELD field;
+ protected INSTANTIATION_POLICY instantiationPolicy;
+ protected INHERITANCE_POLICY inheritancePolicy;
+ protected OBJECT_BUILDER objectBuilder;
+
+ protected Map
*
* @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.
+ *
* @Entity
* @InstantiationCopyPolicy
+ * public class Employee {
+ *
+ *
+ * @Entity
+ * @SerializedObject(MySerializedObjectPolicy.class);
+ * public class Employee {...
+ *
+ *
+ * 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
+ *
+ *
+ * @Entity
+ * @SerializedObject(value = MySerializedObjectPolicy.class, column = @Column(name="SERIALIZED"));
+ * public class Address {...
+ *
+ *
+ * Query query = em.createQuery("SELECT e FROM Employee e").setHint(QueryHints.SERIALIZED_OBJECT, "true");
+ *
+ *
+ * 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.
+ *
+ * Map hints = new HashMap();
+ * hints.put("eclipselink.serialized-object", "true");
+ * Address address = em.find(Address.class, id, hints);
+ *
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;
+
+/**
+ *
+ * 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.
+ * properties.add(PersistenceUnitProperties.BATCH_WRITING, BatchWriting.JDBC);
*
*
+ *
+ * @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.
+ *
+ * properties.add(PersistenceUnitProperties.COORDINATION_PROTOCOL, CacheCoordinationProtocol.RMI);
+ * "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 Setquery.setHint(QueryHints.PARAMETER_DELIMITER, "%");
+ * @QueryHint(name=QueryHints.PARAMETER_DELIMITER, value="%")
+ *
+ * properties.add(PersistenceUnitProperties.JPQL_PARSER, ParserType.Hermes);
+ * properties.add(PersistenceUnitProperties.JPQL_VALIDATION, ParserValidationType.JPA21);
+ * "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):
*
*
"eclipselink.jpql.parser"
property allows the
+ * JPQL parser to be configured.
+ * Two JPQL parsers are provided:
+ *
+ *
+ *
+ * @see ParserType
+ * @see JPAQueryBuilder
+ */
+ public static final String JPQL_PARSER = "eclipselink.jpql.parser";
+
+ /**
+ * The "eclipselink.jpql.validation"
property allows the
+ * JPQL parser validation level to be configured.
+ * This setting is only supported in the Hermes parser.
+ * Valid values are:
+ *
+ *
+ *
+ * @see ParserValidationType
+ */
+ public static final String JPQL_VALIDATION = "eclipselink.jpql.validation";
+
+ /**
+ * The "wait"
property.
+ * This can be append to any connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.default.wait"
+ * which specifies the timeout time in milliseconds (ms) that will be waited
+ * for an available connection before an exception is thrown. Ignored in
+ * case external connection pools are used.
+ * "max"
property.
+ * This can be append to any connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.default.max"
+ * Specifies the maximum number of read connection in the internal connection pool. If
+ * the maximum size is reached, threads requiring a connection will wait
+ * until one is released back to the pool. By default a single shared
+ * (exclusive) read/write pool is used with min/max 32 connections and 1
+ * initial. Ignored in case external connection pools are used.
+ * "min"
property.
+ * This can be append to any connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.default.min"
+ * Specifies the minimum number of connections in EclipseLink connection pool.
+ * "initial"
property.
+ * This can be append to any connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.default.initial"
+ * EclipseLink JDBC (internal) connection pools properties. Initial number
+ * of connections in EclipseLink connection pool. This is the number of
+ * connections connected at startup. By default a single shared (exclusive)
+ * read/write pool is used with min/max 32 connections and 1 initial. Ignored
+ * in case external connection pools are used.
+ * "shared"
property.
+ * This can be append to the read connection pool,
+ * i.e. "eclipselink.jdbc.connection_pool.read.shared"
+ * Configures whether connections in EclipseLink read connection pool should
+ * be shared (not exclusive). Connection sharing means the same JDBC
+ * connection will be used concurrently for multiple reading threads.
+ *
+ *
+ * @see #CONNECTION_POOL_READ
+ */
+ public static final String CONNECTION_POOL_SHARED = "shared";
+
+ /**
+ * The "url"
property.
+ * This can be append to a connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.node1.url"
+ * Configures the JDBC url to use for the connection pool.
+ * Only required if different than the default.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_URL = "url";
+
+ /**
+ * The "jtaDataSource"
property.
+ * This can be append to a connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.node1.jtaDataSource"
+ * Configures the JTA DataSource name to use for the connection pool.
+ * Only required if different than the default.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_JTA_DATA_SOURCE = "jtaDataSource";
+
+ /**
+ * The "nonJtaDataSource"
property.
+ * This can be append to a connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.node1.nonJtaDataSource"
+ * Configures the non JTA DataSource name to use for the connection pool.
+ * Only required if different than the default.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_NON_JTA_DATA_SOURCE = "nonJtaDataSource";
+
+ /**
+ * The "user"
property.
+ * This can be append to a connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.node1.user"
+ * Configures the user name to use for the connection pool.
+ * Only required if different than the default.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_USER = "user";
+
+ /**
+ * The "password"
property.
+ * This can be append to a connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.node1.password"
+ * Configures the password to use for the connection pool.
+ * Only required if different than the default.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_PASSWORD = "password";
+
+ /**
+ * The "failover"
property.
+ * This can be append to a connection pool property,
+ * i.e. "eclipselink.jdbc.connection_pool.node1.failover"
+ * Configures the connection pool(s) to fail-over to if this connection pool fails.
+ * A comma separate list is allowed if multiple failover pools are required.
+ * @see #CONNECTION_POOL
+ */
+ public static final String CONNECTION_POOL_FAILOVER = "failover";
+
+ /**
+ * Allow configuring a "eclipselink.connection-pool."
properties.
+ * The name of the connection pool must be appended to configure the pool,
+ * if no name is appended the default (write) pool is configured.
+ * The name of the property to configure must also be appended.
+ *
+ *
+ * A user defined pool is only used if specified in the EntityManager properties or ClientSession ConnectionPolicy,
+ * or if partitioning is used. *
+ *
+ *
+ *
+ * <property name="eclipselink.connection-pool.node2.min" value="16"/>
+ * <property name="eclipselink.connection-pool.node2.max" value="16"/>
+ * <property name="eclipselink.connection-pool.node2.url" value="jdbc:oracle:thin:@node2:1521:orcl"/>
+ *
+ * @see CONNECTION_POOL_READ
+ * @see CONNECTION_POOL_SEQUENCE
+ * @see #CONNECTION_POOL_INITIAL
+ * @see #CONNECTION_POOL_MIN
+ * @see #CONNECTION_POOL_MAX
+ * @see #CONNECTION_POOL_WAIT
+ * @see #CONNECTION_POOL_USER
+ * @see #CONNECTION_POOL_PASSWORD
+ * @see #CONNECTION_POOL_URL
+ * @see #CONNECTION_POOL_JTA_DATA_SOURCE
+ * @see #CONNECTION_POOL_NON_JTA_DATA_SOURCE
+ * @see #CONNECTION_POOL_SHARED
+ * @see org.eclipse.persistence.sessions.server.ConnectionPool
+ */
+ public static final String CONNECTION_POOL = "eclipselink.connection-pool.";
+
+ /**
+ * Allow configuring the "eclipselink.connection-pool.read."
properties.
+ * The read connection pool is used for non-transaction read queries.
+ * By default a separate read connection pool is not used,
+ * and the default pool is used for read queries.
+ * "eclipselink.connection-pool.sequence."
properties.
+ * The sequence connection pool is used to allocate generated Ids.
+ * This is only required for TABLE sequencing.
+ * By default a separate sequence connection pool is not used,
+ * and the default pool is used for sequencing.
+ * "eclipselink.jdbc.connections.wait-timeout"
property
* which specifies the timeout time in milliseconds (ms) that will be waited
* for an available connection before an exception is thrown. Ignored in
@@ -190,7 +493,10 @@
*
- * "false" (DEFAULT): indicates read connections will not be shared
+ *
+ * @deprecated as of EclipseLink 2.2 replaced by CONNECTION_POOL_SHARED
+ * @see #CONNECTION_POOL_SHARED
*/
+ @Deprecated
public static final String JDBC_READ_CONNECTIONS_SHARED = "eclipselink.jdbc.read-connections.shared";
/**
@@ -354,7 +684,6 @@
* is allocated on the write connection).
* "eclipselink.jdbc.bind-parameters
configures whether parameter binding will be used in the
* creation of JDBC prepared statements. Usage of parameter binding is
* generally a performance optimization allowing for SQL and prepared
@@ -504,8 +875,8 @@
*
- *
*
@@ -521,11 +892,10 @@
/**
* The
"javax.persistence.validation.factory"
property
* specifies an instance of javax.validation.ValidatorFactory used by
+ * http://download.oracle.com/javaee/6/docs/api/javax/validation/ValidatorFactory.html>javax.validation.ValidatorFactory used by
* EclipseLink to perform Automatic Validation upon Lifecycle Events. If the
- * propoerty is not specified, and if Bean Validation API is visible to
- * Eclipselink, it will try to instantiate an insance of
+ * property is not specified, and if Bean Validation API is visible to
+ * Eclipselink, it will try to instantiate an instance of
* javax.validation.ValidationFactory
by calling
* Validation.buildDefaultValidatorFactory()
*/
@@ -636,6 +1006,61 @@
*/
public static final String CACHE_TYPE_DEFAULT = CACHE_TYPE_ + DEFAULT;
+ /**
+ * NOTE: The Canonical Model properties should be kept in sync with those
+ * in org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProperties.
+ */
+
+ /**
+ * This optional property specifies the prefix that will be added to the
+ * start of the class name of any canonical model class generated.
+ * By default the prefix is not used.
+ */
+ public static final String CANONICAL_MODEL_PREFIX = "eclipselink.canonicalmodel.prefix";
+ public static String CANONICAL_MODEL_PREFIX_DEFAULT = "";
+
+ /**
+ * This optional property specifies the suffix that will be added to the
+ * end of the class name of any canonical model class generated. The suffix
+ * defaults to "_" unless a prefix is specified. If this property is
+ * specified, the value must be a non-empty string that contains valid
+ * characters for use in a Java class name.
+ */
+ public static final String CANONICAL_MODEL_SUFFIX = "eclipselink.canonicalmodel.suffix";
+ public static String CANONICAL_MODEL_SUFFIX_DEFAULT = "_";
+
+ /**
+ * This optional property specifies a sub-package name that can be used to
+ * have the canonical model generator generate its classes in a sub-package
+ * of the package where the corresponding entity class is located. By
+ * default the canonical model classes are generated into the same package
+ * as the entity classes.
+ */
+ public static final String CANONICAL_MODEL_SUB_PACKAGE = "eclipselink.canonicalmodel.subpackage";
+ public static String CANONICAL_MODEL_SUB_PACKAGE_DEFAULT = "";
+
+ /**
+ * This optional property can be used a performance enhancement between
+ * compile rounds. It is used to avoid reloading XML metadata on each
+ * compile which may only contain a single class etc. The default value
+ * is true and should be left as such for the initial generation to capture
+ * the XML metadata. Afterwards users may choose to set this flag if no
+ * changes to XML are expected thereafter.
+ */
+ public static final String CANONICAL_MODEL_LOAD_XML = "eclipselink.canonicalmodel.load_xml";
+ public static final String CANONICAL_MODEL_LOAD_XML_DEFAULT = "true";
+
+ /**
+ * This optional property can be used a performance enhancement between
+ * compile rounds within an IDE. It is used to avoid using a static metadata
+ * factory between 'cache' metadata from incremental builds. Turning this
+ * off in some use cases (IDE) could result in a loss of functionality.
+ * The default value is true and should be left as such for full feature
+ * support.
+ */
+ public static final String CANONICAL_MODEL_USE_STATIC_FACTORY = "eclipselink.canonicalmodel.use_static_factory";
+ public static final String CANONICAL_MODEL_USE_STATIC_FACTORY_DEFAULT = "true";
+
/**
* Default caching properties - apply to all entities. May be overridden by
* individual entity property with the same prefix. If you do not wish to
@@ -643,6 +1068,33 @@
*/
public static final String CACHE_SHARED_DEFAULT = CACHE_SHARED_ + DEFAULT;
+ /**
+ * Property prefix "eclipselink.cache.query-results
used to
+ * configure the default option for query results caching.
+ * "eclipselink.logging.timestamp"
property configures if
@@ -726,6 +1189,68 @@
public static final String LOGGING_TIMESTAMP = "eclipselink.logging.timestamp";
/**
+ * 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.
+ *
+ * @see org.eclipse.persistence.annotations.Multitenant
+ * @see org.eclipse.persistence.annotations.TenantDiscriminatorColumn
+ *
+ * Example: persistence.xml file
+ *
Example: property Map
+ * propertiesMap.put(PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT, "Oracle");
+ *
+ */
+ public static final String MULTITENANT_PROPERTY_DEFAULT = "eclipselink.tenant-id";
+
+ /**
+ * Property "eclipselink.multitenant.tenants-share-cache
+ * specifies that multitenant entities will share the L2 cache. By default
+ * this property is false meaning multitenant entities will have an ISOLATED
+ * setting. When setting it to true a PROTECTED cache setting will be used.
+ *
+ * WARNING: Queries that use the cache may return data from other tenants
+ * when using the PROTECTED setting.
+ *
+ * @see eclipselink.multitenant.tenants-share-emf
+ *
+ *
+ * props.put(PersistenceUnitProperties.MULTITENANT_SHARED_CACHE, true);
+ *
+ *
+ */
+ public static final String MULTITENANT_SHARED_CACHE = "eclipselink.multitenant.tenants-share-cache";
+
+ /**
+ * Property "eclipselink.multitenant.shared-emf
is used to
+ * indicate that multitenant entities will be used within a shared entity
+ * manager factory. This property defaults to true (and applies to
+ * multitenant entities only). When setting it to false, users are required
+ * to provide a unique session name.
+ *
+ * @see eclipselink.session-name
+ * @see eclipselink.multitenant.tenants-share-cache
+ *
+ *
+ * props.put(PersistenceUnitProperties.MULTITENANT_SHARED_EMF, true);
+ *
+ *
+ */
+ public static final String MULTITENANT_SHARED_EMF = "eclipselink.multitenant.tenants-share-emf";
+
+ /**
* Property "eclipselink.logging.thread"
indicating if current
* thread should have its identity included in each log message.
* "eclipselink.ddl.table-creation-suffix"
property is used in
+ * conjunction with DDL generation options to append a string to the end of
+ * generated CREATE Table statements
+ *
+ * This value is applied to all Table creation statements through the DDL generation feature
+ * ie "eclipselink.target-database"
property configures the
@@ -845,6 +1380,11 @@
/**
* The "eclipselink.weaving.internal"
property indicates
* whether internal optimizations should be enabled through weaving.
+ *
+ * Internal optimizations include caching of primary key and session,
+ * addition of a serialVersionUID if none exists, optimization of EclipseLink's
+ * cloning strategy and optimization of the way EclipseLink gets and sets values from
+ * fields mapped as Basic.
* "javax.persistence.schema-generation.database.action"
+ * property specifies the action to be taken by the persistence provider with
+ * regard to the database artifacts."none"
, "create"
,
+ * "drop-and-create"
, "drop"
."javax.persistence.schema-generation.database.action"
+ * property is not specified, no schema generation actions must be taken on
+ * the database."javax.persistence.schema-generation.scripts.action"
+ * property specifies which scripts are to be generated by the persistence
+ * provider."none"
, "create"
,
+ * "drop-and-create"
, "drop"
."javax.persistence.schema-generation.create-source"
+ * property specifies whether the creation of database artifacts is to occur
+ * on the basis of the object/relational mapping metadata, DDL script, or a
+ * combination of the two."metadata"
, "script"
,
+ * "metadata-then-script"
, "script-then-metadata"
."javax.persistence.schema-generation.create-script-source property"
,
+ * the script (only) will be used for schema generation; otherwise if this
+ * property is not specified, schema generation will occur on the basis of
+ * the object/relational mapping metadata (only)."metadata-then-script"
and "script-then-metadata"
+ * values specify that a combination of metadata and script is to be used
+ * and the order in which this use is to occur. If either of these values is
+ * specified and the resulting database actions are not disjoint, the
+ * results are undefined and schema generation may fail."javax.persistence.schema-generation.drop-source"
property
+ * specifies whether the dropping of database artifacts is to occur on the
+ * basis of the object/relational mapping metadata, DDL script, or a
+ * combination of the two."metadata"
, "script"
,
+ * "metadata-then-script"
, "script-then-metadata"
."javax.persistence.schema-generation.drop-script-source"
property,
+ * the script (only) will be used for the dropping of database artifacts;
+ * otherwise if this property is not specified, the dropping of database
+ * artifacts will occur on the basis of the object/relational mapping
+ * metadata (only)."metadata-then-script"
and "script-then-metadata"
+ * values specify that a combination of metadata and script is to be used
+ * and the order in which this use is to occur. If either of these values is
+ * specified and the resulting database actions are not disjoint, the
+ * results are undefined and the dropping of database artifacts may fail."javax.persistence.schema-generation.create-database-schemas"
+ * property specifies whether the persistence provider is to create the
+ * database schema(s) in addition to creating database objects such as
+ * tables, sequences, constraints, etc."CREATE SCHEMA"
commands. If this property
+ * is not supplied, the provider should not attempt to create database
+ * schemas. This property may also be specified in Java SE environments."javax.persistence.schema-generation.scripts.create-target"
+ * property specifies a java.IO.Writer configured for use by the persistence
+ * provider for output of the DDL script or a string specifying the file URL
+ * for the DDL script. This property should only be specified if scripts are
+ * to be generated."javax.persistence.schema-generation.scripts.drop-target"
+ * property specifies a java.IO.Writer configured for use by the persistence
+ * provider for output of the DDL script or a string specifying the file URL
+ * for the DDL script. This property should only be specified if scripts are
+ * to be generated."javax.persistence.database-product-name"
property must be
+ * specified."javax.persistence.database-major-version"
+ * and "javax.persistence.database-minor-version"
properties
+ * should be specified as needed. These should contain the values returned
+ * by the JDBC getDatabaseMajorVersion and getDatabaseMinor-Version methods
+ * respectively."javax.persistence.database-major-version"
property should
+ * be specified as needed. This should contain the value returned by the
+ * JDBC getDatabaseMajor-Version method."javax.persistence.database-minor-version"
property should
+ * be specified as needed. This should contain the value returned by the
+ * JDBC getDatabaseMinor-Version method."javax.persistence.schema-generation.create-script-source"
+ * is used for script execution."javax.persistence.schema-generation.create-script-source"
+ * property specifies a java.IO.Reader configured for reading of the DDL
+ * script or a string designating a file URL for the DDL script."javax.persistence.schema-generation.drop-script-source"
+ * is used for script execution."javax.persistence.schema-generation.drop-script-source"
+ * property specifies a java.IO.Reader configured for reading of the DDL
+ * script or a string designating a file URL for the DDL script."javax.persistence.schema-generation.connection"
property
+ * specifies the JDBC connection to be used for schema generation. This is
+ * intended for use in Java EE environments, where the platform provider may
+ * want to control the database privileges that are available to the
+ * persistence provider."javax.persistence.sql-load-script-source"
property
+ * specifies a java.IO.Reader configured for reading of the SQL load script
+ * for database initialization or a string designating a file URL for the
+ * script."create"
+ * "javax.persistence.schema-generation.database.action"
+ * and "javax.persistence.schema-generation.scripts.action"
properties."drop-and-create"
+ * "javax.persistence.schema-generation.database.action"
+ * and "javax.persistence.schema-generation.scripts.action"
properties."drop"
+ * "javax.persistence.schema-generation.database.action"
+ * and "javax.persistence.schema-generation.scripts.action"
properties."none"
+ * "javax.persistence.schema-generation.database.action"
+ * and "javax.persistence.schema-generation.scripts.action"
properties."metadata"
+ * "javax.persistence.schema-generation.create-source"
+ * and "javax.persistence.schema-generation.drop-source"
properties."script"
+ * "javax.persistence.schema-generation.create-source"
+ * and "javax.persistence.schema-generation.drop-source"
properties."metadata-then-script"
+ * "javax.persistence.schema-generation.create-source"
+ * and "javax.persistence.schema-generation.drop-source"
properties."script-then-metadata"
+ * "javax.persistence.schema-generation.create-source"
+ * and "javax.persistence.schema-generation.drop-source"
properties."eclipselink.sequencing.default-sequence-to-table"
property
+ * determines the default behavior when a GeneratedValue of type SEQUENCE is used
+ * on a database platform that does not support SEQUENCE generation.
+ * By default IDENTITY generation is used if supported.
+ * If this property is set to true, then TABLE sequencing will be used instead.
+ */
+ public static final String SEQUENCING_SEQUENCE_DEFAULT = "eclipselink.sequencing.default-sequence-to-table";
+
+ /**
* The "eclipselink.session.customizer"
property configures a
* {@link SessionCustomizer} used to alter the runtime configuration through
* API.
@@ -982,6 +1819,10 @@
* in lower case on some platforms. If the column names are upper-case in
* the mappings (default) then they will not match. This setting allows for
* forcing the column names from the meta-data to upper-case.
+ *
- *
*/
public static final String UPPERCASE_COLUMN_NAMES = "eclipselink.jpa.uppercase-column-names";
@@ -1004,6 +1845,9 @@
/**
* The "eclipselink.jdbc.batch-writing"
property configures the
* use of batch writing to optimize transactions with multiple writes.
+ *
@@ -1012,10 +1856,12 @@
* batch writing.
*
*
* @see BatchWriting
+ * @see BatchWritingMechanism
*/
public static final String BATCH_WRITING = "eclipselink.jdbc.batch-writing";
@@ -1082,7 +1928,7 @@
* property configures whether to enable the copying of all descriptor named
* queries to the session to be usable from the entity manager.
* "eclipselink.project-cache"
property configures the type of
+ * ProjectCacheAccessor implementation to use to retrieve and store projects
+ * representing the metadata for the project
+ *
+ *
+ *
+ * @see ProjectCacheAccessor
+ */
+ public static final String PROJECT_CACHE = "eclipselink.project-cache";
+
+ /**
+ * The property "eclipselink.project-cache.java-serialization.file"
+ *
+ * "eclipselink.project-cache"
when a project is serialized to a file for caching."eclipselink.temporal.mutable"
property configures the
* default for detecting changes to temporal field (Date, Calendar). Default
* "false" (changes to date object itself are not detected). By default it
@@ -1115,6 +1993,24 @@
public static final String TEMPORAL_MUTABLE = "eclipselink.temporal.mutable";
/**
+ * The "eclipselink.jdbc.allow-native-sql-queries"
property
+ * specifies whether any user defined SQL is allowed within a persistence
+ * unit. This is of particular importance within a multitenant to minimize
+ * the potential impact of revealing multi tenant information. By default
+ * any persistence unit containing at least one multitenant entity will
+ * cause this flag to be set to 'false'.
+ *
+ *
+ *
+ * @see Project#setAllowNativeSQLQueries(boolean)
+ */
+ public static final String ALLOW_NATIVE_SQL_QUERIES = "eclipselink.jdbc.allow-native-sql-queries";
+
+ /**
* The "eclipselink.allow-zero-id"
property configures if zero
* is considered a valid id on a new entity. If the id is not considered
* valid and sequencing is enabled for the entity a new value will be
@@ -1131,12 +2027,13 @@
* @see org.eclipse.persistence.annotations.IdValidation
*
* @deprecated replaced by ID_VALIDATION property with value "NULL".
+ * @see #ID_VALIDATION
*/
public static final String ALLOW_ZERO_ID = "eclipselink.allow-zero-id";
/**
* The "eclipselink.id-validation"
property defines
- * which primary key componets values are considered invalid.
+ * which primary key components values are considered invalid.
* These values will be also overridden by sequencing.
* Note that Identity always overrides any existing id value
* and so does any sequence with shouldAlwaysOverrideExistingValue flag set to true.
@@ -1178,6 +2075,30 @@
public static final String ORM_SCHEMA_VALIDATION = "eclipselink.orm.validate.schema";
/**
+ * The "eclipselink.deploy-on-startup"
property controls whether
+ * EclipseLink creates the persistence unit when the application starts up, or
+ * when the persistence unit is first actually accessed by the application.
+ *
+ * Setting this to true causes the persistence unit to be created when the
+ * EntityManagerFactory is created, usually during deployment to a Java EE
+ * 7 container or servlet container. Enabling this option may increase
+ * startup time of the container/server, but will prevent the first request
+ * to the application from pausing while the persistence unit is deployed.
+ *
+ * When this property is set to false the persistence unit is not
+ * initialized until the first EntityManager is created or until metadata
+ * is requested from the EntityManagerFactory.
+ *
+ * When set to False, there is a known issue with Fields of static metamodel
+ * classes ("Entity_" classes) being null until the persistence unit is
+ * initialized. This behaviour won't affect applications unless they use
+ * the static metamodel feature. (See bug 383199)
+ * "eclipselink.validation-only"
property validates deployment
* which includes initializing descriptors but does not connect (no login to the database).
* "create-tables"
+ *
+ * "eclipselink.ddl-generation"
property."drop-tables"
+ *
+ * "eclipselink.ddl-generation"
property."drop-and-create-tables"
+ *
+ * "eclipselink.ddl-generation"
property."create-or-extend-tables"
+ *
+ * "eclipselink.ddl-generation"
property."none"
+ *
+ * "eclipselink.ddl-generation"
property,
+ * and is the default parameter value."eclipselink.metadata-source"
property configures the type of
+ * MetadataSource implementation to use to read Metadata
+ *
+ *
+ *
+ * @see MetadataSource
+ */
+ public static final String METADATA_SOURCE = "eclipselink.metadata-source";
+
+ /**
+ * the "eclipselink.metadata-source.send-refresh-command"
property
+ * works with cache coordination for a clustered environment to. If cache coordination
+ * is configured and the session is deployed on startup, this property controls the sending
+ * of RCM refresh metadata commands to the cluster. These commands will cause the remote
+ * instances to refresh their metadata.
+ *
+ * Defaults to true
+ *
+ * @see #COORDINATION_PROTOCOL
+ * @see #DEPLOY_ON_STARTUP
+ */
+ public static final String METADATA_SOURCE_RCM_COMMAND = "eclipselink.metadata-source.send-refresh-command";
+
+ /**
+ * The property "eclipselink.metadata-source.xml.file"
+ *
+ * "eclipselink.metadata-repository"
when an XML repository is being used."eclipselink.metadata-source.xml.URL"
+ *
+ * "eclipselink.metadata-repository"
when an XML repository is being used."eclipselink.metadata-source.properties.file"
+ *
+ * "eclipselink.application-location"
+ *
+ * "eclipselink.ddl-generation.output-mode"
property, with
+ * a setting of "sql-script"
(or "both"
) for
+ * DDL file(s) to be written."eclipselink.create-ddl-jdbc-file-name"
+ *
+ * "eclipselink.application-location"
property to specify a
+ * location on the file system for DDL file(s) to be written."eclipselink.drop-ddl-jdbc-file-name"
+ *
+ * "eclipselink.application-location"
property to specify a
+ * location on the file system for DDL file(s) to be written.createDDL.jdbc
+ *
+ * @see #CREATE_JDBC_DDL_FILE
+ */
public static final String DEFAULT_CREATE_JDBC_FILE_NAME = "createDDL.jdbc";
+
+ /**
+ * The default name of the DDL file which is used to drop database tables.
+ * Defaults to: dropDDL.jdbc
+ *
+ * @see #DROP_JDBC_DDL_FILE
+ */
public static final String DEFAULT_DROP_JDBC_FILE_NAME = "dropDDL.jdbc";
+
+ /**
+ * The system property INTERACT_WITH_DB
+ *
+ * eclipselink.ddl-generation
property) against a database.
-DINTERACT_WITH_DB=false
+ * will not output DDL to the database.true
- output DDL to the database
+ * false
- do not output DDL to the database
+ *
+ * @see #DDL_GENERATION
+ */
public static final String JAVASE_DB_INTERACTION = "INTERACT_WITH_DB";
/**
@@ -1219,11 +2329,72 @@
* DDL_DATABASE_GENERATION, DDL_BOTH_GENERATION ("sql-script", "database",
* "both") DDL_GENERATION must also be set, for this to have an effect.
* Default is DDL_DATABASE_GENERATION.
+ *
+ * @see #DEFAULT_DDL_GENERATION_MODE
+ * @see #DDL_DATABASE_GENERATION
+ * @see #DDL_SQL_SCRIPT_GENERATION
+ * @see #DDL_BOTH_GENERATION
*/
public static final String DDL_GENERATION_MODE = "eclipselink.ddl-generation.output-mode";
+
+ /**
+ * The "eclipselink.ddl-generation.index-foreign-keys"
property.
+ * Configures if an index should be automatically generated for foreign key constraints.
+ * It is normally recommended to have an index for a foreign key.
+ * By default indexes are not generated, most database also do not auto generate indexes, although some do.
+ * Values: "true" or "false" (default).
+ *
+ * @see #DDL_GENERATION
+ */
+ public static final String DDL_GENERATION_INDEX_FOREIGN_KEYS = "eclipselink.ddl-generation.index-foreign-keys";
+
+ /**
+ * The parameter value "sql-script"
+ *
+ * "eclipselink.ddl-generation.output-mode"
property."database"
+ *
+ * "eclipselink.ddl-generation.output-mode"
property,
+ * and is the default parameter value"both"
+ *
+ * "eclipselink.ddl-generation.output-mode"
property.eclipselink.ddl-generation.output-mode
parameter is configured
+ * to the default value of database
.
+ *
+ * @see #DDL_GENERATION_MODE
+ * @see #DDL_DATABASE_GENERATION
+ */
public static final String DEFAULT_DDL_GENERATION_MODE = DDL_DATABASE_GENERATION;
/**
@@ -1237,10 +2408,10 @@
/**
* Configures if updates should be ordered by primary key.
- * This can be used to avoid possible database deadlocks from concurrent threads
- * updating the same objects in different order.
+ * This can be used to avoid possible database deadlocks from concurrent
+ * threads updating the same objects in a different order.
* If not set to true, the order of updates is not guaranteed.
- * "false" by default.
+ * "true" by default.
*/
public static final String ORDER_UPDATES = "eclipselink.order-updates";
@@ -1251,17 +2422,50 @@
* Values (case insensitive):
*
*
*
* @see ProfilerType
*/
public static final String PROFILER = "eclipselink.profiler";
+
+ /**
+ * The "eclipselink.tuning"
property configures the type of
+ * tuner to use to configure the persistence unit.
+ * A SessionTuner can be used to define a template for a persistence unit configuration.
+ * It allows a set of configuration values to be configured as a single tuning option.
+ *
+ *
+ *
+ * @see TunerType
+ */
+ public static final String TUNING = "eclipselink.tuning";
/**
+ * The "eclipselink.memory.free-metadata"
property configures the JPA
+ * internal deployment metadata to be released after deployment.
+ * This conserves memory, as the metadata is no longer required, but make
+ * future deployments of any other application take longer, as the metadata must be re-allocated.
+ *
+ *
+ */
+ public static final String FREE_METADATA = "eclipselink.memory.free-metadata";
+
+ /**
* The "eclipselink.transaction.join-existing"
property Set to
* "true" this property forces persistence context to read through
* JTA-managed ("write") connection in case there is an active
@@ -1270,7 +2474,7 @@
* factory. Note that if the property set to "true" then objects read during
* transaction won't be placed into the shared cache unless they have been
* updated. Alternatively, to apply the property only to some
- * SessionManagers pass it to createEntityManager method.
+ * EntityManagers pass it to createEntityManager method.
*
@@ -1431,12 +2635,15 @@
* Values:
*
*
* by default the cache is not coordinated.
*
+ * @see CacheCoordinationProtocol
* @see Cache#coordinationType()
- * @see CacheCoordinationType
* @see RemoteCommandManager#setTransportManager(TransportManager)
*/
public static final String COORDINATION_PROTOCOL = "eclipselink.cache.coordination.protocol";
@@ -1445,6 +2652,7 @@
* The "eclipselink.cache.coordination.jms.host"
property
* configures cache coordination for a clustered environment. Only used for
* JMS coordination. Sets the URL for the JMS server hosting the topic.
+ * This is not required in the topic is distributed across the cluster (can be looked up in local JNDI).
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager#setTopicHostUrl(String)
@@ -1455,6 +2663,7 @@
* The "eclipselink.cache.coordination.jms.topic"
property
* configures cache coordination for a clustered environment. Only used for
* JMS coordination. Sets the JMS topic name.
+ * The default topic JNDI name is "jms/EclipseLinkTopic".
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager#setTopicName(String)
@@ -1465,6 +2674,7 @@
* The "eclipselink.cache.coordination.jms.factory"
property
* configures cache coordination for a clustered environment. Only used for
* JMS coordination. Sets the JMS topic connection factory name.
+ * The default topic connection factory JNDI name is "jms/EclipseLinkTopicConnectionFactory".
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager#setTopicConnectionFactoryName(String)
@@ -1487,6 +2697,7 @@
* property configures cache coordination for a clustered environment. Only
* used for RMI coordination. Sets the number of milliseconds to wait for
* announcements from other cluster members on startup.
+ * Default is 1000 milliseconds.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.DiscoveryManager#setAnnouncementDelay(int)
@@ -1498,6 +2709,7 @@
* property configures cache coordination for a clustered environment. Only
* used for RMI coordination. Sets the multicast socket group address. The
* multicast group is used to find other members of the cluster.
+ * The default address is 239.192.0.0.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.DiscoveryManager#setMulticastGroupAddress(String)
@@ -1510,6 +2722,7 @@
* property configures cache coordination for a clustered environment. Only
* used for RMI coordination. Sets the multicast socket group port. The
* multicast group port is used to find other members of the cluster.
+ * The default port is 3121.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.DiscoveryManager#setMulticastPort(int)
@@ -1541,6 +2754,9 @@
* configures cache coordination for a clustered environment. Only used for
* RMI coordination. Sets the URL of the host server. This is the URL that
* other cluster member should use to connect to this host.
+ * This may not be required in a clustered environment where JNDI is replicated.
+ * This can also be set as a System property or using a SessionCustomizer to avoid
+ * a separate persistence.xml per server.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.RemoteCommandManager#setUrl(String)
@@ -1561,6 +2777,7 @@
* the "eclipselink.cache.coordination.jndi.user"
property
* configures cache coordination for a clustered environment. Set the JNDI
* naming service user name.
+ * This is not normally require if connecting to the local server.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.TransportManager#setUserName(String)
@@ -1571,6 +2788,7 @@
* The "eclipselink.cache.coordination.jndi.password"
property
* configures cache coordination for a clustered environment. Set the JNDI
* naming service user name.
+ * This is not normally require if connecting to the local server.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.TransportManager#setPassword(String)
@@ -1582,6 +2800,7 @@
* "eclipselink.cache.coordination.jndi.initial-context-factory"
* property configures cache coordination for a clustered environment. Set
* the JNDI InitialContext factory.
+ * This is not normally require if connecting to the local server.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.TransportManager#setInitialContextFactoryName(String)
@@ -1616,10 +2835,40 @@
public static final String COORDINATION_ASYNCH = "eclipselink.cache.coordination.propagate-asynchronously";
/**
+ * the
+ * "eclipselink.cache.coordination.thread.pool.size"
+ * property configures thread pool size for cache coordination threads.
+ * RMI cache coordination will spawn one thread per node to send change notifications.
+ * RMI also spawns a thread to listen for new node notifications.
+ * JMS cache coordination will spawn one thread to receive JMS change notification messages (unless MDB is used).
+ * JMS also spawns a thread to process the change notificaiton (unless MDB is used).
+ * The default size is 32 threads.
+ * A size of 0 indicates no thread pool should be used, and threads will be spawned when required.
+ *
+ * @see #COORDINATION_PROTOCOL
+ * @see org.eclipse.persistence.platform.server.ServerPlatformBase#setThreadPoolSize(int)
+ */
+ public static final String COORDINATION_THREAD_POOL_SIZE = "eclipselink.cache.coordination.thread.pool.size";
+
+ /**
+ * the "eclipselink.cache.coordination.serializer"
property
+ * configures how cache coordination serializes message sent between nodes.
+ * By default Java serialization is used. Other serializer can be used for improved performance
+ * or integration with other systems.
+ * The full class name of the serializer class should be provided.
+ *
+ * @see #COORDINATION_PROTOCOL
+ * @see Serializer
+ * @see org.eclipse.persistence.sessions.coordination.RemoteCommandManager#setSerializer(Serializer)
+ */
+ public static final String COORDINATION_SERIALIZER = "eclipselink.cache.coordination.serializer";
+
+ /**
* the "eclipselink.cache.coordination.channel"
property
- * configures cache coordination for a clustered environment. Set if the
+ * configures cache coordination for a clustered environment. Set the
* channel for this cluster. All server's in the same channel will be
- * coordinated.
+ * coordinated. The default channel name is "EclipseLinkCommandChannel".
+ * If multiple EclipseLink deployment reside on the same network, they should use different channels.
*
* @see #COORDINATION_PROTOCOL
* @see org.eclipse.persistence.sessions.coordination.RemoteCommandManager#setChannel(String)
@@ -1627,6 +2876,196 @@
public static final String COORDINATION_CHANNEL = "eclipselink.cache.coordination.channel";
/**
+ * Indicates if it's a composite persistence unit ("true").
+ * The property must be specified in persistence.xml of a composite persistence unit.
+ * The property passed to createEntityManagerFactory method or in system properties is ignored.
+ * Composite persistence unit would contain all persistence units found in jar files specified by "eclipselink.remote.protocol"
property
+ * configures remote JPA for a client or server.
+ * This allows JPA to be access over RMI or other protocol from a remote Java client.
+ *
+ *
+ *
+ * @see RemoteProtocol
+ * @see org.eclipse.persistence.internal.sessions.remote.RemoteConnection
+ * @see RemoteSession
+ */
+ public static final String REMOTE_PROTOCOL = "eclipselink.remote.protocol";
+
+ /**
+ * The "eclipselink.remote.client.url"
property
+ * configures remote JPA for a client.
+ * This allows JPA to be access over RMI or other protocol from a remote Java client.
+ * The URL is the complete URL used to access the RMI server.
+ *
+ * @see REMOTE_PROTOCOL
+ */
+ public static final String REMOTE_URL = "eclipselink.remote.client.url";
+
+ /**
+ * The "eclipselink.remote.server.name"
property
+ * configures remote JPA for a server.
+ * This allows JPA to be access over RMI or other protocol from a remote Java client.
+ * The name is the name the server will be registered under in the RMI registry.
+ *
+ * @see REMOTE_PROTOCOL
+ */
+ public static final String REMOTE_SERVER_NAME = "eclipselink.remote.server.name";
+
+ /**
+ * The "eclipselink.nosql.connection-spec"
property.
+ * Allows the connection information for an NoSQL or EIS datasource to be specified.
+ * An NoSQL datasource is a non-relational datasource such as a legacy database, NoSQL database,
+ * XML database, transactional and messaging systems, or ERP systems.
+ * @see org.eclipse.persistence.eis.EISConnectionSpec
+ * @see org.eclipse.persistence.annotations.NoSQL
+ */
+ public static final String NOSQL_CONNECTION_SPEC = "eclipselink.nosql.connection-spec";
+
+ /**
+ * The "eclipselink.nosql.connection-factory"
property.
+ * Allows the JCA ConnectionFactory to be specified for a NoSQL or EIS adapter.
+ * An NoSQL datasource is a non-relational datasource such as a legacy database, NoSQL database,
+ * XML database, transactional and messaging systems, or ERP systems.
+ * @see javax.resource.cci.ConnectionFactory
+ */
+ public static final String NOSQL_CONNECTION_FACTORY = "eclipselink.nosql.connection-factory";
+
+ /**
+ * The "eclipselink.jdbc.connector"
property.
+ * Allows a custom connector to be used to define how to connect to the database.
+ * This is not required if a DataSource or JDBC DriverManager is used.
+ * It can be used to connect to a non standard connection pool,
+ * or provide additional customization in how a connection is obtained.
+ * @see org.eclipse.persistence.sessions.JNDIConnector
+ * @see org.eclipse.persistence.sessions.DefaultConnector
+ */
+ public static final String JDBC_CONNECTOR = "eclipselink.jdbc.connector";
+
+ /**
+ * Allows setting of NoSQL connection properties.
+ * The NoSQL specific property name should be appended to this prefix.
+ *
+ * "eclipselink.nosql.property.nosql.host"="localhost:5000"
+ *
+ * @see org.eclipse.persistence.eis.EISConnectionSpec
+ * @see org.eclipse.persistence.annotations.NoSQL
+ */
+ public static final String NOSQL_PROPERTY = "eclipselink.nosql.property.";
+
+ /**
+ * Allows setting of NoSQL user property.
+ * Note that "javax.persistence.jdbc.user" is also supported.
+ *
+ * @see org.eclipse.persistence.eis.EISConnectionSpec
+ * @see org.eclipse.persistence.annotations.NoSQL
+ */
+ public static final String NOSQL_USER = "eclipselink.nosql.property.user";
+
+ /**
+ * Allows setting of NoSQL password property.
+ * Note that "javax.persistence.jdbc.password" is also supported.
+ *
+ * @see org.eclipse.persistence.eis.EISConnectionSpec
+ * @see org.eclipse.persistence.annotations.NoSQL
+ */
+ public static final String NOSQL_PASSWORD = "eclipselink.nosql.property.password";
+
+ /**
+ * Allows passing of JDBC driver specific connection properties.
+ * This allows for properties to be set on the JDBC connection.
+ * The JDBC driver specific property name should be appended to this prefix.
+ *
+ * "eclipselink.jdbc.property.defaultRowPrefetch"="25"
+ *
+ * @see org.eclipse.persistence.sessions.DatasourceLogin#setProperty(String, Object)
+ */
+ public static final String JDBC_PROPERTY = "eclipselink.jdbc.property.";
+
+ /**
+ * Allows to set whether a query should by default use ResultSet Access optimization.
+ * The optimization allows to avoid getting objects from ResultSet if the cached object used.
+ * For instance, SELECT id, blob FROM .. with optimization would extract only "id" from ResultSet,
+ * and if there is a corresponding cached object and it's not a refresh query, "blob" would never be extracted.
+ * The draw back is keeping ResultSet and connection longer: until objects are built
+ * (or extracted from cache) for all rows and all eager references (direct and nested) for each row.
+ * Note that the optimization would not be used if it contradicts other query settings.
+ *
+ *
+ * Default value is
+ * ObjectLevelReadQuery.isResultSetAccessOptimizedQueryDefault = false;
+ *
+ * @see org.eclipse.persistence.internal.sessions.AbstractSession#setShouldOptimizeResultSetAccess(boolean)
+ * @see org.eclipse.persistence.queries.ObjectLevelReadQuery#setIsResultSetAccessOptimizedQuery(boolean)
+ */
+ public static final String JDBC_RESULT_SET_ACCESS_OPTIMIZATION = "eclipselink.jdbc.result-set-access-optimization";
+
+ /**
+ * Specifies class name for session serializer (must implement org.eclipse.persistence.sessions.serializers.Serializer)
+ * "eclipselink.weaving.rest"
property configures
+ * whether classes will be weaved to support our JPA_RS functionality
+ *
+ *
+ */
+ public static final String WEAVING_REST = "eclipselink.weaving.rest";
+
/**
* INTERNAL: Return the overridden log string.
*/
diff -Nru eclipselink-2.1.3/org/eclipse/persistence/config/PessimisticLock.java eclipselink-2.5.1/org/eclipse/persistence/config/PessimisticLock.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/PessimisticLock.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/PessimisticLock.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/ProfilerType.java eclipselink-2.5.1/org/eclipse/persistence/config/ProfilerType.java
--- eclipselink-2.1.3/org/eclipse/persistence/config/ProfilerType.java 2010-11-03 19:10:42.000000000 +0000
+++ eclipselink-2.5.1/org/eclipse/persistence/config/ProfilerType.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.
@@ -19,7 +19,7 @@
*
* properties.add(PersistenceUnitProperties.ProfilerType, ProfilerType.PerformanceProfiler);
+ * properties.add(PersistenceUnitProperties.PROFILER, ProfilerType.PerformanceProfiler);
* "eclipselink.jdbc.allow-native-sql-query"
property
+ * specifies whether a single native SQL query should override a persistence
+ * unit level setting (eclipselink.jdbc.allow-native-sql-queries). The PU
+ * level flag is of particular importance within a multitenant to minimize
+ * the potential impact of revealing multitenant. However in some cases the
+ * application may need to allow certain native SQL queries through.
+ *
+ *
+ *
+ * @see DatabaseQuery#setAllowNativeSQLQuery(boolean) {
+ */
+ public static final String ALLOW_NATIVE_SQL_QUERY = "eclipselink.jdbc.allow-native-sql-query";
+
+ /**
* "eclipselink.history.as-of"
* properties.add(PersistenceUnitProperties.REMOTE_PROTOCOL, RemoteProtocol.RMI);
+ * properties.add(PersistenceUnitProperties.TUNING, TunerType.Safe);
+ *