diff options
author | nhauge | 2012-04-02 23:02:58 +0000 |
---|---|---|
committer | nhauge | 2012-04-02 23:02:58 +0000 |
commit | 97d8082927c20519c8ad4aba6be5bd771c52c94f (patch) | |
tree | d264243e0a8fa4479ee2419a0f84280f4a6299b9 /jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context | |
parent | e37fe558e61f33ed18c7a38c268b995d984b8f9d (diff) | |
download | webtools.dali-201204020000.tar.gz webtools.dali-201204020000.tar.xz webtools.dali-201204020000.zip |
This commit was manufactured by cvs2svn to create tag 'v201204020000'.v201204020000
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context')
114 files changed, 0 insertions, 7347 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkAccessMethodsHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkAccessMethodsHolder.java deleted file mode 100644 index e643126a28..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkAccessMethodsHolder.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -/** - * Common interface that can be used by clients interested only in a type - * or attribute's access setting (e.g. a UI composite). - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkAccessMethodsHolder - extends EclipseLinkReadOnlyAccessMethodsHolder -{ - /** - * Return the specified get method; - */ - String getSpecifiedGetMethod(); - - /** - * Set the specified access type. - */ - void setSpecifiedGetMethod(String newSpecifiedGetMethod); - - /** - * String constant associated with changes to the specified get method - */ - String SPECIFIED_GET_METHOD_PROPERTY = "specifiedGetMethod"; //$NON-NLS-1$ - - /** - * Return the default get method - */ - String getDefaultGetMethod(); - - /** - * String constant associated with changes to the default get method - */ - String DEFAULT_GET_METHOD_PROPERTY = "defaultGetMethod"; //$NON-NLS-1$ - - /** - * String constant for the default get method - */ - String DEFAULT_GET_METHOD = "get"; //$NON-NLS-1$ - - /** - * Return the specified set method; - */ - String getSpecifiedSetMethod(); - - /** - * Set the specified access type. - */ - void setSpecifiedSetMethod(String newSpecifiedSetMethod); - - /** - * String constant associated with changes to the specified get method - */ - String SPECIFIED_SET_METHOD_PROPERTY = "specifiedSetMethod"; //$NON-NLS-1$ - - /** - * Return the default set method, never null - */ - String getDefaultSetMethod(); - - /** - * String constant associated with changes to the default set method - */ - String DEFAULT_SET_METHOD_PROPERTY = "defaultSetMethod"; //$NON-NLS-1$ - - /** - * String constant for the default set method - */ - String DEFAULT_SET_METHOD = "set"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkAccessType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkAccessType.java deleted file mode 100644 index e897f3453f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkAccessType.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AccessType; - -/** - * Context model corresponding to:<ul> - * <li>the XML resource model - * {@link org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_1.EclipseLinkAccessType}, - * which corresponds to the <code>access</code> element in the - * <code>orm.xml</code> file. - * <li>the Java resource model {@link org.eclipse.jpt.jpa.core.resource.java.AccessType} - * which corresponds to the <code>javax.persistence.Access</code> annotation. - * </ul> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public class EclipseLinkAccessType extends AccessType { - - public static final AccessType VIRTUAL = new AccessType( - null, - org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_1.EclipseLinkAccessType.VIRTUAL, - "Virtual" //$NON-NLS-1$ - ); - - - public EclipseLinkAccessType(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType, String ormAccessType, String displayString) { - super(javaAccessType, ormAccessType, displayString); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkArrayMapping2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkArrayMapping2_3.java deleted file mode 100644 index 5f2b19d96d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkArrayMapping2_3.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; -import org.eclipse.jpt.jpa.core.context.ColumnMapping; -import org.eclipse.jpt.jpa.core.context.ConvertibleMapping; - -/** - * EclipseLink array mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkArrayMapping2_3 - extends AttributeMapping, ConvertibleMapping, EclipseLinkConvertibleMapping, ColumnMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicCollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicCollectionMapping.java deleted file mode 100644 index dba2c1bfac..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicCollectionMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * EclipseLink basic collection mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkBasicCollectionMapping - extends AttributeMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicMapMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicMapMapping.java deleted file mode 100644 index d39716b6d9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicMapMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * EclipseLink basic map mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkBasicMapMapping - extends AttributeMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicMapping.java deleted file mode 100644 index 7483180887..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkBasicMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.BasicMapping; - -/** - * EclipseLink basic mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkBasicMapping - extends BasicMapping, EclipseLinkConvertibleMapping -{ - EclipseLinkMutable getMutable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheCoordinationType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheCoordinationType.java deleted file mode 100644 index ea8581e80d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheCoordinationType.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - - -/** - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public enum EclipseLinkCacheCoordinationType { - - SEND_OBJECT_CHANGES, - INVALIDATE_CHANGED_OBJECTS, - SEND_NEW_OBJECTS_WITH_CHANGES, - NONE; - - - public static EclipseLinkCacheCoordinationType fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheCoordinationType javaCacheCoordinationType) { - if (javaCacheCoordinationType == null) { - return null; - } - switch (javaCacheCoordinationType) { - case SEND_OBJECT_CHANGES: - return SEND_OBJECT_CHANGES; - case INVALIDATE_CHANGED_OBJECTS: - return INVALIDATE_CHANGED_OBJECTS; - case SEND_NEW_OBJECTS_WITH_CHANGES: - return SEND_NEW_OBJECTS_WITH_CHANGES; - case NONE: - return NONE; - default: - throw new IllegalArgumentException("unknown cache coordination type: " + javaCacheCoordinationType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheCoordinationType toJavaResourceModel(EclipseLinkCacheCoordinationType cacheCoordinationType) { - if (cacheCoordinationType == null) { - return null; - } - switch (cacheCoordinationType) { - case SEND_OBJECT_CHANGES: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheCoordinationType.SEND_OBJECT_CHANGES; - case INVALIDATE_CHANGED_OBJECTS: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheCoordinationType.INVALIDATE_CHANGED_OBJECTS; - case SEND_NEW_OBJECTS_WITH_CHANGES: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheCoordinationType.SEND_NEW_OBJECTS_WITH_CHANGES; - case NONE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheCoordinationType.NONE; - default: - throw new IllegalArgumentException("unknown cache coordination type: " + cacheCoordinationType); //$NON-NLS-1$ - } - } - - - public static EclipseLinkCacheCoordinationType fromOrmResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheCoordinationType ormCacheCoordinationType) { - if (ormCacheCoordinationType == null) { - return null; - } - switch (ormCacheCoordinationType) { - case SEND_OBJECT_CHANGES: - return SEND_OBJECT_CHANGES; - case INVALIDATE_CHANGED_OBJECTS: - return INVALIDATE_CHANGED_OBJECTS; - case SEND_NEW_OBJECTS_WITH_CHANGES: - return SEND_NEW_OBJECTS_WITH_CHANGES; - case NONE: - return NONE; - default: - throw new IllegalArgumentException("unknown cache coordination type: " + ormCacheCoordinationType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheCoordinationType toOrmResourceModel(EclipseLinkCacheCoordinationType cacheCoordinationType) { - if (cacheCoordinationType == null) { - return null; - } - switch (cacheCoordinationType) { - case SEND_OBJECT_CHANGES: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheCoordinationType.SEND_OBJECT_CHANGES; - case INVALIDATE_CHANGED_OBJECTS: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheCoordinationType.INVALIDATE_CHANGED_OBJECTS; - case SEND_NEW_OBJECTS_WITH_CHANGES: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheCoordinationType.SEND_NEW_OBJECTS_WITH_CHANGES; - case NONE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheCoordinationType.NONE; - default: - throw new IllegalArgumentException("unknown cache coordination type: " + cacheCoordinationType); //$NON-NLS-1$ - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheIsolationType2_2.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheIsolationType2_2.java deleted file mode 100644 index c01e3c2000..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheIsolationType2_2.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - - -/** - * corresponds to EclipseLink org.eclipse.persistence.config.CacheIsolationType - * which was added in EclipseLink 2.2 - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public enum EclipseLinkCacheIsolationType2_2 { - - SHARED, - PROTECTED, - ISOLATED; - - - public static EclipseLinkCacheIsolationType2_2 fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheIsolationType2_2 javaCacheIsolationType) { - if (javaCacheIsolationType == null) { - return null; - } - switch (javaCacheIsolationType) { - case SHARED: - return SHARED; - case PROTECTED: - return PROTECTED; - case ISOLATED: - return ISOLATED; - default: - throw new IllegalArgumentException("unknown cache isolation type: " + javaCacheIsolationType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheIsolationType2_2 toJavaResourceModel(EclipseLinkCacheIsolationType2_2 cacheIsolationType) { - if (cacheIsolationType == null) { - return null; - } - switch (cacheIsolationType) { - case SHARED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheIsolationType2_2.SHARED; - case PROTECTED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheIsolationType2_2.PROTECTED; - case ISOLATED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheIsolationType2_2.ISOLATED; - default: - throw new IllegalArgumentException("unknown cache isolation type: " + cacheIsolationType); //$NON-NLS-1$ - } - } - - - public static EclipseLinkCacheIsolationType2_2 fromOrmResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_2.CacheIsolationType ormCacheIsolationType) { - if (ormCacheIsolationType == null) { - return null; - } - switch (ormCacheIsolationType) { - case SHARED: - return SHARED; - case PROTECTED: - return PROTECTED; - case ISOLATED: - return ISOLATED; - default: - throw new IllegalArgumentException("unknown cache isolation type: " + ormCacheIsolationType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_2.CacheIsolationType toOrmResourceModel(EclipseLinkCacheIsolationType2_2 cacheIsolationType) { - if (cacheIsolationType == null) { - return null; - } - switch (cacheIsolationType) { - case SHARED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_2.CacheIsolationType.SHARED; - case PROTECTED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_2.CacheIsolationType.PROTECTED; - case ISOLATED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_2.CacheIsolationType.ISOLATED; - default: - throw new IllegalArgumentException("unknown cache isolation type: " + cacheIsolationType); //$NON-NLS-1$ - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheType.java deleted file mode 100644 index 921db50bdd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCacheType.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - - -/** - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public enum EclipseLinkCacheType { - - SOFT_WEAK, - HARD_WEAK, - WEAK, - SOFT, - FULL, - CACHE, - NONE; - - - public static EclipseLinkCacheType fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType javaCacheType) { - if (javaCacheType == null) { - return null; - } - switch (javaCacheType) { - case FULL: - return FULL; - case WEAK: - return WEAK; - case SOFT: - return SOFT; - case SOFT_WEAK: - return SOFT_WEAK; - case HARD_WEAK: - return HARD_WEAK; - case CACHE: - return CACHE; - case NONE: - return NONE; - default: - throw new IllegalArgumentException("unknown cache type: " + javaCacheType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType toJavaResourceModel(EclipseLinkCacheType cacheType) { - if (cacheType == null) { - return null; - } - switch (cacheType) { - case FULL: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.FULL; - case WEAK: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.WEAK; - case SOFT: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.SOFT; - case SOFT_WEAK: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.SOFT_WEAK; - case HARD_WEAK: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.HARD_WEAK; - case CACHE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.CACHE; - case NONE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.CacheType.NONE; - default: - throw new IllegalArgumentException("unknown cache type: " + cacheType); //$NON-NLS-1$ - } - } - - - public static EclipseLinkCacheType fromOrmResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType ormCacheType) { - if (ormCacheType == null) { - return null; - } - switch (ormCacheType) { - case FULL: - return FULL; - case WEAK: - return WEAK; - case SOFT: - return SOFT; - case SOFT_WEAK: - return SOFT_WEAK; - case HARD_WEAK: - return HARD_WEAK; - case CACHE: - return CACHE; - case NONE: - return NONE; - default: - throw new IllegalArgumentException("unknown cache type: " + ormCacheType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType toOrmResourceModel(EclipseLinkCacheType cacheType) { - if (cacheType == null) { - return null; - } - switch (cacheType) { - case FULL: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.FULL; - case WEAK: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.WEAK; - case SOFT: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.SOFT; - case SOFT_WEAK: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.SOFT_WEAK; - case HARD_WEAK: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.HARD_WEAK; - case CACHE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.CACHE; - case NONE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.CacheType.NONE; - default: - throw new IllegalArgumentException("unknown cache type: " + cacheType); //$NON-NLS-1$ - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCaching.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCaching.java deleted file mode 100644 index a1e9a42cec..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCaching.java +++ /dev/null @@ -1,237 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * EclipseLink caching - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 2.1 - */ -// TODO bjv EclipseLinkCachingPolicy -public interface EclipseLinkCaching - extends JpaContextNode -{ - // ********** type ********** - - /** - * This is the combination of defaultType and specifiedType. - * If getSpecifiedType() returns null, then return getDefaultType() - */ - EclipseLinkCacheType getType(); - - EclipseLinkCacheType getSpecifiedType(); - void setSpecifiedType(EclipseLinkCacheType type); - String SPECIFIED_TYPE_PROPERTY = "specifiedType"; //$NON-NLS-1$ - - EclipseLinkCacheType getDefaultType(); - String DEFAULT_TYPE_PROPERTY = "defaultType"; //$NON-NLS-1$ - EclipseLinkCacheType DEFAULT_TYPE = EclipseLinkCacheType.SOFT_WEAK; - - - // ********** size ********** - - /** - * This is the combination of defaultSize and specifiedSize. - * If getSpecifiedSize() returns null, then return getDefaultSize() - */ - int getSize(); - - Integer getSpecifiedSize(); - void setSpecifiedSize(Integer size); - String SPECIFIED_SIZE_PROPERTY = "specifiedSize"; //$NON-NLS-1$ - - int getDefaultSize(); - String DEFAULT_SIZE_PROPERTY = "defaultSize"; //$NON-NLS-1$ - int DEFAULT_SIZE = 100; - - - // ********** shared ********** - - /** - * This is the combination of defaultShared and specifiedShared. - * If getSpecifiedShared() returns null, then return isDefaultShared() - */ - boolean isShared(); - - Boolean getSpecifiedShared(); - - /** - * Specifying <em>shared</em> <code>false</code> will return the following - * caching settings to their defaults:<ul> - * <li>type - * <li>size - * <li>always refresh - * <li>refresh only if newer - * <li>disable hits - * <li>coordination type - * </ul> - * Additionally, the following settings will be cleared:<ul> - * <li>expiry - * <li>expiry time of day - * </ul> - * These settings do not apply to an unchared cache. - */ - void setSpecifiedShared(Boolean shared); - String SPECIFIED_SHARED_PROPERTY = "specifiedShared"; //$NON-NLS-1$ - - boolean isDefaultShared(); - String DEFAULT_SHARED_PROPERTY = "defaultShared"; //$NON-NLS-1$ - boolean DEFAULT_SHARED = true; - - - // ********** always refresh ********** - - /** - * This is the combination of defaultAlwaysRefresh and specifiedAlwaysRefresh. - * If getSpecifiedAlwaysRefresh() returns null, then return isDefaultAlwaysRefresh() - */ - boolean isAlwaysRefresh(); - - Boolean getSpecifiedAlwaysRefresh(); - void setSpecifiedAlwaysRefresh(Boolean alwaysRefresh); - String SPECIFIED_ALWAYS_REFRESH_PROPERTY = "specifiedAlwaysRefresh"; //$NON-NLS-1$ - - boolean isDefaultAlwaysRefresh(); - String DEFAULT_ALWAYS_REFRESH_PROPERTY = "defaultAlwaysRefresh"; //$NON-NLS-1$ - boolean DEFAULT_ALWAYS_REFRESH = false; - - - // ********** refresh only if newer ********** - - /** - * This is the combination of defaultRefreshOnlyIfNewer and specifiedRefreshOnlyIfNewer. - * If getSpecifiedRefreshOnlyIfNewer() returns null, then return isDefaultRefreshOnlyIfNewer() - */ - boolean isRefreshOnlyIfNewer(); - - Boolean getSpecifiedRefreshOnlyIfNewer(); - void setSpecifiedRefreshOnlyIfNewer(Boolean refreshOnlyIfNewer); - String SPECIFIED_REFRESH_ONLY_IF_NEWER_PROPERTY = "specifiedRefreshOnlyIfNewer"; //$NON-NLS-1$ - - boolean isDefaultRefreshOnlyIfNewer(); - String DEFAULT_REFRESH_ONLY_IF_NEWER_PROPERTY = "defaultRefreshOnlyIfNewer"; //$NON-NLS-1$ - boolean DEFAULT_REFRESH_ONLY_IF_NEWER = false; - - - // ********** disable hits ********** - - /** - * This is the combination of defaultDisableHits and specifiedDisableHits. - * If getSpecifiedDisableHits() returns null, then return getDefaultDisableHits() - */ - boolean isDisableHits(); - - Boolean getSpecifiedDisableHits(); - void setSpecifiedDisableHits(Boolean disableHits); - String SPECIFIED_DISABLE_HITS_PROPERTY = "specifiedDisableHits"; //$NON-NLS-1$ - - boolean isDefaultDisableHits(); - String DEFAULT_DISABLE_HITS_PROPERTY = "defaultDisableHits"; //$NON-NLS-1$ - boolean DEFAULT_DISABLE_HITS = false; - - - // ********** coordination type ********** - - /** - * This is the combination of defaultCoordinationType and specifiedCoordinationType. - * If getSpecifiedCoordinationType() returns null, then return getDefaultCoordinationType() - */ - EclipseLinkCacheCoordinationType getCoordinationType(); - - EclipseLinkCacheCoordinationType getSpecifiedCoordinationType(); - void setSpecifiedCoordinationType(EclipseLinkCacheCoordinationType coordinationType); - String SPECIFIED_COORDINATION_TYPE_PROPERTY = "specifiedCoordinationType"; //$NON-NLS-1$ - - EclipseLinkCacheCoordinationType getDefaultCoordinationType(); - String DEFAULT_COORDINATION_TYPE_PROPERTY = "defaultCoordinationType"; //$NON-NLS-1$ - EclipseLinkCacheCoordinationType DEFAULT_COORDINATION_TYPE = EclipseLinkCacheCoordinationType.SEND_OBJECT_CHANGES; - - - // ********** expiry ********** - - /** - * corresponds to the Cache expiry element. If this returns - * a non-null value then getExpiryTimeOfDay will return null. - * It is not valid to specify both - */ - Integer getExpiry(); - - /** - * Setting this to a non-null value will set timeOfDayExpiry to null - */ - void setExpiry(Integer expiry); - String EXPIRY_PROPERTY = "expiry"; //$NON-NLS-1$ - - - // ********** expiry time of day ********** - - /** - * corresponds to the Cache expiryTimeOfDay annotation or xml element. - * If this returns a non-null value then getExpiry will return null. - * It is not valid to specify both. - */ - EclipseLinkTimeOfDay getExpiryTimeOfDay(); - String EXPIRY_TIME_OF_DAY_PROPERTY = "expiryTimeOfDay"; //$NON-NLS-1$ - - /** - * Add Cache expiryTimeOfDay annotation or xml element, this will set - * Expiry to null as it is not valid to set both expiry and timeOfDayExpiry - */ - EclipseLinkTimeOfDay addExpiryTimeOfDay(); - - /** - * Removes the Cache expiryTimeOfDay annotation/xml element - */ - void removeExpiryTimeOfDay(); - - - // ********** existence type ********** - // TODO bjv rename existenceCheckingPolicy - /** - * This is the combination of defaultExistenceType and specifiedExistenceType. - * If getSpecifiedExistenceType() returns null, then return getDefaultExistenceType() - */ - EclipseLinkExistenceType getExistenceType(); - - EclipseLinkExistenceType getSpecifiedExistenceType(); - void setSpecifiedExistenceType(EclipseLinkExistenceType type); - String SPECIFIED_EXISTENCE_TYPE_PROPERTY = "specifiedExistenceType"; //$NON-NLS-1$ - - EclipseLinkExistenceType getDefaultExistenceType(); - String DEFAULT_EXISTENCE_TYPE_PROPERTY = "defaultExistenceType"; //$NON-NLS-1$ - EclipseLinkExistenceType DEFAULT_EXISTENCE_TYPE = EclipseLinkExistenceType.CHECK_DATABASE; - - - // ********** isolation added in EclipseLink 2.2 ********** - - /** - * This is the combination of defaultIsolation and specifiedIsolation. - * If getSpecifiedIsolation() returns null, then return getDefaultIsolation() - */ - EclipseLinkCacheIsolationType2_2 getIsolation(); - - EclipseLinkCacheIsolationType2_2 getSpecifiedIsolation(); - void setSpecifiedIsolation(EclipseLinkCacheIsolationType2_2 isolation); - String SPECIFIED_ISOLATION_PROPERTY = "specifiedIsolation"; //$NON-NLS-1$ - - EclipseLinkCacheIsolationType2_2 getDefaultIsolation(); - String DEFAULT_ISOLATION_PROPERTY = "defaultIsolation"; //$NON-NLS-1$ - EclipseLinkCacheIsolationType2_2 DEFAULT_ISOLATION = EclipseLinkCacheIsolationType2_2.SHARED; - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkChangeTracking.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkChangeTracking.java deleted file mode 100644 index bf4afe83cd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkChangeTracking.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * EclipseLink change tracking - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkChangeTracking - extends JpaContextNode -{ - /** - * Return the specified type if it is present, otherwise return the default - * type. - */ - EclipseLinkChangeTrackingType getType(); - - EclipseLinkChangeTrackingType getSpecifiedType(); - void setSpecifiedType(EclipseLinkChangeTrackingType type); - String SPECIFIED_TYPE_PROPERTY = "specifiedType"; //$NON-NLS-1$ - - EclipseLinkChangeTrackingType getDefaultType(); - String DEFAULT_TYPE_PROPERTY = "defaultType"; //$NON-NLS-1$ - EclipseLinkChangeTrackingType DEFAULT_TYPE = EclipseLinkChangeTrackingType.AUTO; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkChangeTrackingType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkChangeTrackingType.java deleted file mode 100644 index 114d5a75f6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkChangeTrackingType.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlChangeTrackingType; - - -/** - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public enum EclipseLinkChangeTrackingType { - - ATTRIBUTE, - OBJECT, - DEFERRED, - AUTO; - - - public static EclipseLinkChangeTrackingType fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.ChangeTrackingType javaChangeTrackingType) { - if (javaChangeTrackingType == null) { - return null; - } - switch (javaChangeTrackingType) { - case ATTRIBUTE: - return ATTRIBUTE; - case OBJECT: - return OBJECT; - case DEFERRED: - return DEFERRED; - case AUTO: - return AUTO; - default: - throw new IllegalArgumentException("unknown change tracking type: " + javaChangeTrackingType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.ChangeTrackingType toJavaResourceModel(EclipseLinkChangeTrackingType changeTrackingType) { - if (changeTrackingType == null) { - return null; - } - switch (changeTrackingType) { - case ATTRIBUTE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ChangeTrackingType.ATTRIBUTE; - case OBJECT: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ChangeTrackingType.OBJECT; - case DEFERRED: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ChangeTrackingType.DEFERRED; - case AUTO: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ChangeTrackingType.AUTO; - default: - throw new IllegalArgumentException("unknown change tracking type: " + changeTrackingType); //$NON-NLS-1$ - } - } - - public static EclipseLinkChangeTrackingType fromOrmResourceModel(XmlChangeTrackingType ormChangeTrackingType) { - if (ormChangeTrackingType == null) { - return null; - } - switch (ormChangeTrackingType) { - case ATTRIBUTE: - return ATTRIBUTE; - case OBJECT: - return OBJECT; - case DEFERRED: - return DEFERRED; - case AUTO: - return AUTO; - default: - throw new IllegalArgumentException("unknown change tracking type: " + ormChangeTrackingType); //$NON-NLS-1$ - } - } - - public static XmlChangeTrackingType toOrmResourceModel(EclipseLinkChangeTrackingType changeTrackingType) { - if (changeTrackingType == null) { - return null; - } - switch (changeTrackingType) { - case ATTRIBUTE: - return XmlChangeTrackingType.ATTRIBUTE; - case OBJECT: - return XmlChangeTrackingType.OBJECT; - case DEFERRED: - return XmlChangeTrackingType.DEFERRED; - case AUTO: - return XmlChangeTrackingType.AUTO; - default: - throw new IllegalArgumentException("unknown change tracking type: " + changeTrackingType); //$NON-NLS-1$ - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConversionValue.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConversionValue.java deleted file mode 100644 index af0c1650e7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConversionValue.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * Corresponds to a ConversionValue resource model object - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkConversionValue - extends JpaContextNode -{ - EclipseLinkObjectTypeConverter getParent(); - - String getDataValue(); - void setDataValue(String dataValue); - String DATA_VALUE_PROPERTY = "dataValue"; //$NON-NLS-1$ - - String getObjectValue(); - void setObjectValue(String objectValue); - String OBJECT_VALUE_PROPERTY = "objectValue"; //$NON-NLS-1$ - - /** - * Return whether the conversion value has the same state as the specified - * conversion value. - */ - boolean isEquivalentTo(EclipseLinkConversionValue conversionValue); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConvert.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConvert.java deleted file mode 100644 index e37f336d91..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConvert.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit; - -/** - * EclipseLink convert (not to be confused with EclipseLink converter) - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkConvert - extends Converter -{ - - EclipseLinkPersistenceUnit getPersistenceUnit(); - - String getConverterName(); - - String getSpecifiedConverterName(); - void setSpecifiedConverterName(String converterName); - String SPECIFIED_CONVERTER_NAME_PROPERTY = "specifiedConverterName"; //$NON-NLS-1$ - - String getDefaultConverterName(); - String DEFAULT_CONVERTER_NAME_PROPERTY = "defaultConverterName"; //$NON-NLS-1$ - - /** - * Reserved name for specifying a serialized object converter. - * In this case a corresponding @CustomConverter is unnecessary. - */ - String SERIALIZED_CONVERTER = "serialized"; //$NON-NLS-1$ - - /** - * Reserved name for specifying a class instance converter. - * Will use a ClassInstanceConverter - * on the associated mapping. When using a ClassInstanceConverter the database representation is a - * String representing the Class name and the object-model representation is an instance - * of that class built with the zero-argument constructor. - * In this case a corresponding @CustomConverter is unnecessary. - */ - String CLASS_INSTANCE_CONVERTER = "class-instance"; //$NON-NLS-1$ - - /** - * Reserved name for specifying no converter. - * This can be used to override a situation where either - * another converter is defaulted or another converter is set. - * In this case a corresponding @CustomConverter is unnecessary. - */ - String NO_CONVERTER = "none"; //$NON-NLS-1$ - - String[] RESERVED_CONVERTER_NAMES = {NO_CONVERTER, CLASS_INSTANCE_CONVERTER, SERIALIZED_CONVERTER}; - - String DEFAULT_CONVERTER_NAME = NO_CONVERTER; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java deleted file mode 100644 index c10376fc63..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; -
import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable; -import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode; - -/** - * EclipseLink converter:<ul> - * <li>Type ({@link EclipseLinkTypeConverter}) - * <li>Object Type ({@link EclipseLinkObjectTypeConverter}) - * <li>Struct ({@link EclipseLinkStructConverter}) - * <li>Custom ({@link EclipseLinkCustomConverter}) - * </ul> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkConverter - extends JpaNamedContextNode -{ - /** - * Return the converter's type. - */ - Class<? extends EclipseLinkConverter> getType(); - @SuppressWarnings("unchecked") - Iterable<Class<? extends EclipseLinkConverter>> TYPES = new ArrayIterable<Class<? extends EclipseLinkConverter>>( - EclipseLinkCustomConverter.class, - EclipseLinkObjectTypeConverter.class, - EclipseLinkStructConverter.class, - EclipseLinkTypeConverter.class - ); - - - /** - * Return the character to be used for browsing or creating the converter - * class {@link org.eclipse.jdt.core.IType IType}. - * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char) - */ - char getEnclosingTypeSeparator(); -} - diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverterClassConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverterClassConverter.java deleted file mode 100644 index a3f400d922..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverterClassConverter.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -/** - * Corresponds to a *ConverterClassConverter resource model object - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.4 - */ - -public interface EclipseLinkConverterClassConverter - extends EclipseLinkConverter -{ - String getConverterClass(); - String CONVERTER_CLASS_PROPERTY = "converterClass"; //$NON-NLS-1$ - void setConverterClass(String converterClass); - - String getFullyQualifiedConverterClass(); - String FULLY_QUALIFIED_CONVERTER_CLASS_PROPERTY = "fullyQualifiedConverterClass"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverterContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverterContainer.java deleted file mode 100644 index 826c5e6ddd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverterContainer.java +++ /dev/null @@ -1,184 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.JpaContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCustomConverter; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkObjectTypeConverter; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkStructConverter; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTypeConverter; - -/** - * EclipseLink converter container - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkConverterContainer - extends JpaContextNode -{ - Iterable<EclipseLinkConverter> getConverters(); - - int getConvertersSize(); - - int getNumberSupportedConverters(); - - - //************ customConverters ********************* - - /** - * Return a list iterator of the custom converters. - * This will not be null. - */ - ListIterable<? extends EclipseLinkCustomConverter> getCustomConverters(); - - /** - * Return the number of custom converters. - */ - int getCustomConvertersSize(); - - /** - * Add a custom converter to the converter holder, return the object representing it. - */ - EclipseLinkCustomConverter addCustomConverter(int index); - - /** - * Remove the custom converter at the index from the converter holder. - */ - void removeCustomConverter(int index); - - /** - * Remove the custom converter at from the converter holder. - */ - void removeCustomConverter(EclipseLinkCustomConverter converter); - - /** - * Move the custom converter from the source index to the target index. - */ - void moveCustomConverter(int targetIndex, int sourceIndex); - - String CUSTOM_CONVERTERS_LIST = "customConverters"; //$NON-NLS-1$ - - - //************ object type converters ********************* - - /** - * Return a list iterator of the object type converters. - * This will not be null. - */ - ListIterable<? extends EclipseLinkObjectTypeConverter> getObjectTypeConverters(); - - /** - * Return the number of object type converters. - */ - int getObjectTypeConvertersSize(); - - /** - * Add a object type converter to the converter holder, return the object representing it. - */ - EclipseLinkObjectTypeConverter addObjectTypeConverter(int index); - - /** - * Remove the object type converter at the index from the converter holder. - */ - void removeObjectTypeConverter(int index); - - /** - * Remove the object type converter at from the converter holder. - */ - void removeObjectTypeConverter(EclipseLinkObjectTypeConverter converter); - - /** - * Move the object type converter from the source index to the target index. - */ - void moveObjectTypeConverter(int targetIndex, int sourceIndex); - - String OBJECT_TYPE_CONVERTERS_LIST = "objectTypeConverters"; //$NON-NLS-1$ - - - //************ struct converters ********************* - - /** - * Return a list iterator of the struct converters. - * This will not be null. - */ - ListIterable<? extends EclipseLinkStructConverter> getStructConverters(); - - /** - * Return the number of struct converters. - */ - int getStructConvertersSize(); - - /** - * Add a struct converter to the converter holder, return the object representing it. - */ - EclipseLinkStructConverter addStructConverter(int index); - - /** - * Remove the struct converter at the index from the converter holder. - */ - void removeStructConverter(int index); - - /** - * Remove the struct converter at from the converter holder. - */ - void removeStructConverter(EclipseLinkStructConverter converter); - - /** - * Move the struct converter from the source index to the target index. - */ - void moveStructConverter(int targetIndex, int sourceIndex); - - String STRUCT_CONVERTERS_LIST = "structConverters"; //$NON-NLS-1$ - - - //************ type converters ********************* - - /** - * Return a list iterator of the type converters. - * This will not be null. - */ - ListIterable<? extends EclipseLinkTypeConverter> getTypeConverters(); - - /** - * Return the number of type converters. - */ - int getTypeConvertersSize(); - - /** - * Add a type converter to the converter holder, return the object representing it. - */ - EclipseLinkTypeConverter addTypeConverter(int index); - - /** - * Remove the type converter at the index from the converter holder. - */ - void removeTypeConverter(int index); - - /** - * Remove the type converter at from the converter holder. - */ - void removeTypeConverter(EclipseLinkTypeConverter converter); - - /** - * Move the type converter from the source index to the target index. - */ - void moveTypeConverter(int targetIndex, int sourceIndex); - - String TYPE_CONVERTERS_LIST = "typeConverters"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConvertibleMapping.java deleted file mode 100644 index 4d4057d4a6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConvertibleMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -/** - * EclipseLink convertible mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkConvertibleMapping -{ - EclipseLinkConverterContainer getConverterContainer(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCustomConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCustomConverter.java deleted file mode 100644 index ed43b5cacc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCustomConverter.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -/** - * EclipseLink custom converter - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkCustomConverter - extends EclipseLinkConverterClassConverter -{ - String ECLIPSELINK_CONVERTER_CLASS_NAME = "org.eclipse.persistence.mappings.converters.Converter"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCustomizer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCustomizer.java deleted file mode 100644 index dd52236b30..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkCustomizer.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * Corresponds to a Customizer resource model object - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkCustomizer - extends JpaContextNode -{ - String getCustomizerClass(); - - String getSpecifiedCustomizerClass(); - void setSpecifiedCustomizerClass(String customizerClass); - String SPECIFIED_CUSTOMIZER_CLASS_PROPERTY = "specifiedCustomizerClass"; //$NON-NLS-1$ - String ECLIPSELINK_DESCRIPTOR_CUSTOMIZER_CLASS_NAME = "org.eclipse.persistence.config.DescriptorCustomizer"; //$NON-NLS-1$ - - String getDefaultCustomizerClass(); - String DEFAULT_CUSTOMIZER_CLASS_PROPERTY = "defaultCustomizerClass"; //$NON-NLS-1$ - - String getFullyQualifiedCustomizerClass(); - String FULLY_QUALIFIED_CUSTOMIZER_CLASS_PROPERTY = "fullyQualifiedCustomizerClass"; //$NON-NLS-1$ - - /** - * Return the char to be used for browsing or creating the customizer class IType. - * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char) - */ - char getCustomizerClassEnclosingTypeSeparator(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkElementCollectionMapping2_0.java deleted file mode 100644 index 49f0555b16..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkElementCollectionMapping2_0.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.jpa2.context.ElementCollectionMapping2_0; - -/** - * EclipseLink element collection mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.3 - */ -public interface EclipseLinkElementCollectionMapping2_0 - extends ElementCollectionMapping2_0, EclipseLinkJoinFetchMapping, EclipseLinkConvertibleMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkEmbeddable.java deleted file mode 100644 index cb838dc67c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkEmbeddable.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.Embeddable; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.3 - * @since 2.1 - */ -public interface EclipseLinkEmbeddable - extends Embeddable, EclipseLinkTypeMapping -{ - // combine various interfaces -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkEntity.java deleted file mode 100644 index 034e32126c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkEntity.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.Entity; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.3 - * @since 2.1 - */ -public interface EclipseLinkEntity - extends Entity, EclipseLinkNonEmbeddableTypeMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkExistenceType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkExistenceType.java deleted file mode 100644 index 8d5698ee5e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkExistenceType.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - - -/** - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -// TODO bjv rename to EclipseLinkExistenceCheckingPolicy -public enum EclipseLinkExistenceType { - - CHECK_CACHE, - CHECK_DATABASE, - ASSUME_EXISTENCE, - ASSUME_NON_EXISTENCE; - - - public static EclipseLinkExistenceType fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.ExistenceType javaExistenceType) { - if (javaExistenceType == null) { - return null; - } - switch (javaExistenceType) { - case CHECK_CACHE: - return CHECK_CACHE; - case CHECK_DATABASE: - return CHECK_DATABASE; - case ASSUME_EXISTENCE: - return ASSUME_EXISTENCE; - case ASSUME_NON_EXISTENCE: - return ASSUME_NON_EXISTENCE; - default: - throw new IllegalArgumentException("unknown existence type: " + javaExistenceType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.ExistenceType toJavaResourceModel(EclipseLinkExistenceType existenceType) { - if (existenceType == null) { - return null; - } - switch (existenceType) { - case CHECK_CACHE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ExistenceType.CHECK_CACHE; - case CHECK_DATABASE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ExistenceType.CHECK_DATABASE; - case ASSUME_EXISTENCE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ExistenceType.ASSUME_EXISTENCE; - case ASSUME_NON_EXISTENCE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.ExistenceType.ASSUME_NON_EXISTENCE; - default: - throw new IllegalArgumentException("unknown existence type: " + existenceType); //$NON-NLS-1$ - } - } - - - public static EclipseLinkExistenceType fromOrmResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.orm.ExistenceType ormExistenceType) { - if (ormExistenceType == null) { - return null; - } - switch (ormExistenceType) { - case CHECK_CACHE: - return CHECK_CACHE; - case CHECK_DATABASE: - return CHECK_DATABASE; - case ASSUME_EXISTENCE: - return ASSUME_EXISTENCE; - case ASSUME_NON_EXISTENCE: - return ASSUME_NON_EXISTENCE; - default: - throw new IllegalArgumentException("unknown existence type: " + ormExistenceType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.orm.ExistenceType toOrmResourceModel(EclipseLinkExistenceType existenceType) { - if (existenceType == null) { - return null; - } - switch (existenceType) { - case CHECK_CACHE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.ExistenceType.CHECK_CACHE; - case CHECK_DATABASE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.ExistenceType.CHECK_DATABASE; - case ASSUME_EXISTENCE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.ExistenceType.ASSUME_EXISTENCE; - case ASSUME_NON_EXISTENCE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.ExistenceType.ASSUME_NON_EXISTENCE; - default: - throw new IllegalArgumentException("unknown existence type: " + existenceType); //$NON-NLS-1$ - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkIdMapping.java deleted file mode 100644 index 154ff8be81..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkIdMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.IdMapping; - -/** - * EclipseLink ID mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkIdMapping - extends IdMapping, EclipseLinkConvertibleMapping -{ - EclipseLinkMutable getMutable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetch.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetch.java deleted file mode 100644 index 44fa1cf3f1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetch.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkJoinFetch - extends JpaContextNode -{ - EclipseLinkJoinFetchType getValue(); - void setValue(EclipseLinkJoinFetchType value); - String VALUE_PROPERTY = "value"; //$NON-NLS-1$ - EclipseLinkJoinFetchType DEFAULT_VALUE = EclipseLinkJoinFetchType.INNER; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetchMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetchMapping.java deleted file mode 100644 index 77966f4d37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetchMapping.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * EclipseLink join-fetch mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkJoinFetchMapping - extends AttributeMapping -{ - EclipseLinkJoinFetch getJoinFetch(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetchType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetchType.java deleted file mode 100644 index b61a2c825b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkJoinFetchType.java +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlJoinFetchType; - -/** - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public enum EclipseLinkJoinFetchType { - - INNER, - OUTER; - - - public static EclipseLinkJoinFetchType fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.JoinFetchType javaJoinFetchType) { - if (javaJoinFetchType == null) { - return null; - } - switch (javaJoinFetchType) { - case INNER: - return INNER; - case OUTER: - return OUTER; - default: - throw new IllegalArgumentException("unknown join fetch type: " + javaJoinFetchType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.JoinFetchType toJavaResourceModel(EclipseLinkJoinFetchType joinFetchType) { - if (joinFetchType == null) { - return null; - } - switch (joinFetchType) { - case INNER: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.JoinFetchType.INNER; - case OUTER: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.JoinFetchType.OUTER; - default: - throw new IllegalArgumentException("unknown join fetch type: " + joinFetchType); //$NON-NLS-1$ - } - } - - - public static EclipseLinkJoinFetchType fromOrmResourceModel(XmlJoinFetchType ormJoinFetchType) { - if (ormJoinFetchType == null) { - return null; - } - switch (ormJoinFetchType) { - case INNER: - return INNER; - case OUTER: - return OUTER; - default: - throw new IllegalArgumentException("unknown join fetch type: " + ormJoinFetchType); //$NON-NLS-1$ - } - } - - public static XmlJoinFetchType toOrmResourceModel(EclipseLinkJoinFetchType fetchType) { - if (fetchType == null) { - return null; - } - switch (fetchType) { - case INNER: - return XmlJoinFetchType.INNER; - case OUTER: - return XmlJoinFetchType.OUTER; - default: - throw new IllegalArgumentException("unknown join fetch type: " + fetchType); //$NON-NLS-1$ - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkManyToManyMapping.java deleted file mode 100644 index f179ce1e25..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkManyToManyMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.ManyToManyMapping; - -/** - * EclipseLink relationship (1:1, 1:m, m:1, m:m) mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkManyToManyMapping - extends ManyToManyMapping, EclipseLinkRelationshipMapping, EclipseLinkConvertibleMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMappedSuperclass.java deleted file mode 100644 index c417475cc4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMappedSuperclass.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.MappedSuperclass; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.3 - * @since 2.1 - */ -public interface EclipseLinkMappedSuperclass - extends MappedSuperclass, EclipseLinkNonEmbeddableTypeMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMultitenancy2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMultitenancy2_3.java deleted file mode 100644 index 9d3f0aad4d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMultitenancy2_3.java +++ /dev/null @@ -1,162 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * EclipseLink multitenancy - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface EclipseLinkMultitenancy2_3 - extends JpaContextNode -{ - - boolean isMultitenant(); - boolean isDefaultMultitenant(); - String DEFAULT_MULTITENANT_PROPERTY = "defaultMultitenant"; //$NON-NLS-1$ - boolean isSpecifiedMultitenant(); - void setSpecifiedMultitenant(boolean isMultitenant); - String SPECIFIED_MULTITENANT_PROPERTY = "specifiedMultitenant"; //$NON-NLS-1$ - - // ********** type ********** - - /** - * This is the combination of defaultType and specifiedType. - * If getSpecifiedType() returns null, then return getDefaultType() - */ - EclipseLinkMultitenantType2_3 getType(); - - EclipseLinkMultitenantType2_3 getSpecifiedType(); - void setSpecifiedType(EclipseLinkMultitenantType2_3 type); - String SPECIFIED_TYPE_PROPERTY = "specifiedType"; //$NON-NLS-1$ - - EclipseLinkMultitenantType2_3 getDefaultType(); - String DEFAULT_TYPE_PROPERTY = "defaultType"; //$NON-NLS-1$ - EclipseLinkMultitenantType2_3 DEFAULT_TYPE = EclipseLinkMultitenantType2_3.SINGLE_TABLE; - - - // ********** include criteria (EclipseLink 2.4+) ********** - - /** - * This is the combination of defaultIncludeCriteria and specifiedIncludeCriteria. - * If getSpecifiedIncludeCriteria() returns null, then return isDefaultIncludeCriteria() - */ - boolean isIncludeCriteria(); - - Boolean getSpecifiedIncludeCriteria(); - void setSpecifiedIncludeCriteria(Boolean includeCriteria); - String SPECIFIED_INCLUDE_CRITERIA_PROPERTY = "specifiedIncludeCriteria"; //$NON-NLS-1$ - - boolean isDefaultIncludeCriteria(); - String DEFAULT_INCLUDE_CRITERIA_PROPERTY = "defaultIncludeCriteria"; //$NON-NLS-1$ - boolean DEFAULT_INCLUDE_CRITERIA = true; - - - // ********** tenant discriminator columns ********** - - /** - * Return the tenant discriminator columns whether specified or default. - */ - ListIterable<? extends ReadOnlyTenantDiscriminatorColumn2_3> getTenantDiscriminatorColumns(); - - /** - * Return the number of tenant discriminator columns, whether specified and default. - */ - int getTenantDiscriminatorColumnsSize(); - - - // ********** specified tenant discriminator columns ********** - - /** - * Return a list iterable of the specified tenant discriminator columns. - * This will not be null. - */ - ListIterable<? extends TenantDiscriminatorColumn2_3> getSpecifiedTenantDiscriminatorColumns(); - String SPECIFIED_TENANT_DISCRIMINATOR_COLUMNS_LIST = "specifiedTenantDiscriminatorColumns"; //$NON-NLS-1$ - - /** - * Return the number of specified tenant discriminator columns. - */ - int getSpecifiedTenantDiscriminatorColumnsSize(); - - /** - * Return whether there are any specified tenant discriminator columns. - */ - boolean hasSpecifiedTenantDiscriminatorColumns(); - - /** - * Add a specified tenant discriminator column and return the object - * representing it. - */ - TenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(); - - /** - * Add a specified tenant discriminator column and return the object - * representing it. - */ - TenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(int index); - - /** - * Remove the specified tenant discriminator column. - */ - void removeSpecifiedTenantDiscriminatorColumn(TenantDiscriminatorColumn2_3 tenantDiscriminatorColumn); - - /** - * Remove the specified tenant discriminator column at the index. - */ - void removeSpecifiedTenantDiscriminatorColumn(int index); - - /** - * Move the specified tenant discriminator column from the source index to the target index. - */ - void moveSpecifiedTenantDiscriminatorColumn(int targetIndex, int sourceIndex); - - - // ********** default tenant discriminator columns ********** - - /** - * Return a list iterable of the default tenant discriminator columns. - * This will not be null. If there are specified tenant discriminator columns - * then there will be no default tenant discriminator columns. - */ - ListIterable<? extends VirtualTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns(); - String DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST = "defaultTenantDiscriminatorColumns"; //$NON-NLS-1$ - - /** - * Return the number of default tenant discriminator columns. - */ - int getDefaultTenantDiscriminatorColumnsSize(); - - /** - * Return whether a TenantDiscriminatorColumn is allowed for this type mapping. - * It is allowed if it is a mapped-superclass, the root entity in the inheritance hierarchy, - * or the inheritance strategy is table-per-class - */ - boolean specifiedTenantDiscriminatorColumnsAllowed(); - String SPECIFIED_TENANT_DISCRIMINATOR_COLUMNS_ALLOWED_PROPERTY = "specifiedTenantDiscriminatorColumnsAllowed"; //$NON-NLS-1$ - - - /** - * Return true if any of the tenant discriminator columns (specified or default) - * have the primaryKey option set to true - */ - boolean usesPrimaryKeyTenantDiscriminatorColumns(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMultitenantType2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMultitenantType2_3.java deleted file mode 100644 index 5704e4aaa3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMultitenantType2_3.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - - -/** - * - * - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public enum EclipseLinkMultitenantType2_3 { - - SINGLE_TABLE, - TABLE_PER_TENANT, - VPD; - - - public static EclipseLinkMultitenantType2_3 fromJavaResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.java.MultitenantType2_3 javaMultitenantType) { - if (javaMultitenantType == null) { - return null; - } - switch (javaMultitenantType) { - case SINGLE_TABLE: - return SINGLE_TABLE; - case TABLE_PER_TENANT: - return TABLE_PER_TENANT; - case VPD: - return VPD; - default: - throw new IllegalArgumentException("unknown multitenant type: " + javaMultitenantType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.java.MultitenantType2_3 toJavaResourceModel(EclipseLinkMultitenantType2_3 multitenantType) { - if (multitenantType == null) { - return null; - } - switch (multitenantType) { - case SINGLE_TABLE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.MultitenantType2_3.SINGLE_TABLE; - case TABLE_PER_TENANT: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.MultitenantType2_3.TABLE_PER_TENANT; - case VPD: - return org.eclipse.jpt.jpa.eclipselink.core.resource.java.MultitenantType2_3.VPD; - default: - throw new IllegalArgumentException("unknown multitenant type: " + multitenantType); //$NON-NLS-1$ - } - } - - public static EclipseLinkMultitenantType2_3 fromOrmResourceModel(org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.MultitenantType ormMultitenantType) { - if (ormMultitenantType == null) { - return null; - } - switch (ormMultitenantType) { - case SINGLE_TABLE: - return SINGLE_TABLE; - case TABLE_PER_TENANT: - return TABLE_PER_TENANT; - case VPD: - return VPD; - default: - throw new IllegalArgumentException("unknown multitenant type: " + ormMultitenantType); //$NON-NLS-1$ - } - } - - public static org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.MultitenantType toOrmResourceModel(EclipseLinkMultitenantType2_3 multitenantType) { - if (multitenantType == null) { - return null; - } - switch (multitenantType) { - case SINGLE_TABLE: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.MultitenantType.SINGLE_TABLE; - case TABLE_PER_TENANT: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.MultitenantType.TABLE_PER_TENANT; - case VPD: - return org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.MultitenantType.VPD; - default: - throw new IllegalArgumentException("unknown multitenant type: " + multitenantType); //$NON-NLS-1$ - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMutable.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMutable.java deleted file mode 100644 index 1611e608be..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkMutable.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkMutable - extends JpaContextNode -{ - boolean isMutable(); - - Boolean getSpecifiedMutable(); - void setSpecifiedMutable(Boolean mutable); - String SPECIFIED_MUTABLE_PROPERTY = "specifiedMutable"; //$NON-NLS-1$ - - boolean isDefaultMutable(); - String DEFAULT_MUTABLE_PROPERTY = "defaultMutable"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkNonEmbeddableTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkNonEmbeddableTypeMapping.java deleted file mode 100644 index 710f10a5d3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkNonEmbeddableTypeMapping.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - - -/** - * EclipseLink non-embeddable type mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkNonEmbeddableTypeMapping - extends EclipseLinkTypeMapping -{ - EclipseLinkCaching getCaching(); - - EclipseLinkReadOnly getReadOnly(); - - EclipseLinkMultitenancy2_3 getMultitenancy(); - - /** - * Used for validating whether tenant discriminator columns may be specified - */ - boolean isMultitenantMetadataAllowed(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkObjectTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkObjectTypeConverter.java deleted file mode 100644 index 722b98a808..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkObjectTypeConverter.java +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * EclipseLink object type converter - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkObjectTypeConverter - extends EclipseLinkConverter -{ - // ********** data type ********** - - String getDataType(); - void setDataType(String dataType); - String DATA_TYPE_PROPERTY = "dataType"; //$NON-NLS-1$ - - String getFullyQualifiedDataType(); - String FULLY_QUALIFIED_DATA_TYPE_PROPERTY = "fullyQualifiedDataType"; //$NON-NLS-1$ - - - // ********** object type ********** - - String getObjectType(); - void setObjectType(String objectType); - String OBJECT_TYPE_PROPERTY = "objectType"; //$NON-NLS-1$ - - String getFullyQualifiedObjectType(); - String FULLY_QUALIFIED_OBJECT_TYPE_PROPERTY = "fullyQualifiedObjectType"; //$NON-NLS-1$ - - - // ********** conversion values ********** - - /** - * Return the converter's conversion values. - */ - ListIterable<? extends EclipseLinkConversionValue> getConversionValues(); - String CONVERSION_VALUES_LIST = "conversionValues"; //$NON-NLS-1$ - - /** - * Return the number of conversion values. - */ - int getConversionValuesSize(); - - /** - * Return the conversion value at the specified index. - */ - EclipseLinkConversionValue getConversionValue(int index); - - /** - * Add a conversion value to the converter at the specified index - * and return it. - */ - EclipseLinkConversionValue addConversionValue(int index); - - /** - * Add a conversion value to the converter and return it. - */ - EclipseLinkConversionValue addConversionValue(); - - /** - * Remove the conversion value at the specified index. - */ - void removeConversionValue(int index); - - /** - * Remove the specified conversion value. - */ - void removeConversionValue(EclipseLinkConversionValue conversionValue); - - /** - * Move the conversion value from the specified source index to the - * specified target index. - */ - void moveConversionValue(int targetIndex, int sourceIndex); - - - // ********** data values ********** - - /** - * Return the converter's data values. - */ - Iterable<String> getDataValues(); - - /** - * Return the number of data values. - */ - int getDataValuesSize(); - - - // ********** default object value ********** - - String getDefaultObjectValue(); - void setDefaultObjectValue(String value); - String DEFAULT_OBJECT_VALUE_PROPERTY = "defaultObjectValue"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyMapping.java deleted file mode 100644 index c942713807..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyMapping.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.OneToManyMapping; - -/** - * EclipseLink 1:m mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkOneToManyMapping - extends OneToManyMapping, EclipseLinkRelationshipMapping, EclipseLinkConvertibleMapping -{ - EclipseLinkOneToManyRelationship getRelationship(); - - EclipseLinkPrivateOwned getPrivateOwned(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyMapping2_0.java deleted file mode 100644 index 4015ca77ac..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyMapping2_0.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyMapping2_0; - -/** - * EclipseLink 1:m mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.0 - * @since 3.0 - */ -public interface EclipseLinkOneToManyMapping2_0 - extends EclipseLinkOneToManyMapping, OneToManyMapping2_0 -{ - EclipseLinkOneToManyRelationship2_0 getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyRelationship.java deleted file mode 100644 index 214b6128cb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyRelationship.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship; -import org.eclipse.jpt.jpa.core.context.OneToManyRelationship; - -/** - * EclipseLink 1:m relationship - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.2 - * @since 2.2 - */ -public interface EclipseLinkOneToManyRelationship - extends OneToManyRelationship, - JoinColumnRelationship -{ - // add join column support to JPA 1.0 1:m -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyRelationship2_0.java deleted file mode 100644 index ed0c9e06ad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToManyRelationship2_0.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.jpa2.context.OneToManyRelationship2_0; - -/** - * EclipseLink 2.0 1:m relationship - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.3 - * @since 2.3 - */ -public interface EclipseLinkOneToManyRelationship2_0 - extends EclipseLinkOneToManyRelationship, - OneToManyRelationship2_0 -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToOneMapping.java deleted file mode 100644 index 846192a66e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToOneMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.OneToOneMapping; -import org.eclipse.jpt.jpa.core.context.OneToOneRelationship; - -/** - * EclipseLink 1:1 mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkOneToOneMapping - extends OneToOneMapping, EclipseLinkRelationshipMapping -{ - OneToOneRelationship getRelationship(); - - EclipseLinkPrivateOwned getPrivateOwned(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToOneMapping2_0.java deleted file mode 100644 index fe265ae45d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkOneToOneMapping2_0.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.jpa2.context.OneToOneMapping2_0; - -/** - * EclipseLink 1:1 mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.0 - * @since 3.0 - */ -public interface EclipseLinkOneToOneMapping2_0 - extends EclipseLinkOneToOneMapping, OneToOneMapping2_0 -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkPrivateOwned.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkPrivateOwned.java deleted file mode 100644 index 4a3b7f924c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkPrivateOwned.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkPrivateOwned - extends JpaContextNode -{ - boolean isPrivateOwned(); - void setPrivateOwned(boolean privateOwned); - String PRIVATE_OWNED_PROPERTY = "privateOwned"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkReadOnly.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkReadOnly.java deleted file mode 100644 index 28d212495a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkReadOnly.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * EclipseLink read-only - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkReadOnly - extends JpaContextNode -{ - boolean isReadOnly(); - - boolean isDefaultReadOnly(); - String DEFAULT_READ_ONLY_PROPERTY = "defaultReadOnly"; //$NON-NLS-1$ - boolean DEFAULT_READ_ONLY = false; - - Boolean getSpecifiedReadOnly(); - void setSpecifiedReadOnly(Boolean newSpecifiedReadOnly); - String SPECIFIED_READ_ONLY_PROPERTY = "specifiedReadOnly"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkReadOnlyAccessMethodsHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkReadOnlyAccessMethodsHolder.java deleted file mode 100644 index f3001313f3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkReadOnlyAccessMethodsHolder.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.common.utility.model.Model; - -/** - * Common interface that can be used by clients interested only in a type - * or attribute's access methods setting (e.g. a UI composite). - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkReadOnlyAccessMethodsHolder - extends Model -{ - /** - * Return the get method, whether specified or defaulted. - * This should never return <code>null</code> since at least the default - * will be set. - */ - String getGetMethod(); - - /** - * Return the set method, whether specified or defaulted. - * This should never return <code>null</code> since at least the default - * will be set. - */ - String getSetMethod(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkRelationshipMapping.java deleted file mode 100644 index 9f349118f5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkRelationshipMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.RelationshipMapping; - -/** - * EclipseLink relationship (1:1, 1:m, m:1, m:m) mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkRelationshipMapping - extends RelationshipMapping, EclipseLinkJoinFetchMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkStructConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkStructConverter.java deleted file mode 100644 index b9c13484c3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkStructConverter.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -/** - * EclipseLink struct converter - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkStructConverter extends EclipseLinkConverterClassConverter -{ - String ECLIPSELINK_STRUCT_CONVERTER_CLASS_NAME = "org.eclipse.persistence.platform.database.converters.StructConverter"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkStructureMapping2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkStructureMapping2_3.java deleted file mode 100644 index 73407318ac..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkStructureMapping2_3.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * EclipseLink structure mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkStructureMapping2_3 - extends AttributeMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTimeOfDay.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTimeOfDay.java deleted file mode 100644 index 12b7a15e56..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTimeOfDay.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.JpaContextNode; - -/** - * EclipseLink caching expiry time of day - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkTimeOfDay - extends JpaContextNode -{ - Integer getHour(); - void setHour(Integer hour); - String HOUR_PROPERTY = "hour"; //$NON-NLS-1$ - - Integer getMinute(); - void setMinute(Integer minute); - String MINUTE_PROPERTY = "minute"; //$NON-NLS-1$ - - Integer getSecond(); - void setSecond(Integer second); - String SECOND_PROPERTY = "second"; //$NON-NLS-1$ - - Integer getMillisecond(); - void setMillisecond(Integer millisecond); - String MILLISECOND_PROPERTY = "millisecond"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTransformationMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTransformationMapping.java deleted file mode 100644 index 972fdebb9a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTransformationMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * EclipseLink transformation mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface EclipseLinkTransformationMapping - extends AttributeMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTypeConverter.java deleted file mode 100644 index 6e735e8bb0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTypeConverter.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -/** - * EclipseLink type converter - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkTypeConverter - extends EclipseLinkConverter -{ - String getDataType(); - void setDataType(String dataType); - String DATA_TYPE_PROPERTY = "dataType"; //$NON-NLS-1$ - - String getFullyQualifiedDataType(); - String FULLY_QUALIFIED_DATA_TYPE_PROPERTY = "fullyQualifiedDataType"; //$NON-NLS-1$ - - - String getObjectType(); - void setObjectType(String objectType); - String OBJECT_TYPE_PROPERTY = "objectType"; //$NON-NLS-1$ - - String getFullyQualifiedObjectType(); - String FULLY_QUALIFIED_OBJECT_TYPE_PROPERTY = "fullyQualifiedObjectType"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTypeMapping.java deleted file mode 100644 index ea4ecab60a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkTypeMapping.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jpt.common.utility.internal.CollectionTools; -import org.eclipse.jpt.common.utility.internal.Transformer; -import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable; -import org.eclipse.jpt.jpa.core.context.AttributeMapping; -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.ConvertibleMapping; -import org.eclipse.jpt.jpa.core.context.TypeMapping; -import org.eclipse.jpt.jpa.core.jpa2.context.ConvertibleKeyMapping2_0; - -/** - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.3 - * @since 2.3 - */ -public interface EclipseLinkTypeMapping - extends TypeMapping, EclipseLinkConvertibleMapping -{ - EclipseLinkCustomizer getCustomizer(); - - EclipseLinkChangeTracking getChangeTracking(); - - /** - * Return whether this type mapping specifies primary key columns rather than using - * JPA-style attributes - * (Uses the @PrimaryKey annotation for java, or the primary-key element for xml) - * - * Note: there is no context-level or UI support for this feature as of yet. - * Note: this is a 1.1 feature, but this check has been implemented for all versions - */ - boolean usesPrimaryKeyColumns(); - - /** - * Return true if the type mapping is multitenant and any of the tenant discriminator - * columns (specified or default) have the primaryKey option set to true - */ - boolean usesPrimaryKeyTenantDiscriminatorColumns(); - - Iterable<EclipseLinkConverter> getConverters(); - - Transformer<AttributeMapping, Iterable<EclipseLinkConverter>> ATTRIBUTE_MAPPING_CONVERTER_TRANSFORMER = - new Transformer<AttributeMapping, Iterable<EclipseLinkConverter>>() { - public Iterable<EclipseLinkConverter> transform(AttributeMapping attributeMapping) { - List<EclipseLinkConverter> converters = new ArrayList<EclipseLinkConverter>(); - if (attributeMapping instanceof EclipseLinkConvertibleMapping) { - Iterable<EclipseLinkConverter> mappingConverters = - ((EclipseLinkConvertibleMapping) attributeMapping).getConverterContainer().getConverters(); - CollectionTools.addAll(converters, mappingConverters); - } - return converters; - } - }; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkVariableOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkVariableOneToOneMapping.java deleted file mode 100644 index 311a212512..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkVariableOneToOneMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * EclipseLink variable 1:1 mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.2 - * @since 2.2 - */ -public interface EclipseLinkVariableOneToOneMapping - extends AttributeMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkVersionMapping.java deleted file mode 100644 index 7b100b917f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkVersionMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.VersionMapping; - -/** - * EclipseLink version mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface EclipseLinkVersionMapping - extends VersionMapping, EclipseLinkConvertibleMapping -{ - EclipseLinkMutable getMutable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/ReadOnlyTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/ReadOnlyTenantDiscriminatorColumn2_3.java deleted file mode 100644 index b8326b34e5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/ReadOnlyTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn; -import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn; - -/** - * tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface ReadOnlyTenantDiscriminatorColumn2_3 - extends ReadOnlyNamedDiscriminatorColumn, ReadOnlyTableColumn -{ - String DEFAULT_NAME = "TENANT_ID"; //$NON-NLS-1$ - - - // ********** context property ********** - - /** - * Return the specified context property if present, otherwise return - * the default context property. - */ - String getContextProperty(); - String getSpecifiedContextProperty(); - String SPECIFIED_CONTEXT_PROPERTY_PROPERTY = "specifiedContextProperty"; //$NON-NLS-1$ - String getDefaultContextProperty(); - String DEFAULT_CONTEXT_PROPERTY_PROPERTY = "defaultContextProperty"; //$NON-NLS-1$ - String DEFAULT_CONTEXT_PROPERTY = "eclipselink.tenant-id"; //$NON-NLS-1$ - - - // ********** primaryKey ********** - - /** - * Return the specified primaryKey setting if present, otherwise return the - * default primaryKey setting. - */ - boolean isPrimaryKey(); - Boolean getSpecifiedPrimaryKey(); - String SPECIFIED_PRIMARY_KEY_PROPERTY = "specifiedPrimaryKey"; //$NON-NLS-1$ - boolean isDefaultPrimaryKey(); - String DEFAULT_PRIMARY_KEY_PROPERTY = "defaultPrimaryKey"; //$NON-NLS-1$ - boolean DEFAULT_PRIMARY_KEY = false; - - - // ********** owner ********** - - /** - * interface allowing tenant discriminator columns to be used in multiple places - */ - interface Owner - extends ReadOnlyNamedDiscriminatorColumn.Owner, ReadOnlyTableColumn.Owner - { - /** - * Return the default context property name - */ - String getDefaultContextPropertyName(); - - /** - * Return the default primary key setting - */ - boolean getDefaultPrimaryKey(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/TenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/TenantDiscriminatorColumn2_3.java deleted file mode 100644 index aab012ac37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/TenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.NamedDiscriminatorColumn; -import org.eclipse.jpt.jpa.core.context.TableColumn; - -/** - * tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface TenantDiscriminatorColumn2_3 - extends NamedDiscriminatorColumn, ReadOnlyTenantDiscriminatorColumn2_3, TableColumn -{ - - void setSpecifiedContextProperty(String contextProperty); - void setSpecifiedPrimaryKey(Boolean primaryKey); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/VirtualTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/VirtualTenantDiscriminatorColumn2_3.java deleted file mode 100644 index e7eeb921e9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/VirtualTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context; - -import org.eclipse.jpt.jpa.core.context.VirtualNamedDiscriminatorColumn; -import org.eclipse.jpt.jpa.core.context.VirtualTableColumn; - -/** - * Virtual tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface VirtualTenantDiscriminatorColumn2_3 - extends VirtualNamedDiscriminatorColumn, VirtualTableColumn, ReadOnlyTenantDiscriminatorColumn2_3 -{ - ReadOnlyTenantDiscriminatorColumn2_3 getOverriddenColumn(); - - // ********** owner ********** - - /** - * Interface allowing the virtual column to be get the column it overrides. - */ - interface Owner - extends ReadOnlyTenantDiscriminatorColumn2_3.Owner - { - /** - * Return the column overridden by the virtual column. - */ - ReadOnlyTenantDiscriminatorColumn2_3 resolveOverriddenColumn(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaConvertibleMapping.java deleted file mode 100644 index ffe04e56f7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaConvertibleMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConvertibleMapping; - -/** - * EclipseLink java convertible mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkJavaConvertibleMapping - extends EclipseLinkConvertibleMapping, JavaEclipseLinkConverterContainer.ParentAdapter -{ - JavaEclipseLinkConverterContainer getConverterContainer(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaOneToManyRelationship.java deleted file mode 100644 index 09b8a1b8a9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaOneToManyRelationship.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationship; -import org.eclipse.jpt.jpa.core.context.java.JavaOneToManyRelationship; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkOneToManyRelationship; - -/** - * EclipseLink Java 1:m relationship - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkJavaOneToManyRelationship - extends EclipseLinkOneToManyRelationship, - JavaOneToManyRelationship, - JavaJoinColumnRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaOneToManyRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaOneToManyRelationship2_0.java deleted file mode 100644 index b723b3eef2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaOneToManyRelationship2_0.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOneToManyRelationship2_0; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkOneToManyRelationship2_0; - -/** - * EclipseLink 2.0 Java 1:m relationship - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkJavaOneToManyRelationship2_0 - extends EclipseLinkOneToManyRelationship2_0, - EclipseLinkJavaOneToManyRelationship, - JavaOneToManyRelationship2_0 -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaTypeMapping.java deleted file mode 100644 index b39b021a68..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/EclipseLinkJavaTypeMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTypeMapping; - -/** - * EclipseLink Java type mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkJavaTypeMapping - extends JavaTypeMapping, EclipseLinkTypeMapping -{ - JavaEclipseLinkConverterContainer getConverterContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkCaching.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkCaching.java deleted file mode 100644 index be17d91a59..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkCaching.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCaching; - -/** - * EclipseLink Java caching - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface JavaEclipseLinkCaching - extends EclipseLinkCaching, JavaJpaContextNode -{ - /** - * Return true if the existence-checking model object exists. - * Have to have a separate flag for this since the default existence - * type is different depending on whether hasExistenceChecking() returns - * true or false. - */ - boolean isExistenceChecking(); - void setExistenceChecking(boolean existenceChecking); - String EXISTENCE_CHECKING_PROPERTY = "existenceChecking"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkConverterContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkConverterContainer.java deleted file mode 100644 index 7a78c609fd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkConverterContainer.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverterContainer; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkCustomConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkObjectTypeConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkStructConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkTypeConverter; - -/** - * EclipseLink Java converter container - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface JavaEclipseLinkConverterContainer - extends EclipseLinkConverterContainer, JavaJpaContextNode -{ - ListIterable<JavaEclipseLinkCustomConverter> getCustomConverters(); - JavaEclipseLinkCustomConverter addCustomConverter(int index); - - ListIterable<JavaEclipseLinkObjectTypeConverter> getObjectTypeConverters(); - JavaEclipseLinkObjectTypeConverter addObjectTypeConverter(int index); - - ListIterable<JavaEclipseLinkStructConverter> getStructConverters(); - JavaEclipseLinkStructConverter addStructConverter(int index); - - ListIterable<JavaEclipseLinkTypeConverter> getTypeConverters(); - JavaEclipseLinkTypeConverter addTypeConverter(int index); - - /** - * Parent adapter - */ - interface ParentAdapter { - /** - * Return the container's parent. - */ - JavaJpaContextNode getConverterContainerParent(); - - /** - * Return the element that is annotated with converters. - */ - JavaResourceAnnotatedElement getJavaResourceAnnotatedElement(); - - /** - * Return whether the container's parent supports converters. - * (Virtual attributes do not support converters.) - */ - boolean parentSupportsConverters(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkEmbeddable.java deleted file mode 100644 index 80c3e43510..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkEmbeddable.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkEmbeddable; - -/** - * EclipseLink - * Java embeddable type mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface JavaEclipseLinkEmbeddable - extends JavaEmbeddable, EclipseLinkEmbeddable, EclipseLinkJavaTypeMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkEntity.java deleted file mode 100644 index 32a78c5646..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaEntity; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkEntity; - -/** - * EclipseLink - * Java entity - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface JavaEclipseLinkEntity - extends JavaEntity, EclipseLinkEntity, JavaEclipseLinkNonEmbeddableTypeMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkMappedSuperclass.java deleted file mode 100644 index c5541c4fc7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkMappedSuperclass.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkMappedSuperclass; - -/** - * EclipseLink - * Java mapped superclass - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.0 - * @since 2.1 - */ -public interface JavaEclipseLinkMappedSuperclass - extends JavaMappedSuperclass, EclipseLinkMappedSuperclass, JavaEclipseLinkNonEmbeddableTypeMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkMultitenancy2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkMultitenancy2_3.java deleted file mode 100644 index c1897750a9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkMultitenancy2_3.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkMultitenancy2_3; - -public interface JavaEclipseLinkMultitenancy2_3 - extends EclipseLinkMultitenancy2_3, JavaJpaContextNode -{ - - ListIterable<JavaReadOnlyTenantDiscriminatorColumn2_3> getTenantDiscriminatorColumns(); - - ListIterable<JavaTenantDiscriminatorColumn2_3> getSpecifiedTenantDiscriminatorColumns(); - JavaTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(); - JavaTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(int index); - - ListIterable<JavaVirtualTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkNonEmbeddableTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkNonEmbeddableTypeMapping.java deleted file mode 100644 index 4d89e38aab..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkNonEmbeddableTypeMapping.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkNonEmbeddableTypeMapping; - -/** - * EclipseLink Java non-embeddable type mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface JavaEclipseLinkNonEmbeddableTypeMapping - extends EclipseLinkNonEmbeddableTypeMapping, EclipseLinkJavaTypeMapping -{ - JavaEclipseLinkCaching getCaching(); - - JavaEclipseLinkMultitenancy2_3 getMultitenancy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkPersistentAttribute.java deleted file mode 100644 index b6bf972832..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaEclipseLinkPersistentAttribute.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -/** - * EclipseLink Java persistent attribute - */ -public interface JavaEclipseLinkPersistentAttribute -{ - - /** - * Return whether the attribute's type is a subclass of - * <code>java.util.Date</code> or <code>java.util.Calendar</code>. - */ - boolean typeIsDateOrCalendar(); - - String DATE_TYPE_NAME = java.util.Date.class.getName(); - String CALENDAR_TYPE_NAME = java.util.Calendar.class.getName(); - - boolean typeIsSerializable(); - - boolean typeIsValidForVariableOneToOne(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java deleted file mode 100644 index 0169a52e23..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedDiscriminatorColumn; -import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTableColumn; -import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3; - -/** - * tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface JavaReadOnlyTenantDiscriminatorColumn2_3 - extends JavaReadOnlyNamedDiscriminatorColumn, ReadOnlyTenantDiscriminatorColumn2_3, JavaReadOnlyTableColumn -{ - - // ********** owner ********** - - /** - * interface allowing tenant discriminator columns to be used in multiple places - */ - interface Owner - extends ReadOnlyTenantDiscriminatorColumn2_3.Owner, JavaReadOnlyNamedDiscriminatorColumn.Owner - { - //combining interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaTenantDiscriminatorColumn2_3.java deleted file mode 100644 index 085104ff78..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.eclipselink.core.context.TenantDiscriminatorColumn2_3; -import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLinkTenantDiscriminatorColumnAnnotation2_3; - -/** - * tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface JavaTenantDiscriminatorColumn2_3 - extends TenantDiscriminatorColumn2_3, JavaReadOnlyTenantDiscriminatorColumn2_3 -{ - EclipseLinkTenantDiscriminatorColumnAnnotation2_3 getColumnAnnotation(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaVirtualTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaVirtualTenantDiscriminatorColumn2_3.java deleted file mode 100644 index c5430a0a6e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaVirtualTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.java; - -import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTableColumn; -import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3; -import org.eclipse.jpt.jpa.eclipselink.core.context.VirtualTenantDiscriminatorColumn2_3; - -/** - * Java virtual tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface JavaVirtualTenantDiscriminatorColumn2_3 - extends VirtualTenantDiscriminatorColumn2_3, JavaReadOnlyTenantDiscriminatorColumn2_3, JavaReadOnlyTableColumn -{ - /** - * The overridden column can be either a Java tenant discriminator column or an - * <code>orm.xml</code> tenant discriminator column; so we don't change the return type - * here. - */ - ReadOnlyTenantDiscriminatorColumn2_3 getOverriddenColumn(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkEntityMappings.java deleted file mode 100644 index 993d2b0a2b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkEntityMappings.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.orm.EntityMappings; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkAccessMethodsHolder; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3; - -public interface EclipseLinkEntityMappings - extends EntityMappings, EclipseLinkAccessMethodsHolder -{ - /** - * Return all the converters defined in both the entity mappings and its - * entities (but <em>not</em> in any associated Java annotations). - */ - Iterable<EclipseLinkConverter> getMappingFileConverters(); - - OrmEclipseLinkConverterContainer getConverterContainer(); - - - // ********** tenant discriminator columns ********** - - /** - * Return the tenant discriminator columns whether specified or default. - */ - ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> getTenantDiscriminatorColumns(); - - /** - * Return the number of tenant discriminator columns, whether specified and default. - */ - int getTenantDiscriminatorColumnsSize(); - - - // ********** specified tenant discriminator columns ********** - - /** - * Return a list iterable of the specified tenant discriminator columns. - * This will not be null. - */ - ListIterable<OrmTenantDiscriminatorColumn2_3> getSpecifiedTenantDiscriminatorColumns(); - String SPECIFIED_TENANT_DISCRIMINATOR_COLUMNS_LIST = "specifiedTenantDiscriminatorColumns"; //$NON-NLS-1$ - - /** - * Return the number of specified tenant discriminator columns. - */ - int getSpecifiedTenantDiscriminatorColumnsSize(); - - /** - * Return whether there are any specified tenant discriminator columns. - */ - boolean hasSpecifiedTenantDiscriminatorColumns(); - - /** - * Add a specified tenant discriminator column and return the object - * representing it. - */ - OrmTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(); - - /** - * Add a specified tenant discriminator column and return the object - * representing it. - */ - OrmTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(int index); - - /** - * Remove the specified tenant discriminator column. - */ - void removeSpecifiedTenantDiscriminatorColumn(OrmTenantDiscriminatorColumn2_3 tenantDiscriminatorColumn); - - /** - * Remove the specified tenant discriminator column at the index. - */ - void removeSpecifiedTenantDiscriminatorColumn(int index); - - /** - * Move the specified tenant discriminator column from the source index to the target index. - */ - void moveSpecifiedTenantDiscriminatorColumn(int targetIndex, int sourceIndex); - - - // ********** default tenant discriminator columns ********** - - /** - * Return a list iterable of the default tenant discriminator columns. - * This will not be null. If there are specified tenant discriminator columns - * then there will be no default tenant discriminator columns. - */ - ListIterable<? extends ReadOnlyTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns(); - String DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST = "defaultTenantDiscriminatorColumns"; //$NON-NLS-1$ - - /** - * Return the number of default tenant discriminator columns. - */ - int getDefaultTenantDiscriminatorColumnsSize(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmConvertibleMapping.java deleted file mode 100644 index c252acb040..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmConvertibleMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConvertibleMapping; - -/** - * EclipseLink orm convertible mapping. - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 3.2 - */ -public interface EclipseLinkOrmConvertibleMapping - extends EclipseLinkConvertibleMapping -{ - OrmEclipseLinkConverterContainer getConverterContainer(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmOneToManyRelationship.java deleted file mode 100644 index c56fee5fe2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmOneToManyRelationship.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationship; -import org.eclipse.jpt.jpa.core.context.orm.OrmOneToManyRelationship; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkOneToManyRelationship; - -/** - * EclipseLink <code>orm.xml</code> 1:m relationship - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkOrmOneToManyRelationship - extends EclipseLinkOneToManyRelationship, - OrmOneToManyRelationship, - OrmJoinColumnRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmOneToManyRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmOneToManyRelationship2_0.java deleted file mode 100644 index a5ba92c14d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmOneToManyRelationship2_0.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOneToManyRelationship2_0; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkOneToManyRelationship2_0; - -/** - * EclipseLink 2.0 <code>orm.xml</code> 1:m relationship - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkOrmOneToManyRelationship2_0 - extends EclipseLinkOneToManyRelationship2_0, - EclipseLinkOrmOneToManyRelationship, - OrmOneToManyRelationship2_0 -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmPersistentType.java deleted file mode 100644 index b019e57db7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmPersistentType.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistentType2_0; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkAccessMethodsHolder; - -/** - * <code>eclipselink-orm.xml</code> persistent type:<ul> - * <li>mapping - * <li>access - * <li>access-methods - * <li>attributes - * <li>super persistent type - * <li>Java persistent type - * </ul> - */ -public interface EclipseLinkOrmPersistentType - extends OrmPersistentType2_0, EclipseLinkAccessMethodsHolder -{ - - //*************** dynamic ***************** - - boolean isDynamic(); - String DYNAMIC_PROPERTY = "dynamic"; //$NON-NLS-1$ - - OrmPersistentAttribute addVirtualAttribute(String attributeName, String mappingKey, String attributeType); - - //*************** covariant overrides ***************** - - EclipseLinkOrmTypeMapping getMapping(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmTypeMapping.java deleted file mode 100644 index 777d4c33a6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkOrmTypeMapping.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTypeMapping; -import org.eclipse.jpt.jpa.eclipselink.core.context.java.EclipseLinkJavaTypeMapping; - -/** - * EclipseLink ORM type mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface EclipseLinkOrmTypeMapping - extends OrmTypeMapping, EclipseLinkTypeMapping -{ - OrmEclipseLinkConverterContainer getConverterContainer(); - - EclipseLinkJavaTypeMapping getJavaTypeMapping(); - - EclipseLinkJavaTypeMapping getJavaTypeMappingForDefaults(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkPersistenceUnitDefaults.java deleted file mode 100644 index 401c4043cb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/EclipseLinkPersistenceUnitDefaults.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmPersistenceUnitDefaults2_0; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkAccessMethodsHolder; -import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmTenantDiscriminatorColumn2_3; - -/** - * EclipseLink <code>orm.xml</code> file - * <br> - * <code>persistence-unit-defaults</code> element - */ -public interface EclipseLinkPersistenceUnitDefaults - extends OrmPersistenceUnitDefaults2_0, EclipseLinkAccessMethodsHolder -{ - - // ********** tenant discriminator columns ********** - - /** - * Return a list iterable of the tenant discriminator columns. - * This will not be null. - */ - ListIterable<OrmTenantDiscriminatorColumn2_3> getTenantDiscriminatorColumns(); - String TENANT_DISCRIMINATOR_COLUMNS_LIST = "tenantDiscriminatorColumns"; //$NON-NLS-1$ - - /** - * Return the number of tenant discriminator columns. - */ - int getTenantDiscriminatorColumnsSize(); - - /** - * Return whether there are any tenant discriminator columns. - */ - boolean hasTenantDiscriminatorColumns(); - - /** - * Add a tenant discriminator column and return the object - * representing it. - */ - OrmTenantDiscriminatorColumn2_3 addTenantDiscriminatorColumn(); - - /** - * Add a tenant discriminator column and return the object - * representing it. - */ - OrmTenantDiscriminatorColumn2_3 addTenantDiscriminatorColumn(int index); - - /** - * Remove the tenant discriminator column. - */ - void removeTenantDiscriminatorColumn(OrmTenantDiscriminatorColumn2_3 tenantDiscriminatorColumn); - - /** - * Remove the tenant discriminator column at the index. - */ - void removeTenantDiscriminatorColumn(int index); - - /** - * Move the tenant discriminator column from the source index to the target index. - */ - void moveTenantDiscriminatorColumn(int targetIndex, int sourceIndex); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkCaching.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkCaching.java deleted file mode 100644 index d8acb7e6ab..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkCaching.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCaching; - -/** - * EclipseLink <code>orm.xml</code> caching - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface OrmEclipseLinkCaching - extends EclipseLinkCaching, XmlContextNode -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkConverterContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkConverterContainer.java deleted file mode 100644 index ae9666fde0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkConverterContainer.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverterContainer; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkCustomConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkObjectTypeConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkStructConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkTypeConverter; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * EclipseLink <code>orm.xml</code> converter container - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.2 - * @since 2.1 - */ -public interface OrmEclipseLinkConverterContainer - extends EclipseLinkConverterContainer, XmlContextNode -{ - - ListIterable<OrmEclipseLinkCustomConverter> getCustomConverters(); - OrmEclipseLinkCustomConverter addCustomConverter(int index); - OrmEclipseLinkCustomConverter addCustomConverter(); - - ListIterable<OrmEclipseLinkObjectTypeConverter> getObjectTypeConverters(); - OrmEclipseLinkObjectTypeConverter addObjectTypeConverter(int index); - OrmEclipseLinkObjectTypeConverter addObjectTypeConverter(); - - ListIterable<OrmEclipseLinkStructConverter> getStructConverters(); - OrmEclipseLinkStructConverter addStructConverter(int index); - OrmEclipseLinkStructConverter addStructConverter(); - - ListIterable<OrmEclipseLinkTypeConverter> getTypeConverters(); - OrmEclipseLinkTypeConverter addTypeConverter(int index); - OrmEclipseLinkTypeConverter addTypeConverter(); - - - // ********** refactoring ********** - - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - - interface Owner { - int getNumberSupportedConverters(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkEmbeddable.java deleted file mode 100644 index b401ae71a9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkEmbeddable.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmEmbeddable; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkEmbeddable; -import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEmbeddable; -import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEmbeddable; - -/** - * EclipseLink <code>orm.xml</code> embeddable - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface OrmEclipseLinkEmbeddable - extends OrmEmbeddable, EclipseLinkEmbeddable, EclipseLinkOrmTypeMapping -{ - XmlEmbeddable getXmlTypeMapping(); - - JavaEclipseLinkEmbeddable getJavaTypeMapping(); - - JavaEclipseLinkEmbeddable getJavaTypeMappingForDefaults(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkEntity.java deleted file mode 100644 index 52b3b9472f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkEntity.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmEntity; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkEntity; -import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEntity; -import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity; - -/** - * EclipseLink <code>orm.xml</code> entity - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface OrmEclipseLinkEntity - extends OrmEntity, EclipseLinkEntity, OrmEclipseLinkNonEmbeddableTypeMapping -{ - XmlEntity getXmlTypeMapping(); - - JavaEclipseLinkEntity getJavaTypeMapping(); - - JavaEclipseLinkEntity getJavaTypeMappingForDefaults(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkMappedSuperclass.java deleted file mode 100644 index 37a0c7e46b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkMappedSuperclass.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass; -import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkMappedSuperclass; -import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkMappedSuperclass; -import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlMappedSuperclass; - -/** - * EclipseLink - * <code>orm.xml</code> mapped superclass - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 2.1 - * @since 2.1 - */ -public interface OrmEclipseLinkMappedSuperclass - extends OrmMappedSuperclass, EclipseLinkMappedSuperclass, OrmEclipseLinkNonEmbeddableTypeMapping -{ - XmlMappedSuperclass getXmlTypeMapping(); - - JavaEclipseLinkMappedSuperclass getJavaTypeMapping(); - - JavaEclipseLinkMappedSuperclass getJavaTypeMappingForDefaults(); - - OrmQueryContainer getQueryContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkMultitenancy2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkMultitenancy2_3.java deleted file mode 100644 index dad9f450e3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkMultitenancy2_3.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkMultitenancy2_3; - -public interface OrmEclipseLinkMultitenancy2_3 - extends EclipseLinkMultitenancy2_3, XmlContextNode -{ - ListIterable<OrmReadOnlyTenantDiscriminatorColumn2_3> getTenantDiscriminatorColumns(); - - ListIterable<OrmTenantDiscriminatorColumn2_3> getSpecifiedTenantDiscriminatorColumns(); - OrmTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(); - OrmTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(int index); - - ListIterable<OrmVirtualTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkNonEmbeddableTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkNonEmbeddableTypeMapping.java deleted file mode 100644 index 70cec9cebc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmEclipseLinkNonEmbeddableTypeMapping.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkNonEmbeddableTypeMapping; -import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkNonEmbeddableTypeMapping; - -/** - * EclipseLink <code>orm.xml</code> non-embeddable type mapping - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface OrmEclipseLinkNonEmbeddableTypeMapping - extends EclipseLinkNonEmbeddableTypeMapping, EclipseLinkOrmTypeMapping -{ - OrmEclipseLinkCaching getCaching(); - - JavaEclipseLinkNonEmbeddableTypeMapping getJavaTypeMapping(); - - JavaEclipseLinkNonEmbeddableTypeMapping getJavaTypeMappingForDefaults(); - - OrmEclipseLinkMultitenancy2_3 getMultitenancy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java deleted file mode 100644 index 8879430be2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedDiscriminatorColumn; -import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTableColumn; -import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3; - -/** - * tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface OrmReadOnlyTenantDiscriminatorColumn2_3 - extends OrmReadOnlyNamedDiscriminatorColumn, ReadOnlyTenantDiscriminatorColumn2_3, OrmReadOnlyTableColumn -{ - - // ********** owner ********** - - /** - * interface allowing discriminator columns to be used in multiple places - */ - interface Owner - extends ReadOnlyTenantDiscriminatorColumn2_3.Owner, OrmReadOnlyNamedDiscriminatorColumn.Owner - { - //combining interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmTenantDiscriminatorColumn2_3.java deleted file mode 100644 index aee1206caf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.eclipselink.core.context.TenantDiscriminatorColumn2_3; -import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.XmlTenantDiscriminatorColumn_2_3; - -/** - * orm tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - * - * @version 3.1 - * @since 3.1 - */ -public interface OrmTenantDiscriminatorColumn2_3 - extends TenantDiscriminatorColumn2_3, OrmReadOnlyTenantDiscriminatorColumn2_3 -{ - XmlTenantDiscriminatorColumn_2_3 getXmlColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmVirtualTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmVirtualTenantDiscriminatorColumn2_3.java deleted file mode 100644 index d39ddfbecf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmVirtualTenantDiscriminatorColumn2_3.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTableColumn; -import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3; -import org.eclipse.jpt.jpa.eclipselink.core.context.VirtualTenantDiscriminatorColumn2_3; - -/** - * <code>orm.xml</code> virtual tenant discriminator column - * <p> - * Provisional API: This interface is part of an interim API that is still - * under development and expected to change significantly before reaching - * stability. It is available at this early stage to solicit feedback from - * pioneering adopters on the understanding that any code that uses this API - * will almost certainly be broken (repeatedly) as the API evolves. - */ -public interface OrmVirtualTenantDiscriminatorColumn2_3 - extends VirtualTenantDiscriminatorColumn2_3, OrmReadOnlyTenantDiscriminatorColumn2_3, OrmReadOnlyTableColumn -{ - /** - * The overridden column can be either a Java tenant discriminator column or an - * <code>orm.xml</code> tenant discriminator column; so we don't change the return type - * here. - */ - ReadOnlyTenantDiscriminatorColumn2_3 getOverriddenColumn(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/BatchWriting.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/BatchWriting.java deleted file mode 100644 index a6e372fd54..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/BatchWriting.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * BatchWriting - */ -public enum BatchWriting implements PersistenceXmlEnumValue { - none("None"), //$NON-NLS-1$ - jdbc("JDBC"), //$NON-NLS-1$ - buffered("Buffered"), //$NON-NLS-1$ - oracle_jdbc("Oracle-JDBC"); //$NON-NLS-1$ - - private final String propertyValue; - - BatchWriting(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CacheType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CacheType.java deleted file mode 100644 index 5c258d688e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CacheType.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * CacheType - */ -public enum CacheType implements PersistenceXmlEnumValue { - soft_weak("SoftWeak"), //$NON-NLS-1$ - hard_weak("HardWeak"), //$NON-NLS-1$ - weak("Weak"), //$NON-NLS-1$ - soft("Soft"), //$NON-NLS-1$ - full("Full"), //$NON-NLS-1$ - none("NONE"); //$NON-NLS-1$ - - private final String propertyValue; - - CacheType(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Caching.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Caching.java deleted file mode 100644 index f285fcf9d1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Caching.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * Caching - */ -public interface Caching extends PersistenceUnitProperties -{ - CacheType getDefaultCacheTypeDefault(); - CacheType getCacheTypeDefault(); - void setCacheTypeDefault(CacheType cacheTypeDefault); - static final String CACHE_TYPE_DEFAULT_PROPERTY = "cacheTypeDefault"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_TYPE_DEFAULT = "eclipselink.cache.type.default"; //$NON-NLS-1$ - static final CacheType DEFAULT_CACHE_TYPE_DEFAULT = CacheType.soft_weak; - - Integer getDefaultCacheSizeDefault(); - Integer getCacheSizeDefault(); - void setCacheSizeDefault(Integer cacheSizeDefault); - static final String CACHE_SIZE_DEFAULT_PROPERTY = "cacheSizeDefault"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_SIZE_DEFAULT = "eclipselink.cache.size.default"; //$NON-NLS-1$ - static final Integer DEFAULT_CACHE_SIZE_DEFAULT = Integer.valueOf(100); - - Boolean getDefaultSharedCacheDefault(); - Boolean getSharedCacheDefault(); - void setSharedCacheDefault(Boolean sharedCacheDefault); - static final String SHARED_CACHE_DEFAULT_PROPERTY = "sharedCacheDefault"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_SHARED_DEFAULT = "eclipselink.cache.shared.default"; //$NON-NLS-1$ - static final Boolean DEFAULT_SHARED_CACHE_DEFAULT = Boolean.TRUE; - - - CacheType getDefaultCacheType(); - CacheType getCacheTypeOf(String entityName); - void setCacheTypeOf(String entityName, CacheType cacheType); - static final String CACHE_TYPE_PROPERTY = "cacheType"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_TYPE = "eclipselink.cache.type."; //$NON-NLS-1$ - static final CacheType DEFAULT_CACHE_TYPE = CacheType.soft_weak; - - Integer getDefaultCacheSize(); - Integer getCacheSizeOf(String entityName); - void setCacheSizeOf(String entityName, Integer cacheSize); - static final String CACHE_SIZE_PROPERTY = "cacheSize"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_SIZE = "eclipselink.cache.size."; //$NON-NLS-1$ - static final Integer DEFAULT_CACHE_SIZE = Integer.valueOf(100); - - Boolean getDefaultSharedCache(); - Boolean getSharedCacheOf(String entityName); - void setSharedCacheOf(String entityName, Boolean sharedCache); - static final String SHARED_CACHE_PROPERTY = "sharedCache"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SHARED_CACHE = "eclipselink.cache.shared."; //$NON-NLS-1$ - static final Boolean DEFAULT_SHARED_CACHE = Boolean.TRUE; - - FlushClearCache getDefaultFlushClearCache(); - FlushClearCache getFlushClearCache(); - void setFlushClearCache(FlushClearCache newFlushClearCache); - static final String FLUSH_CLEAR_CACHE_PROPERTY = "flushClearCache"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_FLUSH_CLEAR_CACHE = "eclipselink.flush-clear.cache"; //$NON-NLS-1$ - static final FlushClearCache DEFAULT_FLUSH_CLEAR_CACHE = FlushClearCache.drop_invalidate; - - void removeDefaultCachingProperties(); - - ListIterable<CachingEntity> getEntities(); - Iterable<String> getEntityNames(); - int getEntitiesSize(); - boolean entityExists(String entity); - CachingEntity addEntity(String entity); - void removeEntity(String entity); - String ENTITIES_LIST = "entities"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CachingEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CachingEntity.java deleted file mode 100644 index cf80dcd8ea..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CachingEntity.java +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import java.io.Serializable; - -import org.eclipse.jpt.common.utility.internal.StringTools; -import org.eclipse.jpt.common.utility.internal.model.AbstractModel; - -/** - * Entity - */ -public class CachingEntity extends AbstractModel implements Cloneable, Serializable -{ - private String name; - private Caching parent; - - public static final String CACHE_TYPE_PROPERTY = Caching.CACHE_TYPE_PROPERTY; - public static final String CACHE_SIZE_PROPERTY = Caching.CACHE_SIZE_PROPERTY; - public static final String SHARED_CACHE_PROPERTY = Caching.SHARED_CACHE_PROPERTY; - - // ********** EclipseLink properties ********** - private CacheType cacheType; - private Integer cacheSize; - private Boolean cacheIsShared; - - private static final long serialVersionUID = 1L; - - // ********** constructors ********** - public CachingEntity(Caching parent, String name) { - this(parent); - this.initialize(name); - } - - private CachingEntity(Caching parent) { - this.parent = parent; - } - - private void initialize(String name) { - if(StringTools.stringIsEmpty(name)) { - throw new IllegalArgumentException(); - } - this.name = name; - } - - // ********** behaviors ********** - @Override - public boolean equals(Object o) { - if ( ! (o instanceof CachingEntity)) { - return false; - } - CachingEntity other = (CachingEntity) o; - return ( - (this.cacheType == null ? - other.cacheType == null : this.cacheType.equals(other.cacheType)) && - (this.cacheIsShared == null ? - other.cacheIsShared == null : this.cacheIsShared.equals(other.cacheIsShared)) && - (this.cacheSize == null ? - other.cacheSize == null : this.cacheSize.equals(other.cacheSize))); - } - - @Override - public int hashCode() { - return (this.cacheType == null) ? 0 : this.cacheType.hashCode(); - } - - @Override - public CachingEntity clone() { - try { - return (CachingEntity)super.clone(); - } - catch (CloneNotSupportedException ex) { - throw new InternalError(); - } - } - - public boolean isEmpty() { - return (this.cacheType == null) && - (this.cacheSize == null) && - (this.cacheIsShared == null); - } - - public boolean entityNameIsValid() { - return ! StringTools.stringIsEmpty(this.name); - } - - public Caching getParent() { - return this.parent; - } - - // ********** name ********** - public String getName() { - return this.name; - } - - // ********** cacheType ********** - public CacheType getCacheType() { - return this.cacheType; - } - - public void setCacheType(CacheType cacheType) { - CacheType old = this.cacheType; - this.cacheType = cacheType; - this.firePropertyChanged(CACHE_TYPE_PROPERTY, old, cacheType); - } - - // ********** cacheSize ********** - public Integer getCacheSize() { - return this.cacheSize; - } - - public void setCacheSize(Integer cacheSize) { - Integer old = this.cacheSize; - this.cacheSize = cacheSize; - this.firePropertyChanged(CACHE_SIZE_PROPERTY, old, cacheSize); - } - - // ********** cacheIsShared ********** - public Boolean cacheIsShared() { - return this.cacheIsShared; - } - - public void setSharedCache(Boolean isShared) { - Boolean old = this.cacheIsShared; - this.cacheIsShared = isShared; - this.firePropertyChanged(SHARED_CACHE_PROPERTY, old, isShared); - } - - @Override - public void toString(StringBuilder sb) { - sb.append("name: "); //$NON-NLS-1$ - sb.append(this.name); - sb.append(", cacheType: "); //$NON-NLS-1$ - sb.append(this.cacheType); - sb.append(", cacheSize: "); //$NON-NLS-1$ - sb.append(this.cacheSize); - sb.append(", cacheIsShared: "); //$NON-NLS-1$ - sb.append(this.cacheIsShared); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Connection.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Connection.java deleted file mode 100644 index 3266bab553..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Connection.java +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2011 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * Connection - */ -public interface Connection extends PersistenceUnitProperties -{ - Boolean getDefaultNativeSql(); - Boolean getNativeSql(); - void setNativeSql(Boolean newNativeSql); - static final String NATIVE_SQL_PROPERTY = "nativeSql"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_NATIVE_SQL = "eclipselink.jdbc.native-sql"; //$NON-NLS-1$ - static final Boolean DEFAULT_NATIVE_SQL = Boolean.FALSE; - - BatchWriting getDefaultBatchWriting(); - BatchWriting getBatchWriting(); - void setBatchWriting(BatchWriting newBatchWriting); - static final String BATCH_WRITING_PROPERTY = "batchWriting"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_BATCH_WRITING = "eclipselink.jdbc.batch-writing"; //$NON-NLS-1$ - static final BatchWriting DEFAULT_BATCH_WRITING = BatchWriting.none; - - Boolean getDefaultCacheStatements(); - Boolean getCacheStatements(); - void setCacheStatements(Boolean newCacheStatements); - static final String CACHE_STATEMENTS_PROPERTY = "cacheStatements"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_STATEMENTS = "eclipselink.jdbc.cache-statements"; //$NON-NLS-1$ - static final Boolean DEFAULT_CACHE_STATEMENTS = Boolean.FALSE; - - Integer getDefaultCacheStatementsSize(); - Integer getCacheStatementsSize(); - void setCacheStatementsSize(Integer newCacheStatementsSize); - static final String CACHE_STATEMENTS_SIZE_PROPERTY = "cacheStatementsSize"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CACHE_STATEMENTS_SIZE = "eclipselink.jdbc.cache-statements.size"; //$NON-NLS-1$ - static final Integer DEFAULT_CACHE_STATEMENTS_SIZE = Integer.valueOf(50); - - String getDefaultDriver(); - String getDriver(); - void setDriver(String newDriver); - static final String DRIVER_PROPERTY = "driver"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_DRIVER = "eclipselink.jdbc.driver"; //$NON-NLS-1$ - static final String DEFAULT_DRIVER = ""; //$NON-NLS-1$ - - String getDefaultUrl(); - String getUrl(); - void setUrl(String newUrl); - static final String URL_PROPERTY = "url"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_URL = "eclipselink.jdbc.url"; //$NON-NLS-1$ - static final String DEFAULT_URL = ""; //$NON-NLS-1$ - - String getDefaultUser(); - String getUser(); - void setUser(String newUser); - static final String USER_PROPERTY = "user"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_USER = "eclipselink.jdbc.user"; //$NON-NLS-1$ - static final String DEFAULT_USER = ""; //$NON-NLS-1$ - - String getDefaultPassword(); - String getPassword(); - void setPassword(String newPassword); - static final String PASSWORD_PROPERTY = "password"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_PASSWORD = "eclipselink.jdbc.password"; //$NON-NLS-1$ - static final String DEFAULT_PASSWORD = ""; //$NON-NLS-1$ - - Boolean getDefaultBindParameters(); - Boolean getBindParameters(); - void setBindParameters(Boolean newBindParameters); - static final String BIND_PARAMETERS_PROPERTY = "bindParameters"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_BIND_PARAMETERS = "eclipselink.jdbc.bind-parameters"; //$NON-NLS-1$ - static final Boolean DEFAULT_BIND_PARAMETERS = Boolean.TRUE; - - Boolean getDefaultReadConnectionsShared(); - Boolean getReadConnectionsShared(); - void setReadConnectionsShared(Boolean newReadConnectionsShared); - static final String READ_CONNECTIONS_SHARED_PROPERTY = "readConnectionsShared"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_READ_CONNECTIONS_SHARED = "eclipselink.jdbc.read-connections.shared"; //$NON-NLS-1$ - static final Boolean DEFAULT_READ_CONNECTIONS_SHARED = Boolean.FALSE; - - Integer getDefaultReadConnectionsMin(); - Integer getReadConnectionsMin(); - void setReadConnectionsMin(Integer newReadConnectionsMin); - static final String READ_CONNECTIONS_MIN_PROPERTY = "readConnectionsMin"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_READ_CONNECTIONS_MIN = "eclipselink.jdbc.read-connections.min"; //$NON-NLS-1$ - static final Integer DEFAULT_READ_CONNECTIONS_MIN = Integer.valueOf(2); - - Integer getDefaultReadConnectionsMax(); - Integer getReadConnectionsMax(); - void setReadConnectionsMax(Integer newReadConnectionsMax); - static final String READ_CONNECTIONS_MAX_PROPERTY = "readConnectionsMax"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_READ_CONNECTIONS_MAX = "eclipselink.jdbc.read-connections.max"; //$NON-NLS-1$ - static final Integer DEFAULT_READ_CONNECTIONS_MAX = Integer.valueOf(2); - - Integer getDefaultWriteConnectionsMin(); - Integer getWriteConnectionsMin(); - void setWriteConnectionsMin(Integer newWriteConnectionsMin); - static final String WRITE_CONNECTIONS_MIN_PROPERTY = "writeConnectionsMin"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WRITE_CONNECTIONS_MIN = "eclipselink.jdbc.write-connections.min"; //$NON-NLS-1$ - static final Integer DEFAULT_WRITE_CONNECTIONS_MIN = Integer.valueOf(5); - - Integer getDefaultWriteConnectionsMax(); - Integer getWriteConnectionsMax(); - void setWriteConnectionsMax(Integer newWriteConnectionsMax); - static final String WRITE_CONNECTIONS_MAX_PROPERTY = "writeConnectionsMax"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WRITE_CONNECTIONS_MAX = "eclipselink.jdbc.write-connections.max"; //$NON-NLS-1$ - static final Integer DEFAULT_WRITE_CONNECTIONS_MAX = Integer.valueOf(10); - - ExclusiveConnectionMode getDefaultExclusiveConnectionMode(); - ExclusiveConnectionMode getExclusiveConnectionMode(); - void setExclusiveConnectionMode(ExclusiveConnectionMode newExclusiveConnectionMode); - static final String EXCLUSIVE_CONNECTION_MODE_PROPERTY = "exclusiveConnectionMode"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_EXCLUSIVE_CONNECTION_MODE = "eclipselink.jdbc.exclusive-connection.mode"; //$NON-NLS-1$ - static final ExclusiveConnectionMode DEFAULT_EXCLUSIVE_CONNECTION_MODE = ExclusiveConnectionMode.transactional; - - Boolean getDefaultLazyConnection(); - Boolean getLazyConnection(); - void setLazyConnection(Boolean newLazyConnection); - static final String LAZY_CONNECTION_PROPERTY = "lazyConnection"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_LAZY_CONNECTION = "eclipselink.jdbc.exclusive-connection.is-lazy"; //$NON-NLS-1$ - static final Boolean DEFAULT_LAZY_CONNECTION = Boolean.TRUE; - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Connection2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Connection2_0.java deleted file mode 100644 index 593779eb74..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Connection2_0.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009, 2011 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.jpa2.context.persistence.connection.JpaConnection2_0; - -/** - * Connection2_0 - */ -public interface Connection2_0 extends Connection, JpaConnection2_0 -{ - -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Customization.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Customization.java deleted file mode 100644 index c0ea32dcbf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Customization.java +++ /dev/null @@ -1,138 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * Customization - */ -public interface Customization extends PersistenceUnitProperties -{ - Boolean getDefaultThrowExceptions(); - Boolean getThrowExceptions(); - void setThrowExceptions(Boolean newThrowExceptions); - static final String THROW_EXCEPTIONS_PROPERTY = "throwExceptions"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_THROW_EXCEPTIONS = "eclipselink.orm.throw.exceptions"; //$NON-NLS-1$ - static final Boolean DEFAULT_THROW_EXCEPTIONS = Boolean.TRUE; - - Weaving getDefaultWeaving(); - Weaving getWeaving(); - void setWeaving(Weaving newWeaving); - static final String WEAVING_PROPERTY = "weaving"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WEAVING = "eclipselink.weaving"; //$NON-NLS-1$ - static final Weaving DEFAULT_WEAVING = Weaving.true_; - - Boolean getDefaultWeavingLazy(); - Boolean getWeavingLazy(); - void setWeavingLazy(Boolean newWeavingLazy); - static final String WEAVING_LAZY_PROPERTY = "weavingLazy"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WEAVING_LAZY = "eclipselink.weaving.lazy"; //$NON-NLS-1$ - static final Boolean DEFAULT_WEAVING_LAZY = Boolean.TRUE; - - Boolean getDefaultWeavingChangeTracking(); - Boolean getWeavingChangeTracking(); - void setWeavingChangeTracking(Boolean newWeavingChangeTracking); - static final String WEAVING_CHANGE_TRACKING_PROPERTY = "weavingChangeTracking"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WEAVING_CHANGE_TRACKING = "eclipselink.weaving.changetracking"; //$NON-NLS-1$ - static final Boolean DEFAULT_WEAVING_CHANGE_TRACKING = Boolean.TRUE; - - Boolean getDefaultWeavingFetchGroups(); - Boolean getWeavingFetchGroups(); - void setWeavingFetchGroups(Boolean newWeavingFetchGroups); - static final String WEAVING_FETCH_GROUPS_PROPERTY = "weavingFetchGroups"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WEAVING_FETCH_GROUPS = "eclipselink.weaving.fetchgroups"; //$NON-NLS-1$ - static final Boolean DEFAULT_WEAVING_FETCH_GROUPS = Boolean.TRUE; - - Boolean getDefaultWeavingInternal(); - Boolean getWeavingInternal(); - void setWeavingInternal(Boolean newWeavingInternal); - static final String WEAVING_INTERNAL_PROPERTY = "weavingInternal"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WEAVING_INTERNAL = "eclipselink.weaving.internal"; //$NON-NLS-1$ - static final Boolean DEFAULT_WEAVING_INTERNAL = Boolean.TRUE; - - Boolean getDefaultWeavingEager(); - Boolean getWeavingEager(); - void setWeavingEager(Boolean newWeavingEager); - static final String WEAVING_EAGER_PROPERTY = "weavingEager"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_WEAVING_EAGER = "eclipselink.weaving.eager"; //$NON-NLS-1$ - static final Boolean DEFAULT_WEAVING_EAGER = Boolean.FALSE; - - String getDefaultDescriptorCustomizer(); - String getDescriptorCustomizerOf(String entityName); - void setDescriptorCustomizerOf(String entityName, String newDescriptorCustomizer); - static final String DESCRIPTOR_CUSTOMIZER_PROPERTY = "descriptorCustomizer"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_DESCRIPTOR_CUSTOMIZER = "eclipselink.descriptor.customizer."; //$NON-NLS-1$ - static final String DEFAULT_DESCRIPTOR_CUSTOMIZER = null; // no default - - ListIterable<String> getSessionCustomizers(); - int getSessionCustomizersSize(); - boolean sessionCustomizerExists(String sessionCustomizerClassName); - String addSessionCustomizer(String newSessionCustomizerClassName); - void removeSessionCustomizer(String sessionCustomizerClassName); - static final String SESSION_CUSTOMIZER_LIST = "sessionCustomizers"; //$NON-NLS-1$ - static final String SESSION_CUSTOMIZER_PROPERTY = "sessionCustomizer"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SESSION_CUSTOMIZER = "eclipselink.session.customizer"; //$NON-NLS-1$ - String ECLIPSELINK_SESSION_CUSTOMIZER_CLASS_NAME = "org.eclipse.persistence.config.SessionCustomizer"; //$NON-NLS-1$ - - ListIterable<CustomizationEntity> getEntities(); - Iterable<String> getEntityNames(); - int getEntitiesSize(); - boolean entityExists(String entity); - CustomizationEntity addEntity(String entity); - void removeEntity(String entity); - static final String ENTITIES_LIST = "entities"; //$NON-NLS-1$ - - String getDefaultProfiler(); - String getProfiler(); - void setProfiler(String newProfiler); - void setProfiler(Profiler newProfiler); - static final String PROFILER_PROPERTY = "profiler"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_PROFILER = "eclipselink.profiler"; //$NON-NLS-1$ - static final String DEFAULT_PROFILER = Profiler.no_profiler.getPropertyValue(); - static final String[] RESERVED_PROFILER_NAMES = {Profiler.no_profiler.getPropertyValue(), Profiler.performance_profiler.getPropertyValue(), Profiler.query_monitor.getPropertyValue()}; - String ECLIPSELINK_SESSION_PROFILER_CLASS_NAME = "org.eclipse.persistence.sessions.SessionProfiler"; //$NON-NLS-1$ - - Boolean getDefaultValidationOnly(); - Boolean getValidationOnly(); - void setValidationOnly(Boolean newValidationOnly); - static final String VALIDATION_ONLY_PROPERTY = "validationOnly"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_VALIDATION_ONLY = "eclipselink.validation-only"; //$NON-NLS-1$ - static final Boolean DEFAULT_VALIDATION_ONLY = Boolean.TRUE; - - String getDefaultExceptionHandler(); - String getExceptionHandler(); - void setExceptionHandler(String newExceptionHandler); - static final String EXCEPTION_HANDLER_PROPERTY = "exceptionHandler"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_EXCEPTION_HANDLER = "eclipselink.exception-handler"; //$NON-NLS-1$ - static final String DEFAULT_EXCEPTION_HANDLER = null; // no default - String ECLIPSELINK_EXCEPTION_HANDLER_CLASS_NAME = "org.eclipse.persistence.exceptions.ExceptionHandler"; //$NON-NLS-1$ - - Boolean getDefaultValidateSchema(); - Boolean getValidateSchema(); - void setValidateSchema(Boolean newValidateSchema); - static final String VALIDATE_SCHEMA_PROPERTY = "validateSchema"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_VALIDATE_SCHEMA = "eclipselink.orm.validate.schema"; //$NON-NLS-1$ - static final Boolean DEFAULT_VALIDATE_SCHEMA = Boolean.FALSE; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CustomizationEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CustomizationEntity.java deleted file mode 100644 index b57a6e8c8f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/CustomizationEntity.java +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import java.io.Serializable; -import org.eclipse.jpt.common.utility.internal.StringTools; -import org.eclipse.jpt.common.utility.internal.model.AbstractModel; - -/** - * Entity - */ -public class CustomizationEntity extends AbstractModel implements Cloneable, Serializable -{ - private String name; - private Customization parent; - - public static final String DESCRIPTOR_CUSTOMIZER_PROPERTY = Customization.DESCRIPTOR_CUSTOMIZER_PROPERTY; - - // ********** EclipseLink properties ********** - private String descriptorCustomizer; - - private static final long serialVersionUID = 1L; - - // ********** constructors ********** - public CustomizationEntity(Customization parent, String name) { - this(parent); - this.initialize(name); - } - - private CustomizationEntity(Customization parent) { - this.parent = parent; - } - - private void initialize(String name) { - if(StringTools.stringIsEmpty(name)) { - throw new IllegalArgumentException(); - } - this.name = name; - } - - // ********** behaviors ********** - @Override - public boolean equals(Object o) { - if ( ! (o instanceof CustomizationEntity)) { - return false; - } - CustomizationEntity customizer = (CustomizationEntity) o; - return ( - (this.descriptorCustomizer == null ? - customizer.descriptorCustomizer == null : - this.descriptorCustomizer.equals(customizer.descriptorCustomizer))); - } - - @Override - public int hashCode() { - return (this.descriptorCustomizer == null) ? 0 : this.descriptorCustomizer.hashCode(); - } - - @Override - public CustomizationEntity clone() { - try { - return (CustomizationEntity)super.clone(); - } - catch (CloneNotSupportedException ex) { - throw new InternalError(); - } - } - - public boolean isEmpty() { - return this.descriptorCustomizer == null; - } - - public boolean entityNameIsValid() { - return ! StringTools.stringIsEmpty(this.name); - } - - public Customization getParent() { - return this.parent; - } - - // ********** getter/setter ********** - public String getName() { - return this.name; - } - - public String getDescriptorCustomizer() { - return this.descriptorCustomizer; - } - - public void setDescriptorCustomizer(String descriptorCustomizer) { - String old = this.descriptorCustomizer; - this.descriptorCustomizer = descriptorCustomizer; - this.firePropertyChanged(DESCRIPTOR_CUSTOMIZER_PROPERTY, old, descriptorCustomizer); - } - - @Override - public void toString(StringBuilder sb) { - sb.append("name: "); //$NON-NLS-1$ - sb.append(this.name); - sb.append(", descriptorCustomizer: "); //$NON-NLS-1$ - sb.append(this.descriptorCustomizer); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/DdlGenerationType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/DdlGenerationType.java deleted file mode 100644 index d4f086a305..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/DdlGenerationType.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * DdlGenerationType - */ -public enum DdlGenerationType implements PersistenceXmlEnumValue{ - none("none") , //$NON-NLS-1$ - create_tables("create-tables"), //$NON-NLS-1$ - drop_and_create_tables("drop-and-create-tables"); //$NON-NLS-1$ - - private final String propertyValue; - - DdlGenerationType(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java deleted file mode 100644 index 0339f65c37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java +++ /dev/null @@ -1,1430 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.SubMonitor; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.common.core.internal.utility.JDTTools; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.ArrayTools; -import org.eclipse.jpt.common.utility.internal.CollectionTools; -import org.eclipse.jpt.common.utility.internal.NonEmptyStringFilter; -import org.eclipse.jpt.common.utility.internal.StringTools; -import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable; -import org.eclipse.jpt.common.utility.internal.iterables.CompositeListIterable; -import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable; -import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable; -import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable; -import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable; -import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper; -import org.eclipse.jpt.common.utility.internal.iterables.SuperListIterableWrapper; -import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable; -import org.eclipse.jpt.jpa.core.context.Generator; -import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode; -import org.eclipse.jpt.jpa.core.context.MappingFile; -import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata; -import org.eclipse.jpt.jpa.core.context.MappingFileRoot; -import org.eclipse.jpt.jpa.core.context.Query; -import org.eclipse.jpt.jpa.core.context.TypeMapping; -import org.eclipse.jpt.jpa.core.context.java.JavaGenerator; -import org.eclipse.jpt.jpa.core.context.java.JavaQuery; -import org.eclipse.jpt.jpa.core.context.orm.EntityMappings; -import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer; -import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef; -import org.eclipse.jpt.jpa.core.context.persistence.Persistence; -import org.eclipse.jpt.jpa.core.internal.JptCoreMessages; -import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit; -import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.ImpliedMappingFileRef; -import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.SharedCacheMode; -import org.eclipse.jpt.jpa.core.jpql.JpaJpqlQueryHelper; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit; -import org.eclipse.jpt.jpa.eclipselink.core.EclipseLinkJpaProject; -import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverter; -import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTypeMapping; -import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3; -import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkEntityMappings; -import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkPersistenceUnitDefaults; -import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkConverterContainer; -import org.eclipse.jpt.jpa.eclipselink.core.internal.DefaultEclipseLinkJpaValidationMessages; -import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaJpqlQueryHelper; -import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaValidationMessages; -import org.eclipse.jpt.jpa.eclipselink.core.internal.JptJpaEclipseLinkCoreMessages; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.JavaEclipseLinkConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkConverter; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkPersistenceUnitMetadata; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLinkCaching; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLinkCustomization; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLinkGeneralProperties; -import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLinkSchemaGeneration; -import org.eclipse.osgi.util.NLS; -import org.eclipse.text.edits.ReplaceEdit; -import org.eclipse.wst.validation.internal.provisional.core.IMessage; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; - -/** - * EclipseLink persistence unit - */ -public class EclipseLinkPersistenceUnit - extends AbstractPersistenceUnit -{ - /** - * Will be null if the implied EL mapping file should not be part of the context model. - * Otherwise will be equal to potentialImpliedEclipseLinkMappingFileRef. - * - * @see #potentialImpliedEclipseLinkMappingFileRef - */ - protected MappingFileRef impliedEclipseLinkMappingFileRef; - /** - * String constant associated with changes to the implied eclipselink mapping file ref - */ - public static final String IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY = "impliedEclipseLinkMappingFileRef"; //$NON-NLS-1$ - - /** - * Store the implied EL mapping file ref even if it is not part of the context model. - * This allows us to sync it in the syncWithResourceModel. In the update, determine if - * it should be part of the context model and set the impliedEclipseLinkMappingFileRef appropriately. - * - * @see #impliedEclipseLinkMappingFileRef - * @see #usesImpliedEclipseLinkMappingFile() - */ - protected final MappingFileRef potentialImpliedEclipseLinkMappingFileRef; - - - private/*final*/ GeneralProperties generalProperties; - private Customization customization; - private Caching caching; - private Logging logging; - private SchemaGeneration schemaGeneration; - - /* global converter definitions, defined elsewhere in model */ - protected final Vector<EclipseLinkConverter> converters = new Vector<EclipseLinkConverter>(); - - protected final Vector<ReadOnlyTenantDiscriminatorColumn2_3> defaultTenantDiscriminatorColumns = new Vector<ReadOnlyTenantDiscriminatorColumn2_3>(); - - protected String defaultGetMethod; - protected String defaultSetMethod; - - public EclipseLinkPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) { - super(parent, xmlPersistenceUnit); - this.potentialImpliedEclipseLinkMappingFileRef = this.buildEclipseLinkImpliedMappingFileRef(); - } - - - // ********** synchronize/update ********** - - @Override - public void update() { - super.update(); - this.setConverters(this.buildConverters()); - - OrmEclipseLinkPersistenceUnitMetadata metadata = this.getEclipseLinkMetadata(); - - EclipseLinkPersistenceUnitDefaults defaults = (metadata == null) ? null : metadata.getPersistenceUnitDefaults(); - this.setDefaultTenantDiscriminatorColumns(this.buildDefaultTenantDiscriminatorColumns(defaults)); - } - - protected OrmEclipseLinkPersistenceUnitMetadata getEclipseLinkMetadata() { - MappingFilePersistenceUnitMetadata metadata = super.getMetadata(); - if (metadata instanceof OrmEclipseLinkPersistenceUnitMetadata) { - return (OrmEclipseLinkPersistenceUnitMetadata) metadata; - } - return null; - } - - @Override - protected void updatePersistenceUnitMetadata() { - super.updatePersistenceUnitMetadata(); - OrmEclipseLinkPersistenceUnitMetadata metadata = this.getEclipseLinkMetadata(); - - EclipseLinkPersistenceUnitDefaults defaults = (metadata == null) ? null : metadata.getPersistenceUnitDefaults(); - this.setDefaultGetMethod(this.buildDefaultGetMethod(defaults)); - this.setDefaultSetMethod(this.buildDefaultSetMethod(defaults)); - } - - // ********** properties ********** - - public GeneralProperties getGeneralProperties() { - return this.generalProperties; - } - - @Override - public Connection getConnection() { - return (Connection) super.getConnection(); - } - - public Customization getCustomization() { - return this.customization; - } - - public Caching getCaching() { - return this.caching; - } - - public String getDefaultCacheTypePropertyValue() { - Property cacheTypeDefaultProperty = getCacheTypeDefaultProperty(); - return cacheTypeDefaultProperty != null ? cacheTypeDefaultProperty.getValue() : null; - } - - public String getDefaultCacheSizePropertyValue() { - Property cacheSizeDefaultProperty = getCacheSizeDefaultProperty(); - return cacheSizeDefaultProperty != null ? cacheSizeDefaultProperty.getValue() : null; - } - - public String getDefaultCacheSharedPropertyValue() { - Property cacheSharedDefaultProperty = getCacheSharedDefaultProperty(); - return cacheSharedDefaultProperty != null ? cacheSharedDefaultProperty.getValue() : null; - } - - public Logging getLogging() { - return this.logging; - } - - @Override - public Options getOptions() { - return (Options) super.getOptions(); - } - - public SchemaGeneration getSchemaGeneration() { - return this.schemaGeneration; - } - - protected GeneralProperties buildEclipseLinkGeneralProperties() { - return new EclipseLinkGeneralProperties(this); - } - - protected Connection buildEclipseLinkConnection() { - return (Connection) this.getContextNodeFactory().buildConnection(this); - } - - protected Customization buildEclipseLinkCustomization() { - return new EclipseLinkCustomization(this); - } - - protected Caching buildEclipseLinkCaching() { - return new EclipseLinkCaching(this); - } - - protected Logging buildEclipseLinkLogging() { - return (Logging) this.getContextNodeFactory().buildLogging(this); - } - - protected Options buildEclipseLinkOptions() { - return (Options) this.getContextNodeFactory().buildOptions(this); - } - - protected SchemaGeneration buildEclipseLinkSchemaGeneration() { - return new EclipseLinkSchemaGeneration(this); - } - - @Override - protected void initializeProperties() { - super.initializeProperties(); - this.generalProperties = this.buildEclipseLinkGeneralProperties(); - this.customization = this.buildEclipseLinkCustomization(); - this.caching = this.buildEclipseLinkCaching(); - this.logging = this.buildEclipseLinkLogging(); - this.schemaGeneration = this.buildEclipseLinkSchemaGeneration(); - } - - @Override - public void propertyValueChanged(String propertyName, String newValue) { - super.propertyValueChanged(propertyName, newValue); - this.generalProperties.propertyValueChanged(propertyName, newValue); - this.customization.propertyValueChanged(propertyName, newValue); - this.caching.propertyValueChanged(propertyName, newValue); - this.logging.propertyValueChanged(propertyName, newValue); - this.schemaGeneration.propertyValueChanged(propertyName, newValue); - } - - @Override - public void propertyRemoved(String propertyName) { - super.propertyRemoved(propertyName); - this.generalProperties.propertyRemoved(propertyName); - this.customization.propertyRemoved(propertyName); - this.caching.propertyRemoved(propertyName); - this.logging.propertyRemoved(propertyName); - this.schemaGeneration.propertyRemoved(propertyName); - } - - - // ********** mapping file refs ********** - - @Override - public ListIterable<MappingFileRef> getMappingFileRefs() { - return (this.impliedEclipseLinkMappingFileRef == null) ? - super.getMappingFileRefs() : - new CompositeListIterable<MappingFileRef>(super.getMappingFileRefs(), this.impliedEclipseLinkMappingFileRef); - } - - @Override - public int getMappingFileRefsSize() { - return (this.impliedEclipseLinkMappingFileRef == null) ? - super.getMappingFileRefsSize() : - super.getMappingFileRefsSize() + 1; - } - - - // ********** implied eclipselink mapping file ref ********** - - public MappingFileRef getImpliedEclipseLinkMappingFileRef() { - return this.impliedEclipseLinkMappingFileRef; - } - - protected void setImpliedEclipseLinkMappingFileRef(MappingFileRef mappingFileRef) { - MappingFileRef old = this.impliedEclipseLinkMappingFileRef; - this.impliedEclipseLinkMappingFileRef = mappingFileRef; - this.firePropertyChanged(IMPLIED_ECLIPSELINK_MAPPING_FILE_REF_PROPERTY, old, mappingFileRef); - } - - private ImpliedMappingFileRef buildEclipseLinkImpliedMappingFileRef() { - return new ImpliedMappingFileRef(this, JptJpaEclipseLinkCorePlugin.DEFAULT_ECLIPSELINK_ORM_XML_RUNTIME_PATH.toString()); - } - - @Override - protected void syncImpliedMappingFileRef() { - super.syncImpliedMappingFileRef(); - this.potentialImpliedEclipseLinkMappingFileRef.synchronizeWithResourceModel(); - } - - @Override - protected void updateImpliedMappingFileRef() { - super.updateImpliedMappingFileRef(); - - if (this.usesImpliedEclipseLinkMappingFile()) { - this.setImpliedEclipseLinkMappingFileRef(this.potentialImpliedEclipseLinkMappingFileRef); - this.potentialImpliedEclipseLinkMappingFileRef.update(); - } - else { - this.setImpliedEclipseLinkMappingFileRef(null); - //this is needed to unregister the root structure node, how we build the root structure nodes probably needs to change. - this.potentialImpliedEclipseLinkMappingFileRef.dispose(); - } - } - - /** - * Use the implied EclipseLink mapping file if all the following are true:<ul> - * <li>the properties do not explicitly exclude it - * <li>it is not specified explicitly in the persistence unit - * <li>the file actually exists - * </ul> - */ - private boolean usesImpliedEclipseLinkMappingFile() { - return this.impliedEclipseLinkMappingFileIsNotExcluded() && - this.impliedEclipseLinkMappingFileIsNotSpecified() && - this.impliedEclipseLinkMappingFileExists(); - } - - protected boolean impliedEclipseLinkMappingFileIsNotExcluded() { - return ! this.impliedEclipseLinkMappingFileIsExcluded(); - } - - protected boolean impliedEclipseLinkMappingFileIsExcluded() { - return this.getGeneralProperties().getExcludeEclipselinkOrm() == Boolean.TRUE; - } - - protected boolean impliedEclipseLinkMappingFileIsNotSpecified() { - return ! this.impliedEclipseLinkMappingFileIsSpecified(); - } - - protected boolean impliedEclipseLinkMappingFileIsSpecified() { - return this.mappingFileIsSpecified(JptJpaEclipseLinkCorePlugin.DEFAULT_ECLIPSELINK_ORM_XML_RUNTIME_PATH.toString()); - } - - protected boolean impliedEclipseLinkMappingFileExists() { - return this.getJpaProject().getDefaultEclipseLinkOrmXmlResource() != null; - } - - - // ********** default tenant discriminator columns ********** - - /** - * String constant associated with changes to the persistence unit's - * list of default tenant discriminator Columns - */ - public static final String DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST = "defaultTenantDiscriminatorColumns"; //$NON-NLS-1$ - - public ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns() { - return new LiveCloneListIterable<ReadOnlyTenantDiscriminatorColumn2_3>(this.defaultTenantDiscriminatorColumns); - } - - protected void setDefaultTenantDiscriminatorColumns(Iterable<ReadOnlyTenantDiscriminatorColumn2_3> tenantDiscriminatorColumns) { - this.synchronizeList(tenantDiscriminatorColumns, this.defaultTenantDiscriminatorColumns, DEFAULT_TENANT_DISCRIMINATOR_COLUMNS_LIST); - } - - protected ListIterable<ReadOnlyTenantDiscriminatorColumn2_3> buildDefaultTenantDiscriminatorColumns(EclipseLinkPersistenceUnitDefaults defaults) { - return (defaults == null) ? EmptyListIterable.<ReadOnlyTenantDiscriminatorColumn2_3> instance() : new SuperListIterableWrapper<ReadOnlyTenantDiscriminatorColumn2_3>(defaults.getTenantDiscriminatorColumns()); - } - - - // ********** converters ********** - - /** - * String constant associated with changes to the persistence unit's - * collection of "global" converters. - */ - public static final String CONVERTERS_COLLECTION = "converters"; //$NON-NLS-1$ - - /** - * Return the "active" converters defined within the persistence unit's scope, - * including converters with duplicate names. "Active" converters are:<ul> - * <li>any converter defined in mapping files - * <li>any converter defined via Java annotations that is not "overridden" - * by a mapping file converter with the same name - * </ul> - * <strong>NB:</strong> A Java converter defined on a class or attribute - * that is overridden in a mapping file is <em>not</em>, as a result, - * itself overridden. A Java converter can only be overridden by a mapping - * file converter with the same name. - * <p> - * <strong>NB:</strong> A Java converter defined on a class or attribute - * whose corresponding mapping file mapping (or mapping file) is marked - * "metadata complete" is ignored. - */ - // TODO bjv change to getConverterNames() etc. - public Iterable<EclipseLinkConverter> getAllConverters() { - return this.getConverters(); - } - - public Iterable<EclipseLinkConverter> getConverters() { - return new LiveCloneIterable<EclipseLinkConverter>(this.converters); - } - - public int getConvertersSize() { - return this.converters.size(); - } - - /** - * Return the names of the "active" converters defined in the persistence - * unit's scope, with duplicates removed. - */ - public Iterable<String> getUniqueConverterNames() { - return CollectionTools.set(this.getNonEmptyConverterNames(), this.getConvertersSize()); - } - - protected Iterable<String> getNonEmptyConverterNames() { - return new FilteringIterable<String>(this.getConverterNames(), NonEmptyStringFilter.instance()); - } - - protected Iterable<String> getConverterNames() { - return new TransformationIterable<EclipseLinkConverter, String>(this.getConverters(), JpaNamedContextNode.NameTransformer.<EclipseLinkConverter>instance()); - } - - protected void setConverters(Iterable<EclipseLinkConverter> converters) { - this.synchronizeCollection(converters, this.converters, CONVERTERS_COLLECTION); - } - - /** - * Converters are much like queries. - * @see #buildQueries() - */ - protected Iterable<EclipseLinkConverter> buildConverters() { - ArrayList<EclipseLinkConverter> result = CollectionTools.list(this.getMappingFileConverters()); - - HashSet<String> mappingFileConverterNames = this.convertToNames(result); - HashMap<String, ArrayList<JavaEclipseLinkConverter<?>>> javaConverters = this.mapByName(this.getAllJavaConverters()); - for (Map.Entry<String, ArrayList<JavaEclipseLinkConverter<?>>> entry : javaConverters.entrySet()) { - if ( ! mappingFileConverterNames.contains(entry.getKey())) { - result.addAll(entry.getValue()); - } - } - - return result; - } - - public Iterable<EclipseLinkConverter> getMappingFileConverters() { - return new CompositeIterable<EclipseLinkConverter>(this.getMappingFileConverterLists()); - } - - protected Iterable<Iterable<EclipseLinkConverter>> getMappingFileConverterLists() { - return new TransformationIterable<MappingFile, Iterable<EclipseLinkConverter>>(this.getMappingFiles()) { - @Override - protected Iterable<EclipseLinkConverter> transform(MappingFile mappingFile) { - MappingFileRoot root = mappingFile.getRoot(); - return (root instanceof EclipseLinkEntityMappings) ? - ((EclipseLinkEntityMappings) root).getMappingFileConverters() : - EmptyIterable.<EclipseLinkConverter>instance(); - } - }; - } - - /** - * Include "overridden" Java converters. - */ - public Iterable<JavaEclipseLinkConverter<?>> getAllJavaConverters() { - return new CompositeIterable<JavaEclipseLinkConverter<?>>(this.getAllJavaTypeMappingConverterLists()); - } - - protected Iterable<Iterable<JavaEclipseLinkConverter<?>>> getAllJavaTypeMappingConverterLists() { - return new TransformationIterable<TypeMapping, Iterable<JavaEclipseLinkConverter<?>>>(this.getAllJavaTypeMappingsUnique()) { - @Override - protected Iterable<JavaEclipseLinkConverter<?>> transform(TypeMapping typeMapping) { - return new SubIterableWrapper<EclipseLinkConverter, JavaEclipseLinkConverter<?>>(this.transform_(typeMapping)); - } - protected Iterable<EclipseLinkConverter> transform_(TypeMapping typeMapping) { - // Java "null" type mappings are not EclipseLink mappings - return (typeMapping instanceof EclipseLinkTypeMapping) ? - ((EclipseLinkTypeMapping) typeMapping).getConverters() : - EmptyIterable.<EclipseLinkConverter>instance(); - } - }; - } - - - // ********** misc ********** - - @Override - public EclipseLinkJpaProject getJpaProject() { - return (EclipseLinkJpaProject) super.getJpaProject(); - } - - @Override - public EclipseLinkPersistenceXmlContextNodeFactory getContextNodeFactory() { - return (EclipseLinkPersistenceXmlContextNodeFactory) super.getContextNodeFactory(); - } - - @Override - public void setSpecifiedSharedCacheMode(SharedCacheMode specifiedSharedCacheMode) { - super.setSpecifiedSharedCacheMode(specifiedSharedCacheMode); - - if(specifiedSharedCacheMode == SharedCacheMode.NONE) { - this.caching.removeDefaultCachingProperties(); - } - } - - @Override - protected SharedCacheMode buildDefaultSharedCacheMode() { - return SharedCacheMode.DISABLE_SELECTIVE; - } - - @Override - public boolean calculateDefaultCacheable() { - SharedCacheMode sharedCacheMode = this.getSharedCacheMode(); - if (sharedCacheMode == null) { - return true; - } - switch (sharedCacheMode) { - case NONE: - case ENABLE_SELECTIVE: - return false; - case ALL: - case DISABLE_SELECTIVE: - case UNSPECIFIED: - return true; - } - return true; - } - - - public String getDefaultGetMethod() { - return this.defaultGetMethod; - } - - protected void setDefaultGetMethod(String getMethod) { - String old = this.defaultGetMethod; - this.defaultGetMethod = getMethod; - this.firePropertyChanged(DEFAULT_GET_METHOD_PROPERTY, old, getMethod); - } - - /** - * String constant associated with changes to the persistence unit's - * default get method. - */ - public static final String DEFAULT_GET_METHOD_PROPERTY = "defaultGetMethod"; //$NON-NLS-1$ - - protected String buildDefaultGetMethod(EclipseLinkPersistenceUnitDefaults defaults) { - String getMethod = (defaults == null) ? null : defaults.getGetMethod(); - return (getMethod != null) ? getMethod : null; - } - - public String getDefaultSetMethod() { - return this.defaultSetMethod; - } - - protected void setDefaultSetMethod(String setMethod) { - String old = this.defaultSetMethod; - this.defaultSetMethod = setMethod; - this.firePropertyChanged(DEFAULT_SET_METHOD_PROPERTY, old, setMethod); - } - - /** - * String constant associated with changes to the persistence unit's - * default set method. - */ - public static final String DEFAULT_SET_METHOD_PROPERTY = "defaultSetMethod"; //$NON-NLS-1$ - - protected String buildDefaultSetMethod(EclipseLinkPersistenceUnitDefaults defaults) { - String setMethod = (defaults == null) ? null : defaults.getSetMethod(); - return (setMethod != null) ? setMethod : null; - } - - // ********** validation ********** - - public JpaJpqlQueryHelper createJpqlQueryHelper() { - return new EclipseLinkJpaJpqlQueryHelper(this.getJpaPlatform().getJpqlGrammar()); - } - - @Override - public void validate(List<IMessage> messages, IReporter reporter) { - super.validate(messages, reporter); - this.validateConverters(messages, reporter); - } - - @Override - protected void validateProperties(List<IMessage> messages, IReporter reporter) { - - if(this.isJpa2_0Compatible()) { - for(Property property: this.getLegacyEntityCachingProperties()) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.NORMAL_SEVERITY, - EclipseLinkJpaValidationMessages.PERSISTENCE_UNIT_LEGACY_ENTITY_CACHING, - new String[] {property.getName()}, - this.getPersistenceUnit(), - property.getValidationTextRange() - ) - ); - } - for(Property property: this.getLegacyDescriptorCustomizerProperties()) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.NORMAL_SEVERITY, - EclipseLinkJpaValidationMessages.PERSISTENCE_UNIT_LEGACY_DESCRIPTOR_CUSTOMIZER, - new String[] {property.getName()}, - this.getPersistenceUnit(), - property.getValidationTextRange() - ) - ); - } - this.validateDefaultCachingProperty(this.getCacheTypeDefaultProperty(), messages); - this.validateDefaultCachingProperty(this.getCacheSizeDefaultProperty(), messages); - this.validateDefaultCachingProperty(this.getFlushClearCacheProperty(), messages); - this.validateLoggerProperty(this.getLoggerProperty(), messages); - this.validateExceptionHandlerProperty(this.getExceptionHandlerProperty(), messages); - this.validatePerformanceProfilerProperty(this.getPerformanceProfilerProperty(), messages); - this.validateSessionCustomizerProperty(this.getSessionCustomizerProperties(), messages); - } - } - - protected void validateDefaultCachingProperty(Property cachingProperty, List<IMessage> messages) { - - if(this.getSharedCacheMode() == SharedCacheMode.NONE) { - if(cachingProperty != null) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.NORMAL_SEVERITY, - EclipseLinkJpaValidationMessages.PERSISTENCE_UNIT_CACHING_PROPERTY_IGNORED, - new String[] {cachingProperty.getName()}, - this.getPersistenceUnit(), - cachingProperty.getValidationTextRange() - ) - ); - } - } - } - - protected void validateLoggerProperty(Property loggerProperty, List<IMessage> messages) { - if ((loggerProperty == null) || (loggerProperty.getValue() == null) ) { - return; - } - - if (ArrayTools.contains(Logging.RESERVED_LOGGER_NAMES, loggerProperty.getValue())) { - return; - } - - IJavaProject javaProject = getJpaProject().getJavaProject(); - if (StringTools.stringIsEmpty(loggerProperty.getValue())) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_LOGGER_CLASS_NOT_SPECIFIED, - EMPTY_STRING_ARRAY, - this.getPersistenceUnit(), - loggerProperty.getValidationTextRange() - ) - ); - } else if (JDTTools.findType(javaProject, loggerProperty.getValue()) == null) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_LOGGER_CLASS_NOT_EXIST, - new String[] {loggerProperty.getValue()}, - this.getPersistenceUnit(), - loggerProperty.getValidationTextRange() - ) - ); - } else if (!JDTTools.typeIsSubType( - javaProject, loggerProperty.getValue(), Logging.ECLIPSELINK_LOGGER_CLASS_NAME) - ) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_LOGGER_CLASS_IMPLEMENTS_SESSION_LOG, - new String[] {loggerProperty.getValue()}, - this.getPersistenceUnit(), - loggerProperty.getValidationTextRange() - ) - ); - } - } - - private void validateExceptionHandlerProperty(Property handlerProperty, List<IMessage> messages) { - if ((handlerProperty == null) || (handlerProperty.getValue() == null) ) { - return; - } - - IJavaProject javaProject = getJpaProject().getJavaProject(); - if (StringTools.stringIsEmpty(handlerProperty.getValue())) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.EXCEPTION_HANDLER_CLASS_NOT_SPECIFIED, - EMPTY_STRING_ARRAY, - this.getPersistenceUnit(), - handlerProperty.getValidationTextRange() - ) - ); - } else if (JDTTools.findType(javaProject, handlerProperty.getValue()) == null) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.EXCEPTION_HANDLER_CLASS_NOT_EXIST, - new String[] {handlerProperty.getValue()}, - this.getPersistenceUnit(), - handlerProperty.getValidationTextRange() - ) - ); - } else if (!JDTTools.classHasPublicZeroArgConstructor(javaProject, handlerProperty.getValue())) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.EXCEPTION_HANDLER_CLASS_NOT_VALID, - new String[] {handlerProperty.getValue()}, - this.getPersistenceUnit(), - handlerProperty.getValidationTextRange() - ) - ); - } else if (!JDTTools.typeIsSubType( - javaProject, handlerProperty.getValue(), Customization.ECLIPSELINK_EXCEPTION_HANDLER_CLASS_NAME) - ) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.EXCEPTION_HANDLER_CLASS_IMPLEMENTS_EXCEPTION_HANDLER, - new String[] {handlerProperty.getValue()}, - this.getPersistenceUnit(), - handlerProperty.getValidationTextRange() - ) - ); - } - } - - private void validatePerformanceProfilerProperty(Property profilerProperty, List<IMessage> messages) { - - if ((profilerProperty == null) || (profilerProperty.getValue() == null) ) { - return; - } - - if (ArrayTools.contains(Customization.RESERVED_PROFILER_NAMES, profilerProperty.getValue())) { - return; - } - - IJavaProject javaProject = getJpaProject().getJavaProject(); - if (StringTools.stringIsEmpty(profilerProperty.getValue())) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_PROFILER_CLASS_NOT_SPECIFIED, - EMPTY_STRING_ARRAY, - this.getPersistenceUnit(), - profilerProperty.getValidationTextRange() - ) - ); - } else if (JDTTools.findType(javaProject, profilerProperty.getValue()) == null) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_PROFILER_CLASS_NOT_EXIST, - new String[] {profilerProperty.getValue()}, - this.getPersistenceUnit(), - profilerProperty.getValidationTextRange() - ) - ); - } else if (!JDTTools.classHasPublicZeroArgConstructor(javaProject, profilerProperty.getValue())){ - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_PROFILER_CLASS_NOT_VALID, - new String[] {profilerProperty.getValue()}, - this.getPersistenceUnit(), - profilerProperty.getValidationTextRange() - ) - ); - } else if (!JDTTools.typeIsSubType( - javaProject, profilerProperty.getValue(), Customization.ECLIPSELINK_SESSION_PROFILER_CLASS_NAME) - ) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_PROFILER_CLASS_IMPLEMENTS_SESSIONP_ROFILER, - new String[] {profilerProperty.getValue()}, - this.getPersistenceUnit(), - profilerProperty.getValidationTextRange() - ) - ); - } - } - - private void validateSessionCustomizerProperty( Iterable<Property> properties, List<IMessage> messages) { - for (Property property : properties) { - if (property.getValue() == null) { - return; - } - - IJavaProject javaProject = getJpaProject().getJavaProject(); - if (StringTools.stringIsEmpty(property.getValue())) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_CUSTOMIZER_CLASS_NOT_SPECIFIED, - EMPTY_STRING_ARRAY, - this.getPersistenceUnit(), - property.getValidationTextRange() - ) - ); - } else if (JDTTools.findType(javaProject, property.getValue()) == null) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_CUSTOMIZER_CLASS_NOT_EXIST, - new String[] {property.getValue()}, - this.getPersistenceUnit(), - property.getValidationTextRange() - ) - ); - } else if (!JDTTools.classHasPublicZeroArgConstructor(javaProject, property.getValue())){ - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_CUSTOMIZER_CLASS_NOT_VALID, - new String[] {property.getValue()}, - this.getPersistenceUnit(), - property.getValidationTextRange() - ) - ); - } else if (!JDTTools.typeIsSubType( - javaProject, property.getValue(), Customization.ECLIPSELINK_SESSION_CUSTOMIZER_CLASS_NAME) - ) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.SESSION_CUSTOMIZER_CLASS_IMPLEMENTS_SESSION_CUSTOMIZER, - new String[] {property.getValue()}, - this.getPersistenceUnit(), - property.getValidationTextRange() - ) - ); - } - } - } - - - protected ArrayList<Property> getLegacyDescriptorCustomizerProperties() { - ArrayList<Property> result = new ArrayList<Property>(); - CollectionTools.addAll(result, this.getDescriptorCustomizerProperties()); - return result; - } - - protected ArrayList<Property> getLegacyEntityCachingProperties() { - ArrayList<Property> result = new ArrayList<Property>(); - CollectionTools.addAll(result, this.getSharedCacheProperties()); - CollectionTools.addAll(result, this.getEntityCacheTypeProperties()); - CollectionTools.addAll(result, this.getEntityCacheSizeProperties()); - return result; - } - - private Property getCacheTypeDefaultProperty() { - return this.getProperty(Caching.ECLIPSELINK_CACHE_TYPE_DEFAULT); - } - - private Property getCacheSizeDefaultProperty() { - return this.getProperty(Caching.ECLIPSELINK_CACHE_SIZE_DEFAULT); - } - - private Property getCacheSharedDefaultProperty() { - return this.getProperty(Caching.ECLIPSELINK_CACHE_SHARED_DEFAULT); - } - - private Property getFlushClearCacheProperty() { - return this.getProperty(Caching.ECLIPSELINK_FLUSH_CLEAR_CACHE); - } - - /** - * Returns all Shared Cache Properties, including Entity and default. - */ - private Iterable<Property> getSharedCacheProperties() { - return this.getPropertiesWithNamePrefix(Caching.ECLIPSELINK_SHARED_CACHE); - } - - /** - * Returns Entity Cache Size Properties, excluding default. - */ - private Iterable<Property> getEntityCacheSizeProperties() { - return this.getEntityPropertiesWithPrefix(Caching.ECLIPSELINK_CACHE_SIZE); - } - - /** - * Returns Entity Cache Type Properties, excluding default. - */ - private Iterable<Property> getEntityCacheTypeProperties() { - return this.getEntityPropertiesWithPrefix(Caching.ECLIPSELINK_CACHE_TYPE); - } - - /** - * Returns Descriptor Customizer Properties. - */ - private Iterable<Property> getDescriptorCustomizerProperties() { - return this.getEntityPropertiesWithPrefix(Customization.ECLIPSELINK_DESCRIPTOR_CUSTOMIZER); - } - - /** - * Returns Entity Properties with the given prefix, - * excluding Entity which name equals "default". - */ - private Iterable<Property> getEntityPropertiesWithPrefix(String prefix) { - return new FilteringIterable<Property>(this.getPropertiesWithNamePrefix(prefix)) { - @Override - protected boolean accept(Property next) { - return ! next.getName().endsWith("default"); //$NON-NLS-1$ - } - }; - } - - private Property getLoggerProperty() { - return this.getProperty(Logging.ECLIPSELINK_LOGGER); - } - - private Property getExceptionHandlerProperty() { - return this.getProperty(Customization.ECLIPSELINK_EXCEPTION_HANDLER); - } - - private Property getPerformanceProfilerProperty() { - return this.getProperty(Customization.ECLIPSELINK_PROFILER); - } - - /** - * Returns all Session Customizer Properties. - */ - private Iterable<Property> getSessionCustomizerProperties() { - return this.getPropertiesWithNamePrefix(Customization.ECLIPSELINK_SESSION_CUSTOMIZER); - } - - /** - * <strong>NB:</strong> We validate converters here. - * @see #validateGenerators(List, IReporter) - */ - protected void validateConverters(List<IMessage> messages, IReporter reporter) { - this.checkForDuplicateConverters(messages); - for (EclipseLinkConverter converter : this.getConverters()) { - this.validate(converter, messages, reporter); - } - } - - protected void checkForDuplicateConverters(List<IMessage> messages) { - HashMap<String, ArrayList<EclipseLinkConverter>> convertersByName = this.mapByName(this.getConverters()); - for (Map.Entry<String, ArrayList<EclipseLinkConverter>> entry : convertersByName.entrySet()) { - String converterName = entry.getKey(); - if (StringTools.stringIsNotEmpty(converterName)) { // ignore empty names - ArrayList<EclipseLinkConverter> dups = entry.getValue(); - if (dups.size() > 1) { - // if duplicate name exists, check the types of the converters with the duplicate name - HashMap<Class<? extends JpaNamedContextNode>, ArrayList<EclipseLinkConverter>> convertersByType = this.mapByType(dups); - // if more than one types of converters have the same name, - // report duplicate error on every converter in the list; - if (convertersByType.size() > 1) { - String[] parms = new String[] {converterName}; - for (EclipseLinkConverter dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.CONVERTER_DUPLICATE_NAME, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } else { - // otherwise if all the converters are with the same type, check every converter - // to see if its definition is not equivalent with any one of the converters in the list; - // if any one of the converters is NOT equivalent, add errors for all of them; otherwise do nothing - if (this.anyNodesAreInequivalent(dups)) { - String[] parms = new String[] {converterName}; - for (EclipseLinkConverter dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.CONVERTER_DUPLICATE_NAME, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } - } - } - } - } - } - - /** - * Return whether all the specified nodes are "equivalent" - * (i.e. they all have the same state). - */ - protected boolean allNodesAreEquivalent(ArrayList<? extends JpaNamedContextNode> nodes) { - return ! this.anyNodesAreInequivalent(nodes); - } - - protected boolean anyNodesAreInequivalent(ArrayList<? extends JpaNamedContextNode> nodes) { - if (nodes.size() < 2) { - throw new IllegalArgumentException(); - } - Iterator<? extends JpaNamedContextNode> stream = nodes.iterator(); - JpaNamedContextNode first = stream.next(); - while (stream.hasNext()) { - if ( ! stream.next().isEquivalentTo(first)) { - return true; - } - } - return false; - } - - // TODO bjv isn't it obvious? - protected TextRange extractNameTextRange(EclipseLinkConverter converter) { - return (converter instanceof OrmEclipseLinkConverter<?>) ? - ((OrmEclipseLinkConverter<?>) converter).getNameTextRange() : - ((JavaEclipseLinkConverter<?>) converter).getNameTextRange(null); - } - - // TODO bjv isn't it obvious? - protected void validate(EclipseLinkConverter converter, List<IMessage> messages, IReporter reporter) { - if (converter instanceof OrmEclipseLinkConverter<?>) { - ((OrmEclipseLinkConverter<?>) converter).validate(messages, reporter); - } else { - ((JavaEclipseLinkConverter<?>) converter).validate(messages, reporter, null); - } - } - - @Override - protected void checkForDuplicateGenerators(List<IMessage> messages) { - HashMap<String, ArrayList<Generator>> generatorsByName = this.mapByName(this.getGenerators()); - for (Map.Entry<String, ArrayList<Generator>> entry : generatorsByName.entrySet()) { - String generatorName = entry.getKey(); - if (StringTools.stringIsNotEmpty(generatorName)) { // ignore empty names - ArrayList<Generator> dups = entry.getValue(); - if (dups.size() > 1) { - // if duplicate name exists, check the types of the generators with the duplicate name - HashMap<Class<? extends JpaNamedContextNode>, ArrayList<Generator>> generatorsByType = this.mapByType(dups); - // if more than one types of generators have the same name, - // report duplicate error on every generator in the list; - if (generatorsByType.size() > 1) { - String[] parms = new String[] {generatorName}; - for (Generator dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.GENERATOR_DUPLICATE_NAME, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } else { - // if all the generators are "equivalent", add info messages - if (this.allNodesAreEquivalent(dups)) { - String[] parms = new String[] {generatorName}; - for (Generator dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.LOW_SEVERITY, - EclipseLinkJpaValidationMessages.GENERATOR_EQUIVALENT, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } else { - // otherwise if all the generators are with the same type, check every generator - // to see if its definition is not equivalent with any one of the generators in the list; - // if any one of the generators is NOT equivalent, add errors for all of them; otherwise do nothing - String[] parms = new String[] {generatorName}; - for (Generator dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.GENERATOR_DUPLICATE_NAME, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } - } - } - } - } - } - - @Override - protected void checkForDuplicateQueries(List<IMessage> messages) { - HashMap<String, ArrayList<Query>> queriesByName = this.mapByName(this.getQueries()); - for (Map.Entry<String, ArrayList<Query>> entry : queriesByName.entrySet()) { - String queryName = entry.getKey(); - if (StringTools.stringIsNotEmpty(queryName)) { // ignore empty names - ArrayList<Query> dups = entry.getValue(); - if (dups.size() > 1) { - // if duplicate name exists, check the types of the queries with the duplicate name - HashMap<Class<? extends JpaNamedContextNode>, ArrayList<Query>> querisByType = this.mapByType(dups); - // if more than one types of queries have the same name, - // report duplicate error on every query in the list; - if (querisByType.size() > 1) { - String[] parms = new String[] {queryName}; - for (Query dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.QUERY_DUPLICATE_NAME, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } else { - // if all the queries are "equivalent", add info messages - if (this.allNodesAreEquivalent(dups)) { - String[] parms = new String[] {queryName}; - for (Query dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.LOW_SEVERITY, - EclipseLinkJpaValidationMessages.QUERY_EQUIVALENT, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } else { - // otherwise if all the queries are with the same type, check every query - // to see if its definition is not equivalent with any one of the queries in the list; - // if any one of the queries is NOT equivalent, add errors for all of them; otherwise do nothing - String[] parms = new String[] {queryName}; - for (Query dup : dups) { - messages.add( - DefaultEclipseLinkJpaValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - EclipseLinkJpaValidationMessages.QUERY_DUPLICATE_NAME, - parms, - dup, - this.extractNameTextRange(dup) - ) - ); - } - } - } - } - } - } - } - - protected <N extends JpaNamedContextNode> HashMap<Class<? extends JpaNamedContextNode>, ArrayList<N>> mapByType(Iterable<N> nodes) { - HashMap<Class<? extends JpaNamedContextNode>, ArrayList<N>> map = new HashMap<Class<? extends JpaNamedContextNode>, ArrayList<N>>(); - for (N node : nodes) { - Class<? extends JpaNamedContextNode> type = node.getType(); - ArrayList<N> list = map.get(type); - if (list == null) { - list = new ArrayList<N>(); - map.put(type, list); - } - list.add(node); - } - return map; - } - - // ********** refactoring ********** - - @Override - @SuppressWarnings("unchecked") - protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenameTypeEdits(IType originalType, String newName) { - return new CompositeIterable<ReplaceEdit>( - super.createPersistenceUnitPropertiesRenameTypeEdits(originalType, newName), - this.customization.createRenameTypeEdits(originalType, newName), - this.logging.createRenameTypeEdits(originalType, newName) - ); - } - - @Override - @SuppressWarnings("unchecked") - protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesMoveTypeEdits(IType originalType, IPackageFragment newPackage) { - return new CompositeIterable<ReplaceEdit>( - super.createPersistenceUnitPropertiesMoveTypeEdits(originalType, newPackage), - this.customization.createMoveTypeEdits(originalType, newPackage), - this.logging.createMoveTypeEdits(originalType, newPackage) - ); - } - - @Override - @SuppressWarnings("unchecked") - protected Iterable<ReplaceEdit> createPersistenceUnitPropertiesRenamePackageEdits(IPackageFragment originalPackage, String newName) { - return new CompositeIterable<ReplaceEdit>( - super.createPersistenceUnitPropertiesRenamePackageEdits(originalPackage, newName), - this.customization.createRenamePackageEdits(originalPackage, newName), - this.logging.createRenamePackageEdits(originalPackage, newName) - ); - } - - // ********** metadata conversion ********** - // ***** queries - - /** - * @see #convertJavaQueries(EntityMappings, IProgressMonitor) - */ - @Override - public boolean hasConvertibleJavaQueries() { - return ! this.getEclipseLinkConvertibleJavaQueries().isEmpty(); - } - - /** - * Return whether the persistence unit has any equivalent Java generators. - */ - public boolean hasAnyEquivalentJavaQueries() { - return this.hasAnyEquivalentJavaNodes(this.getAllJavaQueries(), this.getMappingFileQueries()); - } - - /** - * Override the default implementation because EclipseLink allows - * "equivalent" queries. - */ - @Override - public void convertJavaQueries(EntityMappings entityMappings, IProgressMonitor monitor) { - OrmQueryContainer queryContainer = entityMappings.getQueryContainer(); - HashMap<String, ArrayList<JavaQuery>> convertibleJavaQueries = this.getEclipseLinkConvertibleJavaQueries(); - int work = this.calculateCumulativeSize(convertibleJavaQueries.values()); - SubMonitor sm = SubMonitor.convert(monitor, JptCoreMessages.JPA_METADATA_CONVERSION_CONVERTING, work); - for (Map.Entry<String, ArrayList<JavaQuery>> entry : convertibleJavaQueries.entrySet()) { - this.convertJavaQueriesWithSameName(queryContainer, entry, sm.newChild(entry.getValue().size())); - } - sm.setTaskName(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_COMPLETE); - } - - protected void convertJavaQueriesWithSameName(OrmQueryContainer queryContainer, Map.Entry<String, ArrayList<JavaQuery>> entry, SubMonitor monitor) { - if (monitor.isCanceled()) { - throw new OperationCanceledException(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_CANCELED); - } - monitor.setTaskName(NLS.bind(JptCoreMessages.JPA_METADATA_CONVERSION_CONVERT_QUERY, entry.getKey())); - - ArrayList<JavaQuery> javaQueriesWithSameName = entry.getValue(); - JavaQuery first = javaQueriesWithSameName.get(0); - first.convertTo(queryContainer); - first.delete(); // delete any converted queries - monitor.worked(1); - - for (int i = 1; i < javaQueriesWithSameName.size(); i++) { // NB: start with 1! - javaQueriesWithSameName.get(i).delete(); - monitor.worked(1); - } - } - - /** - * @see #extractEclipseLinkConvertibleJavaNodes(Iterable, Iterable) - */ - protected HashMap<String, ArrayList<JavaQuery>> getEclipseLinkConvertibleJavaQueries() { - return this.extractEclipseLinkConvertibleJavaNodes(this.getAllJavaQueries(), this.getMappingFileQueries()); - } - - // ***** generators - - /** - * @see #convertJavaGenerators(EntityMappings, IProgressMonitor) - */ - @Override - public boolean hasConvertibleJavaGenerators() { - return ! this.getEclipseLinkConvertibleJavaGenerators().isEmpty(); - } - - /** - * Return whether the persistence unit has any equivalent Java generators. - */ - public boolean hasAnyEquivalentJavaGenerators() { - return this.hasAnyEquivalentJavaNodes(this.getAllJavaGenerators(), this.getMappingFileGenerators()); - } - - /** - * Override the default implementation because EclipseLink allows - * "equivalent" generators. - */ - @Override - public void convertJavaGenerators(EntityMappings entityMappings, IProgressMonitor monitor) { - HashMap<String, ArrayList<JavaGenerator>> convertibleJavaGenerators = this.getEclipseLinkConvertibleJavaGenerators(); - int work = this.calculateCumulativeSize(convertibleJavaGenerators.values()); - SubMonitor sm = SubMonitor.convert(monitor, JptCoreMessages.JPA_METADATA_CONVERSION_CONVERTING, work); - for (Map.Entry<String, ArrayList<JavaGenerator>> entry : convertibleJavaGenerators.entrySet()) { - this.convertJavaGeneratorsWithSameName(entityMappings, entry, sm.newChild(entry.getValue().size())); - } - sm.setTaskName(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_COMPLETE); - } - - protected void convertJavaGeneratorsWithSameName(EntityMappings entityMappings, Map.Entry<String, ArrayList<JavaGenerator>> entry, SubMonitor monitor) { - if (monitor.isCanceled()) { - throw new OperationCanceledException(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_CANCELED); - } - monitor.setTaskName(NLS.bind(JptCoreMessages.JPA_METADATA_CONVERSION_CONVERT_GENERATOR, entry.getKey())); - - ArrayList<JavaGenerator> javaGeneratorsWithSameName = entry.getValue(); - JavaGenerator first = javaGeneratorsWithSameName.get(0); - first.convertTo(entityMappings); - first.delete(); // delete any converted generators - monitor.worked(1); - - for (int i = 1; i < javaGeneratorsWithSameName.size(); i++) { // NB: start with 1! - javaGeneratorsWithSameName.get(i).delete(); - monitor.worked(1); - } - } - - /** - * @see #extractEclipseLinkConvertibleJavaNodes(Iterable, Iterable) - */ - protected HashMap<String, ArrayList<JavaGenerator>> getEclipseLinkConvertibleJavaGenerators() { - return this.extractEclipseLinkConvertibleJavaNodes(this.getAllJavaGenerators(), this.getMappingFileGenerators()); - } - - // ***** converters - - /** - * @see #convertJavaConverters(EclipseLinkEntityMappings, IProgressMonitor) - */ - public boolean hasConvertibleJavaConverters() { - return ! this.getEclipseLinkConvertibleJavaConverters().isEmpty(); - } - - /** - * Return whether the persistence unit has any equivalent Java generators. - */ - public boolean hasAnyEquivalentJavaConverters() { - return this.hasAnyEquivalentJavaNodes(this.getAllJavaConverters(), this.getMappingFileConverters()); - } - - /** - * Override the default implementation because EclipseLink allows - * "equivalent" converters. - */ - public void convertJavaConverters(EclipseLinkEntityMappings entityMappings, IProgressMonitor monitor) { - OrmEclipseLinkConverterContainer ormConverterContainer = entityMappings.getConverterContainer(); - HashMap<String, ArrayList<JavaEclipseLinkConverter<?>>> convertibleJavaConverters = this.getEclipseLinkConvertibleJavaConverters(); - int work = this.calculateCumulativeSize(convertibleJavaConverters.values()); - SubMonitor sm = SubMonitor.convert(monitor, JptCoreMessages.JPA_METADATA_CONVERSION_CONVERTING, work); - for (Map.Entry<String, ArrayList<JavaEclipseLinkConverter<?>>> entry : convertibleJavaConverters.entrySet()) { - this.convertJavaConvertersWithSameName(ormConverterContainer, entry, sm.newChild(entry.getValue().size())); - } - sm.setTaskName(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_COMPLETE); - } - - protected void convertJavaConvertersWithSameName(OrmEclipseLinkConverterContainer ormConverterContainer, Map.Entry<String, ArrayList<JavaEclipseLinkConverter<?>>> entry, SubMonitor monitor) { - if (monitor.isCanceled()) { - throw new OperationCanceledException(JptCoreMessages.JPA_METADATA_CONVERSION_OPERATION_CANCELED); - } - monitor.setTaskName(NLS.bind(JptJpaEclipseLinkCoreMessages.JPA_METADATA_CONVERSION_CONVERT_CONVERTER, entry.getKey())); - - ArrayList<JavaEclipseLinkConverter<?>> javaConvertersWithSameName = entry.getValue(); - JavaEclipseLinkConverter<?> first = javaConvertersWithSameName.get(0); - first.convertTo(ormConverterContainer); - first.delete(); // delete any converted generators - monitor.worked(1); - - for (int i = 1; i < javaConvertersWithSameName.size(); i++) { // NB: start with 1! - javaConvertersWithSameName.get(i).delete(); - monitor.worked(1); - } - } - - /** - * @see #extractEclipseLinkConvertibleJavaNodes(Iterable, Iterable) - */ - protected HashMap<String, ArrayList<JavaEclipseLinkConverter<?>>> getEclipseLinkConvertibleJavaConverters() { - return this.extractEclipseLinkConvertibleJavaNodes(this.getAllJavaConverters(), this.getMappingFileConverters()); - } - - protected int calculateCumulativeSize(Collection<? extends Collection<?>> collections) { - int cumulativeSize = 0; - for (Collection<?> collection : collections) { - cumulativeSize += collection.size(); - } - return cumulativeSize; - } - - protected <N extends JpaNamedContextNode> boolean hasAnyEquivalentJavaNodes(Iterable<N> allJavaNodes, Iterable<? extends JpaNamedContextNode> mappingFileNodes) { - HashMap<String, ArrayList<N>> convertibleJavaNodes = this.extractEclipseLinkConvertibleJavaNodes(allJavaNodes, mappingFileNodes); - for (Map.Entry<String, ArrayList<N>> entry : convertibleJavaNodes.entrySet()) { - if (entry.getValue().size() > 1) { - return true; - } - } - return false; - } - - /** - * Return the Java nodes that are neither overridden nor duplicated - * (by default any Java nodes with the same name are "duplicates"); - * but, in EclipseLink we return any "equivalent" nodes also. - */ - protected <N extends JpaNamedContextNode> HashMap<String, ArrayList<N>> extractEclipseLinkConvertibleJavaNodes(Iterable<N> allJavaNodes, Iterable<? extends JpaNamedContextNode> mappingFileNodes) { - HashMap<String, ArrayList<N>> convertibleNodes = new HashMap<String, ArrayList<N>>(); - - HashSet<String> mappingFileNodeNames = this.convertToNames(CollectionTools.list(mappingFileNodes)); - HashMap<String, ArrayList<N>> allJavaNodesByName = this.mapByName(allJavaNodes); - for (Map.Entry<String, ArrayList<N>> entry : allJavaNodesByName.entrySet()) { - String javaNodeName = entry.getKey(); - if (StringTools.stringIsEmpty(javaNodeName)) { - continue; // ignore any nodes with an empty name(?) - } - if (mappingFileNodeNames.contains(javaNodeName)) { - continue; // ignore any Java nodes overridden in the mapping file - } - ArrayList<N> javaNodesWithSameName = entry.getValue(); - if ((javaNodesWithSameName.size() == 1) || this.allNodesAreEquivalent(javaNodesWithSameName)) { - convertibleNodes.put(javaNodeName, javaNodesWithSameName); - } else { - // ignore multiple Java nodes with the same name but that are not all "equivalent" - } - } - - return convertibleNodes; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceXmlContextNodeFactory.java deleted file mode 100644 index 8a21402ae9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceXmlContextNodeFactory.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory; - -public interface EclipseLinkPersistenceXmlContextNodeFactory extends PersistenceXmlContextNodeFactory -{ - - PersistenceUnitProperties buildLogging(PersistenceUnit parent); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/ExclusiveConnectionMode.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/ExclusiveConnectionMode.java deleted file mode 100644 index b8ffe28226..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/ExclusiveConnectionMode.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2010, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * ExclusiveConnectionMode - */ -public enum ExclusiveConnectionMode implements PersistenceXmlEnumValue { - always("Always"), //$NON-NLS-1$ - isolated("Isolated"), //$NON-NLS-1$ - transactional("Transactional"); //$NON-NLS-1$ - - private final String propertyValue; - - ExclusiveConnectionMode(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/FlushClearCache.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/FlushClearCache.java deleted file mode 100644 index ac5a0dc7b4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/FlushClearCache.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * FlushClearCache - */ -public enum FlushClearCache implements PersistenceXmlEnumValue { - drop("Drop"), //$NON-NLS-1$ - drop_invalidate("DropInvalidate"), //$NON-NLS-1$ - merge("Merge"); //$NON-NLS-1$ - - private final String propertyValue; - - FlushClearCache(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/GeneralProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/GeneralProperties.java deleted file mode 100644 index c1516a7e99..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/GeneralProperties.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2011 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * GeneralProperties - */ -public interface GeneralProperties extends PersistenceUnitProperties -{ - - Boolean getDefaultExcludeEclipselinkOrm(); - Boolean getExcludeEclipselinkOrm(); - void setExcludeEclipselinkOrm(Boolean newExcludeEclipselinkOrm); - static final String EXCLUDE_ECLIPSELINK_ORM_PROPERTY = "excludeEclipselinkOrm"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_EXCLUDE_ECLIPSELINK_ORM = "eclipselink.exclude-eclipselink-orm"; //$NON-NLS-1$ - static final Boolean DEFAULT_EXCLUDE_ECLIPSELINK_ORM = Boolean.FALSE; - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logger.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logger.java deleted file mode 100644 index 76fc836c0b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logger.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * Logger - */ -public enum Logger implements PersistenceXmlEnumValue { - default_logger("DefaultLogger", "org.eclipse.persistence.logging.DefaultSessionLog"), //$NON-NLS-1$ //$NON-NLS-2$ - java_logger("JavaLogger", "org.eclipse.persistence.logging.JavaLog"), //$NON-NLS-1$ //$NON-NLS-2$ - server_logger("ServerLogger", "org.eclipse.persistence.platform.server.ServerLog"); //$NON-NLS-1$ //$NON-NLS-2$ - - private final String propertyValue; - - private final String className; - - Logger(String propertyValue, String className) { - this.propertyValue = propertyValue; - this.className = className; - } - - public String getPropertyValue() { - return this.propertyValue; - } - - public String getClassName() { - return this.className; - } - - /** - * Return the Logger value corresponding to the given literal. - */ - public static Logger getLoggerFor(String literal) { - - for( Logger logger : Logger.values()) { - if(logger.toString().equals(literal)) { - return logger; - } - } - return null; - } - - public static String getLoggerClassName(String loggerValue) { - for (Logger logger : values()) { - if (logger.getPropertyValue() == loggerValue) { - return logger.getClassName(); - } - } - return loggerValue; - } -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logging.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logging.java deleted file mode 100644 index 3234f31d4c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logging.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * Logging - */ -public interface Logging extends PersistenceUnitProperties -{ - LoggingLevel getDefaultLevel(); - LoggingLevel getLevel(); - void setLevel(LoggingLevel level); - static final String LEVEL_PROPERTY = "level"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_LEVEL = "eclipselink.logging.level"; //$NON-NLS-1$ - static final LoggingLevel DEFAULT_LEVEL = LoggingLevel.info; - - Boolean getDefaultTimestamp(); - Boolean getTimestamp(); - void setTimestamp(Boolean timestamp); - static final String TIMESTAMP_PROPERTY = "timestamp"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_TIMESTAMP = "eclipselink.logging.timestamp"; //$NON-NLS-1$ - static final Boolean DEFAULT_TIMESTAMP = Boolean.TRUE; - - Boolean getDefaultThread(); - Boolean getThread(); - void setThread(Boolean thread); - static final String THREAD_PROPERTY = "thread"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_THREAD = "eclipselink.logging.thread"; //$NON-NLS-1$ - static final Boolean DEFAULT_THREAD = Boolean.TRUE; - - Boolean getDefaultSession(); - Boolean getSession(); - void setSession(Boolean session); - static final String SESSION_PROPERTY = "session"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SESSION = "eclipselink.logging.session"; //$NON-NLS-1$ - static final Boolean DEFAULT_SESSION = Boolean.TRUE; - - Boolean getDefaultExceptions(); - Boolean getExceptions(); - void setExceptions(Boolean exceptions); - static final String EXCEPTIONS_PROPERTY = "exceptions"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_EXCEPTIONS = "eclipselink.logging.exceptions"; //$NON-NLS-1$ - static final Boolean DEFAULT_EXCEPTIONS = Boolean.FALSE; - - String getDefaultLogFileLocation(); - String getLogFileLocation(); - void setLogFileLocation(String newLogFileLocation); - static final String LOG_FILE_LOCATION_PROPERTY = "logFileLocation"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_LOG_FILE_LOCATION = "eclipselink.logging.file"; //$NON-NLS-1$ - static final String DEFAULT_LOG_FILE_LOCATION = null; // No Default - - String getDefaultLogger(); - String getLogger(); - void setLogger(String newLogger); - void setLogger(Logger newLogger); - static final String LOGGER_PROPERTY = "logger"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_LOGGER = "eclipselink.logging.logger"; //$NON-NLS-1$ - static final String DEFAULT_LOGGER = Logger.default_logger.getPropertyValue(); - static final String[] RESERVED_LOGGER_NAMES = {Logger.default_logger.getPropertyValue(), Logger.java_logger.getPropertyValue(), Logger.server_logger.getPropertyValue()}; - String ECLIPSELINK_LOGGER_CLASS_NAME = "org.eclipse.persistence.logging.SessionLog"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logging2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logging2_0.java deleted file mode 100644 index e273a09f9c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Logging2_0.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009, 2011 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -/** - * Logging2_0 - */ -public interface Logging2_0 extends Logging -{ - public static final String CATEGORY_PREFIX_ = "eclipselink.logging.level."; //$NON-NLS-1$ - - Boolean getDefaultConnection(); - Boolean getConnection(); - void setConnection(Boolean connection); - static final String CONNECTION_PROPERTY = "connection"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CONNECTION = "eclipselink.logging.connection"; //$NON-NLS-1$ - static final Boolean DEFAULT_CONNECTION = Boolean.TRUE; - - LoggingLevel getCategoriesDefaultLevel(); - LoggingLevel getLevel(String category); - void setLevel(String category, LoggingLevel level); - void setDefaultLevel(LoggingLevel level); - static final String CATEGORIES_DEFAULT_LOGGING_PROPERTY = "categoriesDefaultLoggingLevel"; //$NON-NLS-1$ - - static final String SQL_CATEGORY_LOGGING_PROPERTY = "sqlLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_SQL_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "sql"; //$NON-NLS-1$ - - static final String TRANSACTION_CATEGORY_LOGGING_PROPERTY = "transactionLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_TRANSACTION_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "transaction"; //$NON-NLS-1$ - - static final String EVENT_CATEGORY_LOGGING_PROPERTY = "eventLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_EVENT_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "event"; //$NON-NLS-1$ - - static final String CONNECTION_CATEGORY_LOGGING_PROPERTY = "connectionLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_CONNECTION_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "connection"; //$NON-NLS-1$ - - static final String QUERY_CATEGORY_LOGGING_PROPERTY = "queryLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_QUERY_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "query"; //$NON-NLS-1$ - - static final String CACHE_CATEGORY_LOGGING_PROPERTY = "cacheLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_CACHE_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "cache"; //$NON-NLS-1$ - - static final String PROPAGATION_CATEGORY_LOGGING_PROPERTY = "propagationLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_PROPAGATION_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "propagation"; //$NON-NLS-1$ - - static final String SEQUENCING_CATEGORY_LOGGING_PROPERTY = "sequencingLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_SEQUENCING_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "sequencing"; //$NON-NLS-1$ - - static final String EJB_CATEGORY_LOGGING_PROPERTY = "ejbLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_EJB_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "ejb"; //$NON-NLS-1$ - - static final String DMS_CATEGORY_LOGGING_PROPERTY = "dmsLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_DMS_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "dms"; //$NON-NLS-1$ - - static final String EJB_OR_METADATA_CATEGORY_LOGGING_PROPERTY = "ejb_or_metadataLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_EJB_OR_METADATA_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "ejb_or_metadata"; //$NON-NLS-1$ - - static final String METAMODEL_CATEGORY_LOGGING_PROPERTY = "jpa_metamodelLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_METAMODEL_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "jpa_metamodel"; //$NON-NLS-1$ - - static final String WEAVER_CATEGORY_LOGGING_PROPERTY = "weaverLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_WEAVER_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "weaver"; //$NON-NLS-1$ - - static final String PROPERTIES_CATEGORY_LOGGING_PROPERTY = "propertiesLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_PROPERTIES_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "properties"; //$NON-NLS-1$ - - static final String SERVER_CATEGORY_LOGGING_PROPERTY = "serverLoggingLevel"; //$NON-NLS-1$ - static final String ECLIPSELINK_SERVER_CATEGORY_LOGGING_LEVEL = CATEGORY_PREFIX_ + "server"; //$NON-NLS-1$ - -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/LoggingLevel.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/LoggingLevel.java deleted file mode 100644 index b0028f1826..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/LoggingLevel.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * LoggingLevel - */ -public enum LoggingLevel implements PersistenceXmlEnumValue { - off("OFF"), //$NON-NLS-1$ - severe("SEVERE"), //$NON-NLS-1$ - warning("WARNING"), //$NON-NLS-1$ - info("INFO"), //$NON-NLS-1$ - config("CONFIG"), //$NON-NLS-1$ - fine("FINE"), //$NON-NLS-1$ - finer("FINER"), //$NON-NLS-1$ - finest("FINEST"), //$NON-NLS-1$ - all("ALL"); //$NON-NLS-1$ - - /** - * EclipseLink property value - */ - private final String propertyValue; - - LoggingLevel(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Options.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Options.java deleted file mode 100644 index 1d0acdc2ec..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Options.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * Session Options - */ -public interface Options extends PersistenceUnitProperties -{ - String getDefaultSessionName(); - String getSessionName(); - void setSessionName(String newSessionName); - static final String SESSION_NAME_PROPERTY = "sessionName"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SESSION_NAME = "eclipselink.session-name"; //$NON-NLS-1$ - static final String DEFAULT_SESSION_NAME = ""; // no default //$NON-NLS-1$ - - String getDefaultSessionsXml(); - String getSessionsXml(); - void setSessionsXml(String newSessionsXml); - static final String SESSIONS_XML_PROPERTY = "sessionsXml"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SESSIONS_XML = "eclipselink.sessions-xml"; //$NON-NLS-1$ - static final String DEFAULT_SESSIONS_XML = ""; // no default //$NON-NLS-1$ - - Boolean getDefaultIncludeDescriptorQueries(); - Boolean getIncludeDescriptorQueries(); - void setIncludeDescriptorQueries(Boolean newIncludeDescriptorQueries); - static final String SESSION_INCLUDE_DESCRIPTOR_QUERIES_PROPERTY = "includeDescriptorQueriesy"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SESSION_INCLUDE_DESCRIPTOR_QUERIES = "eclipselink.session.include.descriptor.queries"; //$NON-NLS-1$ - static final Boolean DEFAULT_SESSION_INCLUDE_DESCRIPTOR_QUERIES = Boolean.TRUE; - - String getDefaultTargetDatabase(); - String getTargetDatabase(); - void setTargetDatabase(String newTargetDatabase); - void setTargetDatabase(TargetDatabase newTargetDatabase); - static final String TARGET_DATABASE_PROPERTY = "targetDatabase"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_TARGET_DATABASE = "eclipselink.target-database"; //$NON-NLS-1$ - static final String DEFAULT_TARGET_DATABASE = TargetDatabase.auto.getPropertyValue(); - - String getDefaultTargetServer(); - String getTargetServer(); - void setTargetServer(String newTargetServer); - void setTargetServer(TargetServer newTargetServer); - static final String TARGET_SERVER_PROPERTY = "targetServer"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_TARGET_SERVER = "eclipselink.target-server"; //$NON-NLS-1$ - static final String DEFAULT_TARGET_SERVER = TargetServer.none.getPropertyValue(); - - String getDefaultEventListener(); - String getEventListener(); - void setEventListener(String newEventListener); - static final String SESSION_EVENT_LISTENER_PROPERTY = "eventListener"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_SESSION_EVENT_LISTENER = "eclipselink.session-event-listener"; //$NON-NLS-1$ - static final String DEFAULT_SESSION_EVENT_LISTENER = null; // no default - String ECLIPSELINK_EVENT_LISTENER_CLASS_NAME = "org.eclipse.persistence.sessions.SessionEventListener"; //$NON-NLS-1$ - - Boolean getDefaultTemporalMutable(); - Boolean getTemporalMutable(); - void setTemporalMutable(Boolean temporalMutable); - static final String TEMPORAL_MUTABLE_PROPERTY = "temporalMutable"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_TEMPORAL_MUTABLE = "eclipselink.temporal.mutable"; //$NON-NLS-1$ - static final Boolean DEFAULT_TEMPORAL_MUTABLE = Boolean.FALSE; - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Options2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Options2_0.java deleted file mode 100644 index 62fd2abb1c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Options2_0.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2009, 2011 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.jpa2.context.persistence.options.JpaOptions2_0; - -/** - * Options2_0 - */ -public interface Options2_0 extends Options, JpaOptions2_0 -{ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/OutputMode.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/OutputMode.java deleted file mode 100644 index 643d15b945..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/OutputMode.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * OutputMode - */ -public enum OutputMode implements PersistenceXmlEnumValue { - both("both"), //$NON-NLS-1$ - database("database"), //$NON-NLS-1$ - sql_script("sql-script"); //$NON-NLS-1$ - - private final String propertyValue; - - OutputMode(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Profiler.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Profiler.java deleted file mode 100644 index f1b943cc77..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Profiler.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * Profiler - */ -public enum Profiler implements PersistenceXmlEnumValue { - - performance_profiler("PerformanceProfiler", "org.eclipse.persistence.tools.profiler.PerformanceProfiler"), //$NON-NLS-1$ //$NON-NLS-2$ - query_monitor("QueryMonitor", "org.eclipse.persistence.tools.profiler.QueryMonitor"), //$NON-NLS-1$ //$NON-NLS-2$ - no_profiler("NoProfiler", null); //$NON-NLS-1$ - - /** - * EclipseLink property value - */ - private final String propertyValue; - - /** - * EclipseLink profiler class name - */ - private final String className; - - Profiler(String propertyValue, String className) { - this.propertyValue = propertyValue; - this.className = className; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } - - public String getClassName() { - return this.className; - } - - public static Profiler fromPropertyValue(String propertyValue) { - for (Profiler profiler : Profiler.values()) { - if (profiler.getPropertyValue().equals(propertyValue)) { - return profiler; - } - } - return null; - } - - /** - * Return the Profiler value corresponding to the given literal. - */ - public static Profiler getProfilerFor(String literal) { - for( Profiler profiler : Profiler.values()) { - if(profiler.toString().equals(literal)) { - return profiler; - } - } - return null; - } - - public static String getProfilerClassName(String profilerValue) { - return fromPropertyValue(profilerValue).getClassName(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/SchemaGeneration.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/SchemaGeneration.java deleted file mode 100644 index 5c26a32986..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/SchemaGeneration.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2011 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnitProperties; - -/** - * SchemaGeneration - */ -public interface SchemaGeneration extends PersistenceUnitProperties -{ - DdlGenerationType getDefaultDdlGenerationType(); - DdlGenerationType getDdlGenerationType(); - void setDdlGenerationType(DdlGenerationType ddlGenerationType); - static final String DDL_GENERATION_TYPE_PROPERTY = "ddlGenerationType"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_DDL_GENERATION_TYPE = "eclipselink.ddl-generation"; //$NON-NLS-1$ - static final DdlGenerationType DEFAULT_SCHEMA_GENERATION_DDL_GENERATION_TYPE = DdlGenerationType.none; - - OutputMode getDefaultOutputMode(); - OutputMode getOutputMode(); - void setOutputMode(OutputMode outputMode); // put - static final String OUTPUT_MODE_PROPERTY = "outputMode"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_DDL_GENERATION_OUTPUT_MODE = "eclipselink.ddl-generation.output-mode"; //$NON-NLS-1$ - static final OutputMode DEFAULT_SCHEMA_GENERATION_OUTPUT_MODE = null; // No Default - - String getDefaultCreateFileName(); - String getCreateFileName(); - void setCreateFileName(String createFileName); - static final String CREATE_FILE_NAME_PROPERTY = "createFileName"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_CREATE_FILE_NAME = "eclipselink.create-ddl-jdbc-file-name"; //$NON-NLS-1$ - static final String DEFAULT_SCHEMA_GENERATION_CREATE_FILE_NAME = "createDDL.sql"; //$NON-NLS-1$ - - String getDefaultDropFileName(); - String getDropFileName(); - void setDropFileName(String dropFileName); - static final String DROP_FILE_NAME_PROPERTY = "dropFileName"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_DROP_FILE_NAME = "eclipselink.drop-ddl-jdbc-file-name"; //$NON-NLS-1$ - static final String DEFAULT_SCHEMA_GENERATION_DROP_FILE_NAME = "dropDDL.sql"; //$NON-NLS-1$ - - String getDefaultApplicationLocation(); - String getApplicationLocation(); - void setApplicationLocation(String applicationLocation); - static final String APPLICATION_LOCATION_PROPERTY = "applicationLocation"; //$NON-NLS-1$ - // EclipseLink key string - static final String ECLIPSELINK_APPLICATION_LOCATION = "eclipselink.application-location"; //$NON-NLS-1$ - static final String DEFAULT_SCHEMA_GENERATION_APPLICATION_LOCATION = null; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/TargetDatabase.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/TargetDatabase.java deleted file mode 100644 index 8954795652..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/TargetDatabase.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * TargetDatabase - */ -public enum TargetDatabase implements PersistenceXmlEnumValue { - attunity("Attunity"), //$NON-NLS-1$ - auto("Auto"), //$NON-NLS-1$ - cloudscape("Cloudscape"), //$NON-NLS-1$ - database("Database"), //$NON-NLS-1$ - db2("DB2"), //$NON-NLS-1$ - db2mainframe("DB2Mainframe"), //$NON-NLS-1$ - dbase("DBase"), //$NON-NLS-1$ - derby("Derby"), //$NON-NLS-1$ - hsql("HSQL"), //$NON-NLS-1$ - informix("Informix"), //$NON-NLS-1$ - javadb("JavaDB"), //$NON-NLS-1$ - maxdb("MaxDB"), //$NON-NLS-1$ - mysql("MySQL"), //$NON-NLS-1$ - oracle("Oracle"), //$NON-NLS-1$ - oracle11("Oracle11"), //$NON-NLS-1$ - oracle10("Oracle10g"), //$NON-NLS-1$ - oracle9("Oracle9i"), //$NON-NLS-1$ - oracle8("Oracle8i"), //$NON-NLS-1$ - pointbase("PointBase"), //$NON-NLS-1$ - postgresql("PostgreSQL"), //$NON-NLS-1$ - sqlanywhere("SQLAnywhere"), //$NON-NLS-1$ - sqlserver("SQLServer"), //$NON-NLS-1$ - sybase("Sybase"), //$NON-NLS-1$ - symfoware("Symfoware"), //$NON-NLS-1$ - timesten("TimesTen"); //$NON-NLS-1$ - - private final String propertyValue; - - TargetDatabase(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } - - /** - * Return the TargetDatabase value corresponding to the given literal. - */ - public static TargetDatabase getTargetDatabaseFor(String literal) { - for (TargetDatabase targetDatabase : TargetDatabase.values()) { - if (targetDatabase.toString().equals(literal)) { - return targetDatabase; - } - } - return null; - } - - public static boolean isOracleDatabase(String literal) { - return literal.contains("Oracle"); //$NON-NLS-1$ - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/TargetServer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/TargetServer.java deleted file mode 100644 index 57bd246528..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/TargetServer.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * TargetServer - */ -public enum TargetServer implements PersistenceXmlEnumValue { - none("None"), //$NON-NLS-1$ - oc4j("OC4J"), //$NON-NLS-1$ - sunas9("SunAS9"), //$NON-NLS-1$ - websphere("WebSphere"), //$NON-NLS-1$ - websphere_6_1("WebSphere_6_1"), //$NON-NLS-1$ - websphere_7("WebSphere_7"), //$NON-NLS-1$ - weblogic("WebLogic"), //$NON-NLS-1$ - weblogic_9("WebLogic_9"), //$NON-NLS-1$ - weblogic_10("WebLogic_10"), //$NON-NLS-1$ - jboss("JBoss"), //$NON-NLS-1$ - netweaver_7_1("NetWeaver_7_1"); //$NON-NLS-1$ - - private final String propertyValue; - - TargetServer(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } - - /** - * Return the TargetServer value corresponding to the given literal. - */ - public static TargetServer getTargetServerFor(String literal) { - for (TargetServer targetServer : TargetServer.values()) { - if (targetServer.toString().equals(literal)) { - return targetServer; - } - } - return null; - } -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Weaving.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Weaving.java deleted file mode 100644 index 76f9a32b9d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/Weaving.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2008, 2012 Oracle. All rights reserved. -* This program and the accompanying materials are made available under the -* terms of the Eclipse Public License v1.0, which accompanies this distribution -* and is available at http://www.eclipse.org/legal/epl-v10.html. -* -* Contributors: -* Oracle - initial API and implementation -*******************************************************************************/ -package org.eclipse.jpt.jpa.eclipselink.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlEnumValue; - -/** - * Weaving - */ -public enum Weaving implements PersistenceXmlEnumValue { - true_("true"), //$NON-NLS-1$ - false_("false"), //$NON-NLS-1$ - static_("static"); //$NON-NLS-1$ - - - /** - * EclipseLink property value - */ - private final String propertyValue; - - Weaving(String propertyValue) { - this.propertyValue = propertyValue; - } - - /** - * The string used as the property value in the persistence.xml - */ - public String getPropertyValue() { - return this.propertyValue; - } -} |