diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context')
376 files changed, 0 insertions, 19157 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java deleted file mode 100644 index 441e633b01..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessHolder.java +++ /dev/null @@ -1,52 +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.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 2.2 - * @since 2.2 - */ -public interface AccessHolder - extends ReadOnlyAccessHolder -{ - /** - * Return the specified access type; - */ - AccessType getSpecifiedAccess(); - - /** - * Set the specified access type. - */ - void setSpecifiedAccess(AccessType newSpecifiedAccess); - - /** - * String constant associated with changes to the specified access type - */ - String SPECIFIED_ACCESS_PROPERTY = "specifiedAccess"; //$NON-NLS-1$ - - /** - * Return the default access type, never null - */ - AccessType getDefaultAccess(); - - /** - * String constant associated with changes to the default access type - */ - String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java deleted file mode 100644 index 29ea8a482d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AccessType.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Context model corresponding to:<ul> - * <li>the XML resource model - * {@link org.eclipse.jpt.jpa.core.resource.orm.AccessType}, - * 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 2.2 - * @since 2.0 - */ -public enum AccessType { - - FIELD( - org.eclipse.jpt.jpa.core.resource.java.AccessType.FIELD, - org.eclipse.jpt.jpa.core.resource.orm.AccessType.FIELD - ), - PROPERTY( - org.eclipse.jpt.jpa.core.resource.java.AccessType.PROPERTY, - org.eclipse.jpt.jpa.core.resource.orm.AccessType.PROPERTY - ); - - - private org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType; - private org.eclipse.jpt.jpa.core.resource.orm.AccessType ormAccessType; - - AccessType(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType, org.eclipse.jpt.jpa.core.resource.orm.AccessType ormAccessType) { - if (javaAccessType == null) { - throw new NullPointerException(); - } - if (ormAccessType == null) { - throw new NullPointerException(); - } - this.javaAccessType = javaAccessType; - this.ormAccessType = ormAccessType; - } - - public org.eclipse.jpt.jpa.core.resource.java.AccessType getJavaAccessType() { - return this.javaAccessType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.AccessType getOrmAccessType() { - return this.ormAccessType; - } - - - // ********** static methods ********** - - public static AccessType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType) { - return (javaAccessType == null) ? null : fromJavaResourceModel_(javaAccessType); - } - - private static AccessType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.AccessType javaAccessType) { - for (AccessType accessType : AccessType.values()) { - if (accessType.getJavaAccessType() == javaAccessType) { - return accessType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.AccessType toJavaResourceModel(AccessType accessType) { - return (accessType == null) ? null : accessType.getJavaAccessType(); - } - - public static AccessType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.AccessType ormAccessType) { - return (ormAccessType == null) ? null : fromOrmResourceModel_(ormAccessType); - } - - private static AccessType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.AccessType ormAccessType) { - for (AccessType accessType : AccessType.values()) { - if (accessType.getOrmAccessType() == ormAccessType) { - return accessType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.AccessType toOrmResourceModel(AccessType accessType) { - return (accessType == null) ? null : accessType.getOrmAccessType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java deleted file mode 100644 index b171530b47..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverride.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * <em>Specified</em> association override - * <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.0 - */ -public interface AssociationOverride - extends Override_, ReadOnlyAssociationOverride -{ - void initializeFrom(ReadOnlyAssociationOverride oldOverride); - - void initializeFromVirtual(ReadOnlyAssociationOverride virtualOverride); - - // covariant overrides - VirtualAssociationOverride convertToVirtual(); - - OverrideRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java deleted file mode 100644 index 3c14ddb3c5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AssociationOverrideContainer.java +++ /dev/null @@ -1,64 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Association override container. - * Used by entities, embedded mappings, and element collection mappings. - * <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.3 - */ -public interface AssociationOverrideContainer - extends OverrideContainer -{ - /** - * Return the relationship mapping for the specified attribute. - * Return <code>null</code> if it does not exist. This relationship mapping - * will be found in the mapped superclass or embeddable type whose mapping - * is being overridden, not in the owning entity - */ - RelationshipMapping getRelationshipMapping(String attributeName); - - /** - * Return the relationship with the specified attribute name. - */ - ReadOnlyRelationship resolveOverriddenRelationship(String attributeName); - - // covariant overrides - ListIterable<? extends ReadOnlyAssociationOverride> getOverrides(); - ReadOnlyAssociationOverride getOverrideNamed(String name); - ListIterable<? extends AssociationOverride> getSpecifiedOverrides(); - AssociationOverride getSpecifiedOverride(int index); - AssociationOverride getSpecifiedOverrideNamed(String name); - ListIterable<? extends VirtualAssociationOverride> getVirtualOverrides(); - VirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride); - AssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** owner ********** - - interface Owner - extends OverrideContainer.Owner - { - /** - * @see AssociationOverrideContainer#resolveOverriddenRelationship(String) - */ - ReadOnlyRelationship resolveOverriddenRelationship(String attributeName); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java deleted file mode 100644 index e646eda921..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeMapping.java +++ /dev/null @@ -1,158 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA attribute 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.3 - * @since 2.0 - */ -public interface AttributeMapping - extends JpaContextNode -{ - /** - * Return the mapping's attribute (typically its parent node in the - * containment hierarchy). - */ - PersistentAttribute getPersistentAttribute(); - - /** - * Return the mapping's name, which corresponds to the name of the - * associated attribute. - */ - String getName(); - - /** - * Return whether the mapping is its attribute's <em>default</em> mapping - * (as opposed to its <em>specified</em> mapping). - */ - boolean isDefault(); - String DEFAULT_PROPERTY = "default"; //$NON-NLS-1$ - - /** - * Return a unique key for the attribute mapping. If this is defined in - * an extension they should be equal. - */ - String getKey(); - - /** - * Return whether the "attribute" mapping can be overridden. - * The mapping must be a {@link ColumnMapping}. - */ - boolean isOverridableAttributeMapping(); - - /** - * Return whether the "association" mapping can be overridden. - * The mapping must be a {@link RelationshipMapping}. - */ - boolean isOverridableAssociationMapping(); - - /** - * Return the mapping for the type that contains the mapping's attribute. - */ - TypeMapping getTypeMapping(); - - /** - * If the mapping is for a primary key column, return the column's name, - * otherwise return <code>null</code>. - */ - String getPrimaryKeyColumnName(); - - /** - * Return whether this mapping is the owning side of a relationship. - * Either this is a unidirectional mapping or it is the owning side of a - * bidirectional relationship. If bidirectional, the owning side is the - * side that does <em>not</em> specify a "mapped by" attribute name. - * The owning side is the side where the join table is to be specified. - * If this returns <code>true</code> the mapping will be a - * {@link RelationshipMapping}. - */ - boolean isRelationshipOwner(); - - /** - * Return whether the specified mapping manages a relationship with the - * mapping. - */ - boolean isOwnedBy(AttributeMapping mapping); - - /** - * Return whether any database metadata specific validation should occur. - * (For instance, if the connection is not active, then it should not.) - */ - boolean validatesAgainstDatabase(); - - /** - * Return the relationship for the specified attribute. - */ - Relationship resolveOverriddenRelationship(String attributeName); - - - // ********** embedded mappings ********** - - /** - * This is used for "mapped by" choices in a relationship mapping. - * Typically this will just be a single element iterator with the mapping's - * name. - * <p> - * In a JPA 2.0 project, an embedded mapping should return its own name as - * well as the name of its target embeddable's mappings with the embedded - * mapping name prepended, e.g.:<ul> - * <li><code>"embedded"</code> - * <li><code>"embedded.foo"</code> - * <li><code>"embedded.bar"</code> - * </ul> - */ - Iterable<String> getAllMappingNames(); - - /** - * This is used to determine the virtual attribute overrides for an - * embedded mapping or entity. Return the names of all the attributes - * that can be overridden. - * <p> - * In a JPA 2.0 project this will include overridable nested attributes. - * @see #isOverridableAttributeMapping() - */ - Iterable<String> getAllOverridableAttributeMappingNames(); - - /** - * This is used to determine the virtual association overrides for an - * embedded mapping or entity. Return the names of all the associations - * that can be overridden. - * <p> - * In a JPA 2.0 project this will include overridable nested associations. - * @see #isOverridableAssociationMapping() - */ - Iterable<String> getAllOverridableAssociationMappingNames(); - - /** - * Return the mapping itself if its name matches the specified name. - * <p> - * In JPA 2.0 this name could use dot-notation for nested mappings. - * JPA 2.0 embedded mappings will have to parse this name and return the - * appropriate nested mapping. - */ - AttributeMapping resolveAttributeMapping(String name); - - /** - * Return the column of the overridable attribute mapping (or attribute - * override) with the specified attribute name. - * <p> - * In JPA 2.0 this name can use dot-notation to designate nested attributes - * in embedded attribute mapping's embeddable type mapping. - */ - Column resolveOverriddenColumn(String attributeName); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java deleted file mode 100644 index 4ec7c27029..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverride.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * <em>Specified</em> attribute override. - * <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.0 - */ -public interface AttributeOverride - extends Override_, ReadOnlyAttributeOverride -{ - void initializeFrom(ReadOnlyAttributeOverride oldOverride); - - void initializeFromVirtual(ReadOnlyAttributeOverride oldOverride); - - // covariant overrides - VirtualAttributeOverride convertToVirtual(); - - Column getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java deleted file mode 100644 index d45a10d633..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/AttributeOverrideContainer.java +++ /dev/null @@ -1,59 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Attribute override container. - * Used by entities, embedded mappings, and element collection mappings. - * <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 AttributeOverrideContainer - extends OverrideContainer -{ - /** - * Return the column of the mapping or attribute override for the specified - * attribute. Return <code>null</code> if it does not exist. This - * column mapping/attribute override will be found in the mapped superclass - * (or embeddable), not in the owning entity. - */ - ReadOnlyColumn resolveOverriddenColumn(String attributeName); - - // covariant overrides - ListIterable<? extends ReadOnlyAttributeOverride> getOverrides(); - ReadOnlyAttributeOverride getOverrideNamed(String name); - ListIterable<? extends AttributeOverride> getSpecifiedOverrides(); - AttributeOverride getSpecifiedOverride(int index); - AttributeOverride getSpecifiedOverrideNamed(String name); - ListIterable<? extends VirtualAttributeOverride> getVirtualOverrides(); - VirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride); - AttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** owner ********** - - interface Owner - extends OverrideContainer.Owner - { - /** - * @see AttributeOverrideContainer#resolveOverriddenColumn(String) - */ - ReadOnlyColumn resolveOverriddenColumn(String attributeName); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java deleted file mode 100644 index 1b2c9c73ea..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseColumn.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * column or join 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.0 - * @since 2.0 - */ -public interface BaseColumn - extends NamedColumn, ReadOnlyBaseColumn -{ - void setSpecifiedTable(String table); - void setSpecifiedUnique(Boolean unique); - void setSpecifiedNullable(Boolean nullable); - void setSpecifiedInsertable(Boolean insertable); - void setSpecifiedUpdatable(Boolean updatable); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java deleted file mode 100644 index 2e6ddedaf7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseEmbeddedMapping.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Behavior common to embedded and embedded ID mappings. - * <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.0 - */ -public interface BaseEmbeddedMapping - extends AttributeMapping -{ - AttributeOverrideContainer getAttributeOverrideContainer(); - - /** - * Return the embeddable the embedded mapping references. - * Return <code>null</code> if there is none. - */ - Embeddable getTargetEmbeddable(); - - /** - * String associated with property change events for the target embeddable - */ - String TARGET_EMBEDDABLE_PROPERTY = "targetEmbeddable"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java deleted file mode 100644 index 669769cd13..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BaseJoinColumn.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Specified - * <ul> - * <li>join column - * <li>primary key join column - * </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.0 - * @since 2.0 - */ -public interface BaseJoinColumn - extends NamedColumn, ReadOnlyBaseJoinColumn -{ - void setSpecifiedReferencedColumnName(String value); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java deleted file mode 100644 index c23cfb6628..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/BasicMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA 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 2.1 - * @since 2.0 - */ -public interface BasicMapping - extends ColumnMapping, FetchableMapping, OptionalMapping, ConvertibleMapping -{ - FetchType DEFAULT_FETCH_TYPE = FetchType.EAGER; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java deleted file mode 100644 index 4edc0d63f8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Cascade.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA cascade (persist, merge, remove, refresh) - * <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.0 - */ -public interface Cascade - extends JpaContextNode -{ - boolean isAll(); - void setAll(boolean value); - String ALL_PROPERTY = "all"; //$NON-NLS-1$ - - boolean isPersist(); - void setPersist(boolean value); - String PERSIST_PROPERTY = "persist"; //$NON-NLS-1$ - - boolean isMerge(); - void setMerge(boolean value); - String MERGE_PROPERTY = "merge"; //$NON-NLS-1$ - - boolean isRemove(); - void setRemove(boolean value); - String REMOVE_PROPERTY = "remove"; //$NON-NLS-1$ - - boolean isRefresh(); - void setRefresh(boolean value); - String REFRESH_PROPERTY = "refresh"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java deleted file mode 100644 index 268b5fea17..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/CollectionMapping.java +++ /dev/null @@ -1,73 +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.core.context; - -/** - * JPA collection mapping (e.g. 1:m, m:m, element collection) - * <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 CollectionMapping - extends FetchableMapping -{ - FetchType DEFAULT_FETCH_TYPE = FetchType.LAZY; - - Orderable getOrderable(); - - PersistentType getResolvedTargetType(); - - - // ********** types ********** - - Type getValueType(); - String VALUE_TYPE_PROPERTY = "valueType"; //$NON-NLS-1$ - - Type getKeyType(); - String KEY_TYPE_PROPERTY = "keyType"; //$NON-NLS-1$ - - public enum Type { - BASIC_TYPE, - EMBEDDABLE_TYPE, - ENTITY_TYPE, - NO_TYPE - } - - - // ********** map key ********** - - String getMapKey(); - - String getSpecifiedMapKey(); - void setSpecifiedMapKey(String mapKey); - String SPECIFIED_MAP_KEY_PROPERTY = "specifiedMapKey"; //$NON-NLS-1$ - - boolean isNoMapKey(); - void setNoMapKey(boolean noMapKey); - String NO_MAP_KEY_PROPERTY = "noMapKey"; //$NON-NLS-1$ - - boolean isPkMapKey(); - void setPkMapKey(boolean pkMapKey); - String PK_MAP_KEY_PROPERTY = "pkMapKey"; //$NON-NLS-1$ - - boolean isCustomMapKey(); - void setCustomMapKey(boolean customMapKey); - String CUSTOM_MAP_KEY_PROPERTY = "customMapKey"; //$NON-NLS-1$ - - Iterable<String> getCandidateMapKeyNames(); - - String getMetamodelFieldMapKeyTypeName(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java deleted file mode 100644 index 6c1fa9a8be..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Column.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * Normal 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 2.2 - * @since 2.0 - */ -public interface Column - extends BaseColumn, ReadOnlyColumn -{ - void initializeFrom(ReadOnlyColumn oldColumn); - - void initializeFromVirtual(ReadOnlyColumn oldColumn); - - void setSpecifiedLength(Integer length); - - void setSpecifiedPrecision(Integer precision); - - void setSpecifiedScale(Integer scale); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java deleted file mode 100644 index a3d40f4940..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ColumnMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA attribute mapping that has a converter (e.g. basic, ID, version). - * <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.0 - */ -public interface ColumnMapping - extends AttributeMapping, ReadOnlyBaseColumn.Owner -{ - Column getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java deleted file mode 100644 index 78be6044f1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java +++ /dev/null @@ -1,33 +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.core.context; - -/** - * JPA attribute mapping 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 Converter - extends JpaContextNode -{ - AttributeMapping getParent(); - - /** - * Return the converter's type. - */ - Class<? extends Converter> getType(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.java deleted file mode 100644 index db587e8ce9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ConvertibleMapping.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.core.context; - -/** - * JPA attribute mapping that has a converter (e.g. basic, ID, version). - * <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.1 - */ -public interface ConvertibleMapping - extends AttributeMapping -{ - /** - * Return the mapping's converter. Never <code>null</code>. - */ - Converter getConverter(); - String CONVERTER_PROPERTY = "converter"; //$NON-NLS-1$ - - /** - * Set the converter type, adding the appropriate converter to the resource - * model and removing any other converters. Clear all converters if the - * specified type is <code>null</code>. - */ - void setConverter(Class<? extends Converter> converterType); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java deleted file mode 100644 index e9d60c2029..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorColumn.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * 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 2.2 - * @since 2.0 - */ -public interface DiscriminatorColumn - extends NamedColumn -{ - String DEFAULT_NAME = "DTYPE"; //$NON-NLS-1$ - - - // ********** discriminator type ********** - - /** - * Return the specified discriminator type if present, - * otherwise return the default discriminator type. - */ - DiscriminatorType getDiscriminatorType(); - DiscriminatorType getSpecifiedDiscriminatorType(); - void setSpecifiedDiscriminatorType(DiscriminatorType newSpecifiedDiscriminatorType); - String SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY = "specifiedDiscriminatorType"; //$NON-NLS-1$ - DiscriminatorType getDefaultDiscriminatorType(); - String DEFAULT_DISCRIMINATOR_TYPE_PROPERTY = "defaultDiscriminatorType"; //$NON-NLS-1$ - DiscriminatorType DEFAULT_DISCRIMINATOR_TYPE = DiscriminatorType.STRING; - - - // ********** length ********** - - /** - * Return the specified length if present, - * otherwise return the default length. - */ - int getLength(); - Integer getSpecifiedLength(); - void setSpecifiedLength(Integer value); - String SPECIFIED_LENGTH_PROPERTY = "specifiedLength"; //$NON-NLS-1$ - int getDefaultLength(); - String DEFAULT_LENGTH_PROPERTY = "defaultLength"; //$NON-NLS-1$ - int DEFAULT_LENGTH = 31; - - - // ********** validation ********** - - /** - * Return whether the column is specified in the resource. - */ - boolean isResourceSpecified(); - - - // ********** owner ********** - - /** - * interface allowing discriminator columns to be used in multiple places - * (but pretty much just entities) - */ - interface Owner - extends ReadOnlyNamedColumn.Owner - { - /** - * Return the default discriminator column length - */ - int getDefaultLength(); - - /** - * Return the default discriminator column type - */ - DiscriminatorType getDefaultDiscriminatorType(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java deleted file mode 100644 index ebfd0b93ad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/DiscriminatorType.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * Discriminator Type - * - * 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.0 - */ -public enum DiscriminatorType { - - STRING( - org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.STRING, - org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType.STRING - ), - CHAR( - org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.CHAR, - org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType.CHAR - ), - INTEGER( - org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.INTEGER, - org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType.INTEGER - ); - - - private org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType; - private org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType; - - DiscriminatorType(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType, org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType) { - if (javaDiscriminatorType == null) { - throw new NullPointerException(); - } - if (ormDiscriminatorType == null) { - throw new NullPointerException(); - } - this.javaDiscriminatorType = javaDiscriminatorType; - this.ormDiscriminatorType = ormDiscriminatorType; - } - - public org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType getJavaDiscriminatorType() { - return this.javaDiscriminatorType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType getOrmDiscriminatorType() { - return this.ormDiscriminatorType; - } - - - // ********** static methods ********** - - public static DiscriminatorType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType) { - return (javaDiscriminatorType == null) ? null : fromJavaResourceModel_(javaDiscriminatorType); - } - - private static DiscriminatorType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType javaDiscriminatorType) { - for (DiscriminatorType discriminatorType : DiscriminatorType.values()) { - if (discriminatorType.getJavaDiscriminatorType() == javaDiscriminatorType) { - return discriminatorType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType toJavaResourceModel(DiscriminatorType discriminatorType) { - return (discriminatorType == null) ? null : discriminatorType.getJavaDiscriminatorType(); - } - - public static DiscriminatorType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType) { - return (ormDiscriminatorType == null) ? null : fromOrmResourceModel_(ormDiscriminatorType); - } - - private static DiscriminatorType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType ormDiscriminatorType) { - for (DiscriminatorType discriminatorType : DiscriminatorType.values()) { - if (discriminatorType.getOrmDiscriminatorType() == ormDiscriminatorType) { - return discriminatorType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.DiscriminatorType toOrmResourceModel(DiscriminatorType discriminatorType) { - return (discriminatorType == null) ? null : discriminatorType.getOrmDiscriminatorType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java deleted file mode 100644 index 4c06592dd2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Embeddable.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * embeddable type mapping - * <b> - * 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.0 - * @since 2.0 - */ -public interface Embeddable - extends TypeMapping -{ - // nothing yet -} - diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java deleted file mode 100644 index 6bd03dff15..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedIdMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA embedded 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 2.0 - * @since 2.0 - */ -public interface EmbeddedIdMapping - extends BaseEmbeddedMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java deleted file mode 100644 index 4a9f747c34..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EmbeddedMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA embedded 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.0 - * @since 2.0 - */ -public interface EmbeddedMapping - extends BaseEmbeddedMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java deleted file mode 100644 index b376d9e03c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Entity.java +++ /dev/null @@ -1,292 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * 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.3 - * @since 2.0 - */ -public interface Entity - extends TypeMapping -{ - // ********** name ********** - - String getSpecifiedName(); - String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$ - void setSpecifiedName(String name); - String getDefaultName(); - String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$ - - - // ********** id class ********** - - /** - * Return the (aggregate) class reference for configuring and validating id class - */ - IdClassReference getIdClassReference(); - - - // ********** table ********** - - /** - * Return the table for this entity, either specified or default. - * This will not be null. - */ - Table getTable(); - - /** - * Return the name of the entity's primary key column. - * Return null if the entity's primary key is "compound" - * (i.e. the primary key is composed of multiple columns). - */ - String getPrimaryKeyColumnName(); - - /** - * Return the entity's default table name, which depends on the entity's - * inheritance hierarchy. - */ - String getDefaultTableName(); - - /** - * Return the entity's default schema, which depends on the entity's - * inheritance hierarchy. - */ - String getDefaultSchema(); - - /** - * Return the entity's default catalog, which depends on the entity's - * inheritance hierarchy. - */ - String getDefaultCatalog(); - - - // ********** secondary tables ********** - - /** - * Return the secondary tables whether specified or default. - */ - ListIterable<? extends ReadOnlySecondaryTable> getSecondaryTables(); - - /** - * Return the number of secondary tables, both specified and default. - */ - int getSecondaryTablesSize(); - - /** - * Return a list iterator of the specified secondary tables. - * This will not be null. - */ - ListIterable<? extends SecondaryTable> getSpecifiedSecondaryTables(); - String SPECIFIED_SECONDARY_TABLES_LIST = "specifiedSecondaryTables"; //$NON-NLS-1$ - - /** - * Return the number of specified secondary tables. - */ - int getSpecifiedSecondaryTablesSize(); - - /** - * Add a specified secondary table to the entity return the object - * representing it. - */ - SecondaryTable addSpecifiedSecondaryTable(); - - /** - * Add a specified secondary table to the entity return the object - * representing it. - */ - SecondaryTable addSpecifiedSecondaryTable(int index); - - /** - * Remove the specified secondary table from the entity. - */ - void removeSpecifiedSecondaryTable(int index); - - /** - * Remove the specified secondary table at the index from the entity. - */ - void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable); - - /** - * Move the specified secondary table from the source index to the target index. - */ - void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex); - - - // ********** inheritance strategy ********** - - /** - * Return the specified inheritance strategy if present, otherwise return the default - * inheritance strategy. - */ - InheritanceType getInheritanceStrategy(); - InheritanceType getSpecifiedInheritanceStrategy(); - void setSpecifiedInheritanceStrategy(InheritanceType inheritanceType); - String SPECIFIED_INHERITANCE_STRATEGY_PROPERTY = "specifiedInheritanceStrategy"; //$NON-NLS-1$ - InheritanceType getDefaultInheritanceStrategy(); - String DEFAULT_INHERITANCE_STRATEGY_PROPERTY = "defaultInheritanceStrategy"; //$NON-NLS-1$ - - - /** - * The first parent in the class hierarchy that is an entity. - * This is the parent in the entity (persistent) inheritance hierarchy - * (vs class inheritance hierarchy). Return null if there is no parent entity. - */ - Entity getParentEntity(); - - DiscriminatorColumn getDiscriminatorColumn(); - - String getDiscriminatorValue(); - String getSpecifiedDiscriminatorValue(); - void setSpecifiedDiscriminatorValue(String value); - String SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY = "specifiedDiscriminatorValue"; //$NON-NLS-1$ - String getDefaultDiscriminatorValue(); - String DEFAULT_DISCRIMINATOR_VALUE_PROPERTY = "defaultDiscriminatorValue"; //$NON-NLS-1$ - - /** - * Return whether a DiscriminatorValue is allowed for this Entity. - * It is allowed if the entity is not abstract and not part of - * a table-per-class inheritance hierarchy - */ - boolean specifiedDiscriminatorValueIsAllowed(); - String SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY = "discriminatorValueIsAllowed"; //$NON-NLS-1$ - - /** - * Return whether a DiscriminatorValue is undefined for this Entity. - * It is undefined if the entity is abstract or if it - * is part of a table-per-class inheritance hierarchy - */ - boolean discriminatorValueIsUndefined(); - String DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY = "discriminatorValueIsUndefined"; //$NON-NLS-1$ - - /** - * Return whether a DiscriminatorColumn is allowed for this Entity. - * It is allowed if the entity is the root of the inheritance hierarchy (with descendant entities) - * and the strategy is not table-per-class - */ - boolean specifiedDiscriminatorColumnIsAllowed(); - String SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY = "specifiedDiscriminatorColumnIsAllowed"; //$NON-NLS-1$ - - /** - * Return whether a DiscriminatorColumn is undefined for this Entity. - * It is undefined if the inheritance strategy is table-per-class - */ - boolean discriminatorColumnIsUndefined(); - String DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY = "discriminatorColumnIsUndefined"; //$NON-NLS-1$ - - /** - * Return whether a Table is allowed for this Entity. - * If the inheritance strategy is single-table, Table is allowed only - * on the root entity. - * If the inheritance strategy is table-per-class it is allowed only - * on concrete entities. - */ - boolean specifiedTableIsAllowed(); - String SPECIFIED_TABLE_IS_ALLOWED_PROPERTY = "specifiedTableIsAllowed"; //$NON-NLS-1$ - - /** - * Return whether a Table is undefined for this Entity. - * If the inheritance strategy is table-per-class and the entity is - * abstract, then a Table object is undefined - */ - boolean tableIsUndefined(); - String TABLE_IS_UNDEFINED_PROPERTY = "tableIsUndefined"; //$NON-NLS-1$ - - - // ********** primary key join columns ********** - - ListIterable<? extends ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - - int getPrimaryKeyJoinColumnsSize(); - - ListIterable<? extends PrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - String SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST = "specifiedPrimaryKeyJoinColumns"; //$NON-NLS-1$ - - int getSpecifiedPrimaryKeyJoinColumnsSize(); - - PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index); - - PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(); - - void removeSpecifiedPrimaryKeyJoinColumn(int index); - - void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn); - - void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex); - - - // ********** containers ********** - - AttributeOverrideContainer getAttributeOverrideContainer(); - - AssociationOverrideContainer getAssociationOverrideContainer(); - - QueryContainer getQueryContainer(); - - GeneratorContainer getGeneratorContainer(); - - - // ********** entity inheritance ********** - - /** - * Return whether this entity is a root entity in an inheritance hierarchy. - */ - boolean isRoot(); - - /** - * Return the top of the entity's inheritance hierarchy. - * This method will never return <code>null</code>. The root - * is defined as the persistent type in the inheritance hierarchy - * that has no parent. The root will be an entity. - * <p> - * Non-entities in the hierarchy should be ignored; i.e. we skip - * over them in the search for the root. - */ - Entity getRootEntity(); - String ROOT_ENTITY_PROPERTY = "rootEntity"; //$NON-NLS-1$ - - /** - * If the entity is a root entity, return the entity's descendant entities; - * if the entity is not a root entity, return an empty collection. - * <p> - * <strong>NB:</strong> An entity A is a "descendant" of another root - * entity B if the <em>name</em> of entity A's root entity's type matches - * the name of entity B's type. This means entity A can be a "descendant" - * of multiple root entities (typically both the <code>orm.xml</code> - * and Java root entities for a particular type); despite entity have only - * a single "root" entity (typically the <code>orm.xml</code> root entity). - */ - Iterable<Entity> getDescendants(); - String DESCENDANTS_COLLECTION = "descendants"; //$NON-NLS-1$ - - - // ********** misc ********** - - /** - * Returns the attribute mapping that matches the name. - * In 2.0 this name could use dot-notation for nested mappings. - */ - AttributeMapping resolveAttributeMapping(String name); - - /** - * If an entity has a single id attribute, return that attribute. - * Else return null. - */ - PersistentAttribute getIdAttribute(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java deleted file mode 100644 index 4135ca9b2e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumType.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * Enum Type - * - * 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.0 - */ -public enum EnumType { - - ORDINAL( - org.eclipse.jpt.jpa.core.resource.java.EnumType.ORDINAL, - org.eclipse.jpt.jpa.core.resource.orm.EnumType.ORDINAL - ), - STRING( - org.eclipse.jpt.jpa.core.resource.java.EnumType.STRING, - org.eclipse.jpt.jpa.core.resource.orm.EnumType.STRING - ); - - - private org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType; - private org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType; - - EnumType(org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType, org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType) { - if (javaEnumType == null) { - throw new NullPointerException(); - } - if (ormEnumType == null) { - throw new NullPointerException(); - } - this.javaEnumType = javaEnumType; - this.ormEnumType = ormEnumType; - } - - public org.eclipse.jpt.jpa.core.resource.java.EnumType getJavaEnumType() { - return this.javaEnumType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.EnumType getOrmEnumType() { - return this.ormEnumType; - } - - - // ********** static methods ********** - - public static EnumType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType) { - return (javaEnumType == null) ? null : fromJavaResourceModel_(javaEnumType); - } - - private static EnumType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.EnumType javaEnumType) { - for (EnumType enumType : EnumType.values()) { - if (enumType.getJavaEnumType() == javaEnumType) { - return enumType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.EnumType toJavaResourceModel(EnumType enumType) { - return (enumType == null) ? null : enumType.getJavaEnumType(); - } - - public static EnumType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType) { - return (ormEnumType == null) ? null : fromOrmResourceModel_(ormEnumType); - } - - private static EnumType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.EnumType ormEnumType) { - for (EnumType enumType : EnumType.values()) { - if (enumType.getOrmEnumType() == ormEnumType) { - return enumType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.EnumType toOrmResourceModel(EnumType enumType) { - return (enumType == null) ? null : enumType.getOrmEnumType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumeratedConverter.java deleted file mode 100644 index 570f8738ad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/EnumeratedConverter.java +++ /dev/null @@ -1,36 +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.core.context; - -/** - * JPA enumerated 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.2 - * @since 2.1 - */ -public interface EnumeratedConverter - extends Converter -{ - EnumType getEnumType(); - - EnumType getSpecifiedEnumType(); - void setSpecifiedEnumType(EnumType enumType); - String SPECIFIED_ENUM_TYPE_PROPERTY = "specifiedEnumType"; //$NON-NLS-1$ - - EnumType getDefaultEnumType(); - String DEFAULT_ENUM_TYPE_PROPERTY = "defaultEnumType"; //$NON-NLS-1$ - EnumType DEFAULT_ENUM_TYPE = EnumType.ORDINAL; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java deleted file mode 100644 index 2ae147cf90..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchType.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * Fetch Type - * - * 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.0 - */ -public enum FetchType { - - EAGER( - org.eclipse.jpt.jpa.core.resource.java.FetchType.EAGER, - org.eclipse.jpt.jpa.core.resource.orm.FetchType.EAGER - ), - LAZY( - org.eclipse.jpt.jpa.core.resource.java.FetchType.LAZY, - org.eclipse.jpt.jpa.core.resource.orm.FetchType.LAZY - ); - - - private org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType; - private org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType; - - FetchType(org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType, org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType) { - if (javaFetchType == null) { - throw new NullPointerException(); - } - if (ormFetchType == null) { - throw new NullPointerException(); - } - this.javaFetchType = javaFetchType; - this.ormFetchType = ormFetchType; - } - - public org.eclipse.jpt.jpa.core.resource.java.FetchType getJavaFetchType() { - return this.javaFetchType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.FetchType getOrmFetchType() { - return this.ormFetchType; - } - - - // ********** static methods ********** - - public static FetchType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType) { - return (javaFetchType == null) ? null : fromJavaResourceModel_(javaFetchType); - } - - private static FetchType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.FetchType javaFetchType) { - for (FetchType fetchType : FetchType.values()) { - if (fetchType.getJavaFetchType() == javaFetchType) { - return fetchType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.FetchType toJavaResourceModel(FetchType fetchType) { - return (fetchType == null) ? null : fetchType.getJavaFetchType(); - } - - public static FetchType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType) { - return (ormFetchType == null) ? null : fromOrmResourceModel_(ormFetchType); - } - - private static FetchType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.FetchType ormFetchType) { - for (FetchType fetchType : FetchType.values()) { - if (fetchType.getOrmFetchType() == ormFetchType) { - return fetchType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.FetchType toOrmResourceModel(FetchType fetchType) { - return (fetchType == null) ? null : fetchType.getOrmFetchType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java deleted file mode 100644 index 31dec5ef31..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/FetchableMapping.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA attribute mapping that has a fetch type (e.g. basic, 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.0 - */ -public interface FetchableMapping - extends AttributeMapping -{ - FetchType getFetch(); - - FetchType getSpecifiedFetch(); - void setSpecifiedFetch(FetchType newSpecifiedFetch); - String SPECIFIED_FETCH_PROPERTY = "specifiedFetch"; //$NON-NLS-1$ - - FetchType getDefaultFetch(); - String DEFAULT_FETCH_PROPERTY = "defaultFetch"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java deleted file mode 100644 index 934a08f609..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA generated value - * <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.0 - */ -public interface GeneratedValue - extends JpaContextNode -{ - GenerationType getStrategy(); - GenerationType getSpecifiedStrategy(); - void setSpecifiedStrategy(GenerationType strategy); - String SPECIFIED_STRATEGY_PROPERTY = "specifiedStrategy"; //$NON-NLS-1$ - GenerationType getDefaultStrategy(); - String DEFAULT_STRATEGY_PROPERTY = "defaultStrategy"; //$NON-NLS-1$ - GenerationType DEFAULT_STRATEGY = GenerationType.AUTO; - - String getGenerator(); - String getSpecifiedGenerator(); - void setSpecifiedGenerator(String generator); - String SPECIFIED_GENERATOR_PROPERTY = "specifiedGenerator"; //$NON-NLS-1$ - String getDefaultGenerator(); - String DEFAULT_GENERATOR_PROPERTY = "defaultGenerator"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java deleted file mode 100644 index 6d87ae32d2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GenerationType.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * Generation Type - * - * 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.0 - */ -public enum GenerationType { - - TABLE( - org.eclipse.jpt.jpa.core.resource.java.GenerationType.TABLE, - org.eclipse.jpt.jpa.core.resource.orm.GenerationType.TABLE - ), - SEQUENCE( - org.eclipse.jpt.jpa.core.resource.java.GenerationType.SEQUENCE, - org.eclipse.jpt.jpa.core.resource.orm.GenerationType.SEQUENCE - ), - IDENTITY( - org.eclipse.jpt.jpa.core.resource.java.GenerationType.IDENTITY, - org.eclipse.jpt.jpa.core.resource.orm.GenerationType.IDENTITY - ), - AUTO( - org.eclipse.jpt.jpa.core.resource.java.GenerationType.AUTO, - org.eclipse.jpt.jpa.core.resource.orm.GenerationType.AUTO - ); - - - private org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType; - private org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType; - - GenerationType(org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType, org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType) { - if (javaGenerationType == null) { - throw new NullPointerException(); - } - if (ormGenerationType == null) { - throw new NullPointerException(); - } - this.javaGenerationType = javaGenerationType; - this.ormGenerationType = ormGenerationType; - } - - public org.eclipse.jpt.jpa.core.resource.java.GenerationType getJavaGenerationType() { - return this.javaGenerationType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.GenerationType getOrmGenerationType() { - return this.ormGenerationType; - } - - - // ********** static methods ********** - - public static GenerationType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType) { - return (javaGenerationType == null) ? null : fromJavaResourceModel_(javaGenerationType); - } - - private static GenerationType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.GenerationType javaGenerationType) { - for (GenerationType generationType : GenerationType.values()) { - if (generationType.getJavaGenerationType() == javaGenerationType) { - return generationType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.GenerationType toJavaResourceModel(GenerationType generationType) { - return (generationType == null) ? null : generationType.getJavaGenerationType(); - } - - public static GenerationType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType) { - return (ormGenerationType == null) ? null : fromOrmResourceModel_(ormGenerationType); - } - - private static GenerationType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.GenerationType ormGenerationType) { - for (GenerationType generationType : GenerationType.values()) { - if (generationType.getOrmGenerationType() == ormGenerationType) { - return generationType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.GenerationType toOrmResourceModel(GenerationType generationType) { - return (generationType == null) ? null : generationType.getOrmGenerationType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java deleted file mode 100644 index 2a4e8ed94c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import java.util.Arrays; - -import org.eclipse.jpt.jpa.core.context.java.JavaGenerator; -import org.eclipse.jpt.jpa.core.context.orm.OrmGenerator; -import org.eclipse.jpt.jpa.db.Catalog; -import org.eclipse.jpt.jpa.db.Schema; -import org.eclipse.jpt.jpa.db.SchemaContainer; - -/** - * Sequence and table generators. - * <p> - * Sequences can be defined on<ul> - * <li>Java and <code>orm.xml</code> entities - * <li>Java and <code>orm.xml</code> ID mappings - * <li><code>orm.xml</code> entity mappings elements - * </ul> - * <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.0 - */ -public interface Generator - extends JpaNamedContextNode<Generator> -{ - /** - * TODO bjv remove! - */ - @SuppressWarnings("unchecked") - Iterable<Class<? extends Generator>> PRECEDENCE_TYPE_LIST = Arrays.asList( - OrmGenerator.class, - JavaGenerator.class - ); - - - // ********** initial value ********** - - /** - * Return the specified initial value if present, otherwise return the - * default initial value. - */ - int getInitialValue(); - Integer getSpecifiedInitialValue(); - void setSpecifiedInitialValue(Integer value); - String SPECIFIED_INITIAL_VALUE_PROPERTY = "specifiedInitialValue"; //$NON-NLS-1$ - int getDefaultInitialValue(); - String DEFAULT_INITIAL_VALUE_PROPERTY = "defaultInitialValue"; //$NON-NLS-1$ - - - // ********** allocation size ********** - - /** - * Return the specified allocation size if present, otherwise return the - * default allocation size. - */ - int getAllocationSize(); - Integer getSpecifiedAllocationSize(); - void setSpecifiedAllocationSize(Integer value); - String SPECIFIED_ALLOCATION_SIZE_PROPERTY = "specifiedAllocationSize"; //$NON-NLS-1$ - int getDefaultAllocationSize(); - String DEFAULT_ALLOCATION_SIZE_PROPERTY = "defaultAllocationSize"; //$NON-NLS-1$ - int DEFAULT_ALLOCATION_SIZE = 50; - - - // ********** database stuff ********** - - /** - * Return the schema container that holds the relevant schemata. - */ - SchemaContainer getDbSchemaContainer(); - - /** - * Return the generator's database catalog. - * Return null if the generator's catalog (name) is invalid. - */ - Catalog getDbCatalog(); - - /** - * Return the generator's database schema. - * Return null if the generator's schema (name) is invalid. - */ - Schema getDbSchema(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java deleted file mode 100644 index 9297560a29..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratorContainer.java +++ /dev/null @@ -1,49 +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.core.context; - -/** - * Container for a table generator and/or sequence generator. - * Used by entities and ID mappings. - * <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 GeneratorContainer - extends JpaContextNode -{ - // ********** sequence generator ********** - - String SEQUENCE_GENERATOR_PROPERTY = "sequenceGenerator"; //$NON-NLS-1$ - - SequenceGenerator getSequenceGenerator(); - - SequenceGenerator addSequenceGenerator(); - - void removeSequenceGenerator(); - - - // ********** table generator ********** - - String TABLE_GENERATOR_PROPERTY = "tableGenerator"; //$NON-NLS-1$ - - TableGenerator getTableGenerator(); - - TableGenerator addTableGenerator(); - - void removeTableGenerator(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java deleted file mode 100644 index 8d63b18cb5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdClassReference.java +++ /dev/null @@ -1,91 +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.core.context; - -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; - -/** - * ID class reference - * <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 IdClassReference - extends PersistentType.Owner -{ - // ********** id class name ********** - - /** - * Return the name of the id class, taking into consideration the default value if applicable - */ - String getIdClassName(); - - /** - * Property string associated with changes to the {@link IdClassHolder}'s specified id class name - */ - String SPECIFIED_ID_CLASS_NAME_PROPERTY = "specifiedIdClassName"; //$NON-NLS-1$ - - /** - * Return the specified name of the id class, null if none is specified in the resource model - */ - String getSpecifiedIdClassName(); - - /** - * Set the specified name of the id class. - * Use null to remove the id class specification from the resource model - */ - void setSpecifiedIdClassName(String value); - - /** - * Property string associated with changes to the {@link IdClassHolder}'s default id class name - */ - String DEFAULT_ID_CLASS_NAME_PROPERTY = "defaultIdClassName"; //$NON-NLS-1$ - - /** - * Return the default name of the id class, null if there is none - */ - String getDefaultIdClassName(); - - /** - * Return whether the id class has been specified. - * Generally, this simply means that the id class name has been set, although if a default - * applies, this should also return true. - */ - boolean isSpecified(); - - - // ********** id class ********** - - /** - * Property string associated with changes to the {@link IdClassHolder}'s id class. - * This will change (potentially) if the id class name changes, or if other changes result - * in changes in the id class' resolution. - */ - String ID_CLASS_PROPERTY = "idClass"; //$NON-NLS-1$ - - /** - * Return the {@link JavaPersistentType} that is resolved from the id class name. - * This will be null if the id class name is null or if the class cannot be resolved from that - * name. - */ - JavaPersistentType getIdClass(); - - /** - * Return the char to be used for browsing or creating the id class IType. - * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char) - */ - char getIdClassEnclosingTypeSeparator(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java deleted file mode 100644 index d4f117ff28..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/IdMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA 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 2.3 - * @since 2.0 - */ -public interface IdMapping - extends ColumnMapping, ConvertibleMapping -{ - GeneratorContainer getGeneratorContainer(); - - GeneratedValue getGeneratedValue(); - GeneratedValue addGeneratedValue(); - void removeGeneratedValue(); - String GENERATED_VALUE_PROPERTY = "generatedValue"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java deleted file mode 100644 index a3003bf64c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/InheritanceType.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * Inheritance Type - * - * 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.0 - */ -public enum InheritanceType { - - SINGLE_TABLE( - org.eclipse.jpt.jpa.core.resource.java.InheritanceType.SINGLE_TABLE, - org.eclipse.jpt.jpa.core.resource.orm.InheritanceType.SINGLE_TABLE - ), - JOINED( - org.eclipse.jpt.jpa.core.resource.java.InheritanceType.JOINED, - org.eclipse.jpt.jpa.core.resource.orm.InheritanceType.JOINED - ), - TABLE_PER_CLASS( - org.eclipse.jpt.jpa.core.resource.java.InheritanceType.TABLE_PER_CLASS, - org.eclipse.jpt.jpa.core.resource.orm.InheritanceType.TABLE_PER_CLASS - ); - - - private org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType; - private org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType; - - InheritanceType(org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType, org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType) { - if (javaInheritanceType == null) { - throw new NullPointerException(); - } - if (ormInheritanceType == null) { - throw new NullPointerException(); - } - this.javaInheritanceType = javaInheritanceType; - this.ormInheritanceType = ormInheritanceType; - } - - public org.eclipse.jpt.jpa.core.resource.java.InheritanceType getJavaInheritanceType() { - return this.javaInheritanceType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.InheritanceType getOrmInheritanceType() { - return this.ormInheritanceType; - } - - - // ********** static methods ********** - - public static InheritanceType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType) { - return (javaInheritanceType == null) ? null : fromJavaResourceModel_(javaInheritanceType); - } - - private static InheritanceType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.InheritanceType javaInheritanceType) { - for (InheritanceType inheritanceType : InheritanceType.values()) { - if (inheritanceType.getJavaInheritanceType() == javaInheritanceType) { - return inheritanceType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.InheritanceType toJavaResourceModel(InheritanceType inheritanceType) { - return (inheritanceType == null) ? null : inheritanceType.getJavaInheritanceType(); - } - - public static InheritanceType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType) { - return (ormInheritanceType == null) ? null : fromOrmResourceModel_(ormInheritanceType); - } - - private static InheritanceType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.InheritanceType ormInheritanceType) { - for (InheritanceType inheritanceType : InheritanceType.values()) { - if (inheritanceType.getOrmInheritanceType() == ormInheritanceType) { - return inheritanceType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.InheritanceType toOrmResourceModel(InheritanceType inheritanceType) { - return (inheritanceType == null) ? null : inheritanceType.getOrmInheritanceType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java deleted file mode 100644 index 900dde8078..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumn.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Specified join 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 2.3 - * @since 2.0 - */ -public interface JoinColumn - extends BaseJoinColumn, BaseColumn, ReadOnlyJoinColumn -{ - /** - * Initialize the join column from the specified old join column. - */ - void initializeFrom(ReadOnlyJoinColumn oldJoinColumn); - - /** - * Initialize the join column from the specified old virtual join column. - */ - void initializeFromVirtual(ReadOnlyJoinColumn virtualJoinColumn); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java deleted file mode 100644 index 4a80ae536c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationship.java +++ /dev/null @@ -1,42 +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.core.context; - -/** - * Join column relationship<ul> - * <li>1:1 - * <li>1:m - * <li>m:1 - * <li>association override - * </ul> - * <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. - * - * @see RelationshipMapping - * @see Relationship - * @see JoinColumn - * - * @version 2.2 - * @since 2.2 - */ -public interface JoinColumnRelationship - extends ReadOnlyJoinColumnRelationship, Relationship -{ - JoinColumnRelationshipStrategy getJoinColumnStrategy(); - - /** - * Set the relationship's strategy to the join column strategy. - */ - void setStrategyToJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java deleted file mode 100644 index e796fa3791..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,77 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Join column relationship strategy. - * <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. - * - * @see RelationshipMapping - * @see AssociationOverride - * @see JoinColumnRelationship - * - * @version 2.3 - * @since 2.2 - */ -public interface JoinColumnRelationshipStrategy - extends ReadOnlyJoinColumnRelationshipStrategy, RelationshipStrategy -{ - void initializeFrom(ReadOnlyJoinColumnRelationshipStrategy oldStrategy); - - void initializeFromVirtual(ReadOnlyJoinColumnRelationshipStrategy oldStrategy); - - - // ********** join columns ********** - - ListIterable<? extends JoinColumn> getJoinColumns(); - - - // ********** specified join columns ********** - - ListIterable<? extends JoinColumn> getSpecifiedJoinColumns(); - JoinColumn getSpecifiedJoinColumn(int index); - - /** - * Add a specified join column to the relationship. - */ - JoinColumn addSpecifiedJoinColumn(); - - /** - * Add a specified join column to the relationship. - */ - JoinColumn addSpecifiedJoinColumn(int index); - - /** - * Remove the specified join column. - */ - void removeSpecifiedJoinColumn(int index); - - /** - * Remove the specified join column. - */ - void removeSpecifiedJoinColumn(JoinColumn joinColumn); - - /** - * Move the specified join column from the source index to the target index. - */ - void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex); - - - // ********** default join column ********** - - JoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java deleted file mode 100644 index f5169be42b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTable.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Used by many-to-many and one-to-many mappings. - * <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.0 - */ -public interface JoinTable - extends ReferenceTable, ReadOnlyJoinTable -{ - JoinTableRelationshipStrategy getParent(); - - void initializeFrom(ReadOnlyJoinTable oldJoinTable); - - void initializeFromVirtual(ReadOnlyJoinTable virtualJoinTable); - - - // ********** inverse join columns ********** - - /** - * Convert the join table's default inverse join column to a specified - * inverse join column. - */ - void convertDefaultInverseJoinColumnToSpecified(); - - ListIterable<? extends JoinColumn> getInverseJoinColumns(); - - ListIterable<? extends JoinColumn> getSpecifiedInverseJoinColumns(); - - JoinColumn getSpecifiedInverseJoinColumn(int index); - - /** - * Add a specified inverse join column to the join table. - * Return the newly-created join column. - */ - JoinColumn addSpecifiedInverseJoinColumn(); - - /** - * Add a specified inverse join column to the join table. - * Return the newly-created join column. - */ - JoinColumn addSpecifiedInverseJoinColumn(int index); - - /** - * Remove the inverse join column at the specified index from the join table. - */ - void removeSpecifiedInverseJoinColumn(int index); - - /** - * Remove the specified inverse join column from the join table. - */ - void removeSpecifiedInverseJoinColumn(JoinColumn joinColumn); - - /** - * Move an inverse join column from the specified source index to the - * specified target index. - */ - void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex); - - /** - * Remove all the join table's inverse join columns. - */ - void clearSpecifiedInverseJoinColumns(); - - JoinColumn getDefaultInverseJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java deleted file mode 100644 index 45b60aaf47..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationship.java +++ /dev/null @@ -1,39 +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.core.context; - -/** - * Join table relationship<ul> - * <li>1:1 (JPA 2.0) - * <li>1:m - * <li>m:1 (JPA 2.0) - * <li>m:m - * <li>association override (JPA 2.0) - * </ul> - * <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 JoinTableRelationship - extends ReadOnlyJoinTableRelationship, Relationship -{ - JoinTableRelationshipStrategy getJoinTableStrategy(); - - /** - * Set the relationship's strategy to the join table strategy. - */ - void setStrategyToJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java deleted file mode 100644 index 8aa2e7dc53..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JoinTableRelationshipStrategy.java +++ /dev/null @@ -1,36 +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.core.context; - -/** - * Join table relationship strategy. - * <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. - * - * @see RelationshipMapping - * @see AssociationOverride - * @see JoinTableRelationship - * - * @version 2.3 - * @since 2.2 - */ -public interface JoinTableRelationshipStrategy - extends ReadOnlyJoinTableRelationshipStrategy, RelationshipStrategy -{ - void initializeFrom(ReadOnlyJoinTableRelationshipStrategy oldStrategy); - - void initializeFromVirtual(ReadOnlyJoinTableRelationshipStrategy virtualStrategy); - - JoinTable getJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java deleted file mode 100644 index 3de89e27bf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.core.JptResourceType; -import org.eclipse.jpt.jpa.core.JpaNode; -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit; -import org.eclipse.jpt.jpa.db.Catalog; -import org.eclipse.jpt.jpa.db.Schema; -import org.eclipse.jpt.jpa.db.SchemaContainer; - -/** - * Common protocol for JPA objects that have a context, as opposed to - * resource objects. - * <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.0 - */ -public interface JpaContextNode - extends JpaNode -{ - /** - * Return the resource type of the context node's resource. - */ - JptResourceType getResourceType(); - - /** - * Return the persistence unit if the context node is within a - * persistence unit. Otherwise throw an exception. - */ - PersistenceUnit getPersistenceUnit(); - - /** - * Return the mapping file root if the context node is within a - * mapping file. Otherwise throw an exception. - */ - MappingFileRoot getMappingFileRoot(); - - - // ********** database stuff ********** - - SchemaContainer getContextDefaultDbSchemaContainer(); - - Catalog getContextDefaultDbCatalog(); - - Schema getContextDefaultDbSchema(); - - - // ********** synchronize/update ********** - - /** - * The resource model has changed; synchronize the context model with it. - * This will probably trigger a call to {@link #update()}. - */ - void synchronizeWithResourceModel(); - - /** - * Some non-trivial state in the JPA project has changed; update the - * parts of the context node that are dependent on yet other parts of the - * node's JPA project. - * If the dependent state changes also, yet another <em>update</em> will be - * triggered, possibly followed by yet more <em>updates</em>; until the JPA - * project's state quiesces. - */ - void update(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java deleted file mode 100644 index 3bfbc00698..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaNamedContextNode.java +++ /dev/null @@ -1,56 +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.core.context; - -/** - * Named context node that may have collisions with or override other nodes - * with the same name defined elsewhere in the persistence unit - * (e.g. sequence/table generators, named/named native queries). - * <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 JpaNamedContextNode<T> - extends JpaContextNode -{ - // ********** name ********** - - String getName(); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - void setName(String name); - - - // ********** validation ********** -// TODO bjv - get rid of these methods - validation is done in the persistence unit instead -// of in a distributed fashion... - /** - * Return whether the node "overrides" the specified node - * within the nodes' persistence unit. - * (e.g. a query defined in <code>orm.xml</code> - * "overrides" one with the same name defined in a Java annotation). - * - * @see #duplicates(Object) - */ - boolean overrides(T other); - - /** - * Return whether the node is a "duplicate" of the specified node. - * Two nodes are duplicates if<ul> - * <li>they both have the same, non-empty name - * <li>neither node "overrides" the other - * <li>they both are in the same persistence unit - * </ul> - * @see #overrides(Object) - */ - boolean duplicates(T other); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java deleted file mode 100644 index 72f17ddf63..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import java.util.List; - -import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml; -import org.eclipse.wst.validation.internal.provisional.core.IMessage; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; - -/** - * Root of the Dali JPA context model. - * <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.0 - */ -public interface JpaRootContextNode - extends JpaContextNode -{ - - // ********** persistence.xml ********** - - /** - * String constant associated with changes to the persistence XML property - * @see #addPropertyChangeListener(String, org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener) - */ - public final static String PERSISTENCE_XML_PROPERTY = "persistenceXml"; //$NON-NLS-1$ - - /** - * Return the content represented by the <code>persistence.xml</code> - * file associated with the root context node's JPA project. - * This may be null. - */ - PersistenceXml getPersistenceXml(); - - - // ********** validation ********** - - /** - * Add validation messages to the specified list. - */ - public void validate(List<IMessage> messages, IReporter reporter); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.java deleted file mode 100644 index 61066cf693..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/LobConverter.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.core.context; - -/** - * JPA LOB 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 LobConverter - extends Converter -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java deleted file mode 100644 index 3b98a83d02..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2011s 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.core.context; - -/** - * JPA 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.2 - * @since 2.0 - */ -public interface ManyToManyMapping - extends MultiRelationshipMapping -{ - ManyToManyRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.java deleted file mode 100644 index 2ec18c5fa8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToManyRelationship.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.core.context; - -/** - * m:m relationship reference - * <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 ManyToManyRelationship - extends MappedByRelationship, - JoinTableRelationship, - MappingRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java deleted file mode 100644 index 41617e286f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA m: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.0 - */ -public interface ManyToOneMapping - extends SingleRelationshipMapping -{ - ManyToOneRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java deleted file mode 100644 index 712f296a33..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ManyToOneRelationship.java +++ /dev/null @@ -1,28 +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.core.context; - -/** - * m:1 relationship (join 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 2.2 - * @since 2.2 - */ -public interface ManyToOneRelationship - extends JoinColumnRelationship, MappingRelationship -{ - // nothing -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java deleted file mode 100644 index 09f610b7a2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationship.java +++ /dev/null @@ -1,52 +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.core.context; - -/** - * "Mapped by" relationship<ul> - * <li>1:1 - * <li>1:m - * <li>m:m - * </ul> - * <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 MappedByRelationship - extends Relationship -{ - /** - * Return the (never <code>null</code>) strategy used to configure - * the relationship's "mapped by" strategy. - */ - MappedByRelationshipStrategy getMappedByStrategy(); - - /** - * Return whether the "mapped by" strategy is the - * relationship's current strategy. - */ - boolean strategyIsMappedBy(); - - /** - * Set the relationship's strategy to the "mapped by" strategy. - */ - void setStrategyToMappedBy(); - - /** - * Return whether the specified mapping may own the relationship. - */ - boolean mayBeMappedBy(AttributeMapping mapping); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java deleted file mode 100644 index 370b25e901..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedByRelationshipStrategy.java +++ /dev/null @@ -1,57 +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.core.context; - -/** - * "Mapped by" relationship strategy - * <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. - * - * @see RelationshipMapping - * @see MappedByRelationship - * - * @version 2.2 - * @since 2.2 - */ -public interface MappedByRelationshipStrategy - extends RelationshipStrategy -{ - void initializeFrom(MappedByRelationshipStrategy oldStrategy); - - /** - * String associated with changes to the attribute property of this object - */ - String MAPPED_BY_ATTRIBUTE_PROPERTY = "mappedByAttribute"; //$NON-NLS-1$ - - /** - * Return the name of the attribute that maps the relationship. - */ - String getMappedByAttribute(); - - /** - * Set the name of the attribute that maps the relationship. - */ - void setMappedByAttribute(String attribute); - - /** - * Return the possible attribute names the strategy might use. - */ - Iterable<String> getCandidateMappedByAttributeNames(); - - /** - * Return whether this strategy's relationship is owned by the given other - * relationship mapping - */ - boolean relationshipIsOwnedBy(RelationshipMapping otherMapping); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java deleted file mode 100644 index 6a60964bef..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappedSuperclass.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * 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.3 - * @since 2.0 - */ -public interface MappedSuperclass - extends TypeMapping -{ - IdClassReference getIdClassReference(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java deleted file mode 100644 index e124d37299..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFile.java +++ /dev/null @@ -1,77 +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.core.context; - -import org.eclipse.core.resources.IFolder; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef; -import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * JPA mapping file (typically <code>orm.xml</code>). - * <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.1 - */ -public interface MappingFile - extends XmlFile, PersistentTypeContainer -{ - /** - * Covariant override. - */ - MappingFileRef getParent(); - - /** - * Return the mapping file's root. - * This can be <code>null</code>. - */ - MappingFileRoot getRoot(); - - /** - * Return whether the mapping file exists in the specified folder. - */ - boolean isIn(IFolder folder); - - - // ********** refactoring ********** - - /** - * Create DeleteEdits for deleting references (if any) to the type about to be deleted. - * Return an EmptyIterable if there are not any references to the given type. - */ - Iterable<DeleteEdit> createDeleteTypeEdits(IType type); - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java deleted file mode 100644 index f32ec18b8d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitDefaults.java +++ /dev/null @@ -1,61 +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.core.context; - -/** - * Persistence unit defaults held by a mapping file. - * <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 MappingFilePersistenceUnitDefaults - extends XmlContextNode -{ - /** - * Covariant override. - */ - MappingFilePersistenceUnitMetadata getParent(); - - /** - * Return the access type for all managed classes in the persistence unit, - * unless overridden by a local annotation or XML setting. - */ - AccessType getAccess(); - - /** - * Return the catalog for all database objects referenced in the - * persistence unit, unless overridden by a local annotation or XML setting. - * <p> - * Return the specified catalog if present, otherwise return the - * default catalog as determined by the database connection. - */ - String getCatalog(); - - /** - * Return the schema for all database objects referenced in the - * persistence unit, unless overridden by a local annotation or XML setting. - * <p> - * Return the specified schema if present, otherwise return the - * default schema as determined by the database connection. - */ - String getSchema(); - - /** - * Return all the relationhips in the persistence unit are to be cascade - * persist, unless overridden by a local annotation or XML setting. - */ - boolean isCascadePersist(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java deleted file mode 100644 index 1313b66fbe..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFilePersistenceUnitMetadata.java +++ /dev/null @@ -1,47 +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.core.context; - -/** - * Persistence unit metadata held by a mapping file. - * <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 MappingFilePersistenceUnitMetadata - extends XmlContextNode -{ - /** - * Covariant override. - */ - MappingFileRoot getParent(); - - /** - * Return whether any annotations on the persistent types associated with - * the mapping file's persistence unit are to be ignored. - */ - boolean isXmlMappingMetadataComplete(); - - /** - * Return the persistence unit defaults held by the mapping file. - */ - MappingFilePersistenceUnitDefaults getPersistenceUnitDefaults(); - - /** - * Return whether the mapping file's underlying resource exists. - * If there is a node in the <code>orm.xml</code> file for the - * {@code <persistence-unit-metadata>} element, - * return <code>true</code>; otherwise <code>false</code>. - */ - boolean resourceExists(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java deleted file mode 100644 index 2335a4bd82..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingFileRoot.java +++ /dev/null @@ -1,61 +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.core.context; - -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer; - -/** - * The root of a JPA mapping file. - * <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 MappingFileRoot - extends XmlContextNode, JpaStructureNode, PersistentTypeContainer -{ - /** - * covariant override - */ - MappingFile getParent(); - - /** - * Return the specified access if present, otherwise return the default - * access. - */ - AccessType getAccess(); - - /** - * Return the specified catalog if present, otherwise return the default - * catalog. - */ - String getCatalog(); - - /** - * Return the specified schema if present, otherwise return the default - * schema. - */ - String getSchema(); - - /** - * Return the metadata defined within the mapping file - * <em>for the persistence unit</em>. - * Return <code>null</code> if none exists. - * - * @see MappingFilePersistenceUnitMetadata#resourceExists() - */ - MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java deleted file mode 100644 index b3000326b4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MappingRelationship.java +++ /dev/null @@ -1,54 +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.core.context; - -/** - * Mapping relationship<ul> - * <li>1:1 - * <li>1:m - * <li>m:1 - * <li>m:m - * </ul> - * <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 MappingRelationship - extends Relationship -{ - /** - * Return whether the relationship's mapping is the relationship owner. - * @see RelationshipMapping#isRelationshipOwner() - */ - boolean isOwner(); - - /** - * Return whether the specified mapping owns the relationship. - * @see RelationshipMapping#isOwnedBy(AttributeMapping) - */ - boolean isOwnedBy(RelationshipMapping mapping); - - /** - * Return whether the relationship's mapping is a target foreign key - * relationship. - * A one-to-many mapping with a join column will have the foreign key - * in the target table. - */ - boolean isTargetForeignKey(); - - /** - * Return whether the relationship's mapping can be overridden with an - * association override. - */ - boolean isOverridable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java deleted file mode 100644 index d1b061a319..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/MultiRelationshipMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * Multi-valued relationship (1:m, 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.3 - * @since 2.0 - */ -public interface MultiRelationshipMapping - extends RelationshipMapping, CollectionMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java deleted file mode 100644 index 5b493c1995..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedColumn.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Specified - * <ul> - * <li>column - * <li>join column - * <li>primary key join column - * <li>discriminator column - * <li>order column - * </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.3 - * @since 2.0 - */ -public interface NamedColumn - extends ReadOnlyNamedColumn -{ - void setSpecifiedName(String name); - - void setColumnDefinition(String columnDefinition); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java deleted file mode 100644 index beba80ec44..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedNativeQuery.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * named native query - * <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.0 - */ -public interface NamedNativeQuery - extends Query -{ - // ********** result class ********** - - String getResultClass(); - void setResultClass(String value); - String RESULT_CLASS_PROPERTY = "resultClass"; //$NON-NLS-1$ - - /** - * Return the character to be used for browsing or - * creating the result class {@link org.eclipse.jdt.core.IType IType}. - * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char) - */ - char getResultClassEnclosingTypeSeparator(); - - - // ********** result set mapping ********** - - String getResultSetMapping(); - void setResultSetMapping(String value); - String RESULT_SET_MAPPING_PROPERTY = "resultSetMapping"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java deleted file mode 100644 index 92ac55e44f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/NamedQuery.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * named query - * <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.0 - * @since 2.0 - */ -public interface NamedQuery - extends Query -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java deleted file mode 100644 index b68338b4bf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA 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 2.2 - * @since 2.0 - */ -public interface OneToManyMapping - extends MultiRelationshipMapping -{ - OneToManyRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.java deleted file mode 100644 index 3d7d40dc43..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToManyRelationship.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.core.context; - -/** - * 1:m relationship (mapped by, join table) - * <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 OneToManyRelationship - extends MappedByRelationship, - JoinTableRelationship, - MappingRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java deleted file mode 100644 index a6595c346c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA 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.0 - */ -public interface OneToOneMapping - extends SingleRelationshipMapping -{ - OneToOneRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java deleted file mode 100644 index a3c5019619..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OneToOneRelationship.java +++ /dev/null @@ -1,31 +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.core.context; - -/** - * 1:1 relationship (mapped by, join column, primary key join 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 2.2 - * @since 2.2 - */ -public interface OneToOneRelationship - extends MappedByRelationship, - JoinColumnRelationship, - PrimaryKeyJoinColumnRelationship, - MappingRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.java deleted file mode 100644 index 0707763858..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OptionalMapping.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.core.context; - -/** - * JPA attribute mapping that is optional (e.g. basic, single relationship). - * From the JPA spec: - * <pre> - * Whether the value of the field or property may be null. This is a hint - * and is disregarded for primitive types; it may be used in schema generation. - * </pre> - * 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.0 - */ -public interface OptionalMapping - extends AttributeMapping -{ - boolean isOptional(); - - boolean isDefaultOptional(); - String DEFAULT_OPTIONAL_PROPERTY = "defaultOptional"; //$NON-NLS-1$ - boolean DEFAULT_OPTIONAL = true; - - Boolean getSpecifiedOptional(); - void setSpecifiedOptional(Boolean newSpecifiedOptional); - String SPECIFIED_OPTIONAL_PROPERTY = "specifiedOptional"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java deleted file mode 100644 index 8f2ab3c07f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Orderable.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * Multi-valued (1:m, m:m) relationship mappings support ordering. - * <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 Orderable - extends JpaContextNode -{ - AttributeMapping getParent(); - - String getSpecifiedOrderBy(); - void setSpecifiedOrderBy(String orderBy); - String SPECIFIED_ORDER_BY_PROPERTY = "specifiedOrderBy"; //$NON-NLS-1$ - - boolean isNoOrdering(); - void setNoOrdering(boolean noOrdering); - String NO_ORDERING_PROPERTY = "noOrdering"; //$NON-NLS-1$ - - boolean isPkOrdering(); - void setPkOrdering(boolean pkOrdering); - String PK_ORDERING_PROPERTY = "pkOrdering"; //$NON-NLS-1$ - - boolean isCustomOrdering(); - void setCustomOrdering(boolean customOrdering); - String CUSTOM_ORDERING_PROPERTY = "customOrdering"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java deleted file mode 100644 index b491f2dc0d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java +++ /dev/null @@ -1,217 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.internal.context.BaseColumnTextRangeResolver; -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; -import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver; -import org.eclipse.jpt.jpa.db.Table; - -/** - * attribute or association override 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.0 - * @since 2.3 - */ -public interface OverrideContainer - extends JpaContextNode -{ - /** - * Return the type mapping that contains the override container. - * For example:<ul> - * <li>for an entity, this would be the entity itself - * <li>for an embedded, this would be type mapping where the embedded is - * declared, as opposed to the type mapping the embedded references - * </ul> - */ - TypeMapping getTypeMapping(); - - /** - * Return the type mapping that contains the attributes/associations to - * be overridden; though the type mapping may not <em>directly</em> - * own them (e.g. they may be owned by a supertype mapping). - * For example:<ul> - * <li>for an entity, this would be the entity's supertype mapping - * <li>for an embedded, this would be the embedded's target type mapping - * </ul> - */ - TypeMapping getOverridableTypeMapping(); - - /** - * Return the names of all the attributes that can be overridden - * (i.e. an override must have a name from this list). - * This is usually just all of the overridable names of the overridable - * type mapping. - * @see #getOverridableTypeMapping() - */ - Iterable<String> getAllOverridableNames(); - - /** - * Return whether the specified table cannot be explicitly specified - * as the table for an override's column or join column. - */ - boolean tableNameIsInvalid(String tableName); - - /** - * Return the names of tables that are valid for an override's - * column or join column. - */ - Iterable<String> getCandidateTableNames(); - - /** - * Return the database table for the specified table name. - */ - Table resolveDbTable(String tableName); - - /** - * Return the name of the default table for an override's column or join column. - */ - String getDefaultTableName(); - - JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver); - - JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, BaseColumnTextRangeResolver textRangeResolver); - - - // ********** overrides ********** - - /** - * Return the overrides, both <em>specified</em> and <em>virtual</em>. - */ - ListIterable<? extends ReadOnlyOverride> getOverrides(); - - /** - * Return the number of overrides, both <em>specified</em> and <em>virtual</em>. - */ - int getOverridesSize(); - - /** - * Return the override with the specified name, - * whether <em>specified</em> or <em>virtual</em>. - */ - // TODO look into getting rid of this; - // we should probably use #getSpecifiedOverrideNamed(String) - ReadOnlyOverride getOverrideNamed(String name); - - - // ********** specified overrides ********** - - /** - * Return the <em>specified</em> overrides. The container has no API for - * adding or removing <em>specified</em> overrides. The container's - * <em>virtual</em> overrides are built according to the list of overridable - * attribute names returned by the container's parent. <em>Specified</em> - * overrides can be created via {@link VirtualOverride#convertToSpecified()}. - * <em>Specified</em> overrides can be remvoed via - * {@link Override_#convertToVirtual()}. - */ - ListIterable<? extends Override_> getSpecifiedOverrides(); - String SPECIFIED_OVERRIDES_LIST = "specifiedOverrides"; //$NON-NLS-1$ - - /** - * Return the number of <em>specified</em> overrides. - */ - int getSpecifiedOverridesSize(); - - /** - * Return the <em>specified</em> override at the specified index. - */ - Override_ getSpecifiedOverride(int index); - - /** - * Move the <em>specified</em> override from the source index to the - * target index. - */ - void moveSpecifiedOverride(int targetIndex, int sourceIndex); - - /** - * Return the <em>specified</em> override at the specified index. - */ - Override_ getSpecifiedOverrideNamed(String name); - - /** - * Convert the specified <em>specified</em> override to <em>virtual</em>. - * Return the new override. - */ - VirtualOverride convertOverrideToVirtual(Override_ specifiedOverride); - - - // ********** virtual overrides ********** - - /** - * Return the <em>virtual</em> overrides (i.e. those not <em>specified</em>). - */ - // TODO change to a Iterable instead of ListIterable? - ListIterable<? extends VirtualOverride> getVirtualOverrides(); - String VIRTUAL_OVERRIDES_LIST = "virtualOverrides"; //$NON-NLS-1$ - - /** - * Return the number of <em>virtual</em> overrides. - */ - int getVirtualOverridesSize(); - - /** - * Convert the specified <em>virtual</em> override to <em>specified</em>. - * Return the new override. - */ - Override_ convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** container owner ********** - - interface Owner - { - /** - * @see OverrideContainer#getTypeMapping() - */ - TypeMapping getTypeMapping(); - - /** - * @see OverrideContainer#getOverridableTypeMapping() - */ - TypeMapping getOverridableTypeMapping(); - - /** - * @see OverrideContainer#getAllOverridableNames() - */ - Iterable<String> getAllOverridableNames(); - - /** - * @see OverrideContainer#getDefaultTableName() - */ - String getDefaultTableName(); - - /** - * @see OverrideContainer#tableNameIsInvalid(String) - */ - boolean tableNameIsInvalid(String tableName); - - /** - * @see OverrideContainer#resolveDbTable(String) - */ - org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName); - - /** - * @see OverrideContainer#getCandidateTableNames() - */ - Iterable<String> getCandidateTableNames(); - - JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver); - - JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, BaseColumnTextRangeResolver textRangeResolver); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java deleted file mode 100644 index 83d6803e66..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideRelationship.java +++ /dev/null @@ -1,35 +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.core.context; - -/** - * Association override 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. - * - * @see AssociationOverride - * - * @version 2.3 - * @since 2.3 - */ -public interface OverrideRelationship - extends ReadOnlyOverrideRelationship, - JoinColumnRelationship -{ - void initializeFromVirtual(ReadOnlyOverrideRelationship virtualRelationship); - - void initializeFromVirtualJoinColumnRelationship(ReadOnlyJoinColumnRelationship virtualRelationship); - - void initializeFromVirtualJoinTableRelationship(ReadOnlyJoinTableRelationship virtualRelationship); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java deleted file mode 100644 index efaeabe78d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Override_.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * <em>Specified</em><ul> - * <li>attribute override - * <li>association override - * </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.3 - * @since 2.0 - */ -// the class name "Override" is sorta taken: java.lang.Override -// maybe if it weren't in the java.lang package we would take it on, but... :) -// very little code will directly refer to this interface, so the underscore -// isn't *too* evil... -public interface Override_ - extends ReadOnlyOverride -{ - void setName(String value); - - /** - * Convert the <em>specified</em> override to a <em>virtual</em> override. - * Return the new <em>virtual</em> override. - * @see #isVirtual() - */ - VirtualOverride convertToVirtual(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java deleted file mode 100644 index 930aa0142f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentAttribute.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * Context persistent <em>attribute</em> (field or property). - * <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.0 - */ -public interface PersistentAttribute - extends ReadOnlyPersistentAttribute, AccessHolder -{ - /** - * Set the attribute's mapping. - * If the specified key is <code>null</code>, clear the specified mapping, - * allowing the attribute's mapping to default (if appropriate). - * Return the new mapping (which may be a <em>null</em> mapping). - */ - AttributeMapping setMappingKey(String key); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java deleted file mode 100644 index c2c6d756c7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PersistentType.java +++ /dev/null @@ -1,217 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -import java.util.List; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.wst.validation.internal.provisional.core.IMessage; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; - -/** - * Context persistent type. - * <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.0 - */ -public interface PersistentType - extends JpaContextNode, JpaStructureNode, AccessHolder -{ - // ********** name ********** - - /** - * Return the persistent type's [fully-qualified] name. - * The enclosing type separator is <code>'.'</code>, - * as opposed to <code>'$'</code>. - * @see #getSimpleName() - */ - String getName(); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - /** - * Return the persistent type's simple name. - * @see #getName() - */ - String getSimpleName(); - - - // ********** mapping ********** - - /** - * Return the persistent type's mapping. - * Set the mapping via {@link #setMappingKey(String)}. - */ - TypeMapping getMapping(); - String MAPPING_PROPERTY = "mapping"; //$NON-NLS-1$ - - String getMappingKey(); - - void setMappingKey(String key); - - boolean isMapped(); - - - // ********** attributes ********** - - /** - * Return the persistent type's persistent attributes. - */ - ListIterable<? extends ReadOnlyPersistentAttribute> getAttributes(); - - /** - * Return the number of the persistent type's persistent attributes. - */ - int getAttributesSize(); - - /** - * Return the names of the persistent type's persistent attributes. - */ - Iterable<String> getAttributeNames(); - - /** - * Return all the persistent attributes in the persistent type's - * inheritance hierarchy. - */ - Iterable<ReadOnlyPersistentAttribute> getAllAttributes(); - - /** - * Return the names of all the persistent attributes in the - * persistent type's hierarchy. - */ - Iterable<String> getAllAttributeNames(); - - /** - * Return the persistent attribute with the specified name, - * if it exists locally on the persistent type (as opposed to in its - * inheritance hierarchy). - */ - ReadOnlyPersistentAttribute getAttributeNamed(String attributeName); - - /** - * Resolve and return the persistent attribute with the specified name, if it - * is distinct and exists within the context of the persistent type. - */ - ReadOnlyPersistentAttribute resolveAttribute(String attributeName); - - - // ********** inheritance ********** - - /** - * Return the "super" {@link PersistentType} from the "persistence" - * inheritance hierarchy. - * If the Java inheritance parent is not a {@link PersistentType}, then continue - * up the hierarchy (the JPA spec allows non-persistent types to be part of the hierarchy.) - * Return <code>null</code> if the persistent type is the root persistent type. - * <p> - * Example: - * <pre> - * @Entity - * public abstract class Model {} - * - * public abstract class Animal extends Model {} - * - * @Entity - * public class Cat extends Animal {} - * </pre> - * The "super" persistent type of the <code>Cat</code> persistent type is - * the <code>Model</code> persistent type. The "super" persistent type can - * be either a Java annotated class or declared in the XML files. - */ - PersistentType getSuperPersistentType(); - String SUPER_PERSISTENT_TYPE_PROPERTY = "superPersistentType"; //$NON-NLS-1$ - - /** - * Return the persistent type's "persistence" inheritance hierarchy, - * <em>including</em> the persistent type itself. - * The returned iterator will return elements infinitely if the hierarchy - * has a loop. - */ - Iterable<PersistentType> getInheritanceHierarchy(); - - /** - * Return the persistent type's "persistence" inheritance hierarchy, - * <em>excluding</em> the persistent type itself. - * The returned iterator will return elements infinitely if the hierarchy - * has a loop. - */ - Iterable<PersistentType> getAncestors(); - - - // ********** validation ********** - - /** - * Add to the list of current validation messages - */ - void validate(List<IMessage> messages, IReporter reporter); - - /** - * Return the text range to be used with any validation messages related - * to the persistent type. - */ - TextRange getValidationTextRange(); - - - // ********** misc ********** - - /** - * Return whether the persistent type applies to the - * specified type name qualified with <code>'.'</code>. - */ - boolean isFor(String typeName); - - /** - * Return whether the persistent type resolves to a Java class in the - * specified package fragment. - */ - boolean isIn(IPackageFragment packageFragment); - - - // ********** owner ********** - - /** - * Return the access type that overrides the client persistent type's - * access type; <code>null</code> if there is no such access override. - */ - AccessType getOwnerOverrideAccess(); - - /** - * Return the client persistent type's default access type; - * <code>null</code> if there is no such access default. - */ - AccessType getOwnerDefaultAccess(); - - - // ********** owner interface ********** - - interface Owner - extends JpaContextNode - { - /** - * Return the access type that overrides the client persistent type's - * access type; <code>null</code> if there is no such access override. - */ - AccessType getOverridePersistentTypeAccess(); - - /** - * Return the client persistent type's default access type; - * <code>null</code> if there is no such access default. - */ - AccessType getDefaultPersistentTypeAccess(); - - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java deleted file mode 100644 index a573c26ee5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumn.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * primary key join 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 2.0 - * @since 2.0 - */ -public interface PrimaryKeyJoinColumn - extends BaseJoinColumn, ReadOnlyPrimaryKeyJoinColumn -{ - // combine interfaces -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java deleted file mode 100644 index 5fbedec03c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationship.java +++ /dev/null @@ -1,45 +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.core.context; - -/** - * Primary key join column relationship<ul> - * <li>1:1 - * </ul> - * <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 PrimaryKeyJoinColumnRelationship - extends Relationship -{ - /** - * Return the (never <code>null</code>) strategy used to configure - * the relationship's primary key join column strategy. - */ - PrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy(); - - /** - * Return whether the primary key join column strategy is the - * relationship's current strategy. - */ - boolean strategyIsPrimaryKeyJoinColumn(); - - /** - * Set the relationship's strategy to the primary key join column strategy. - */ - void setStrategyToPrimaryKeyJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java deleted file mode 100644 index 3d450d4dfd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/PrimaryKeyJoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,82 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Primary key join column relationship strategy. - * <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. - * - * @see RelationshipMapping - * @see PrimaryKeyJoinColumnRelationship - * - * @version 2.2 - * @since 2.2 - */ -public interface PrimaryKeyJoinColumnRelationshipStrategy - extends RelationshipStrategy -{ - /** - * Change notification identifier for "primaryKeyJoinColumns" list - */ - String PRIMARY_KEY_JOIN_COLUMNS_LIST = "primaryKeyJoinColumns"; //$NON-NLS-1$ - - /** - * Return the strategy's primary key join columns. - */ - ListIterable<? extends PrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - - /** - * Return the number of primary key join columns. - */ - int getPrimaryKeyJoinColumnsSize(); - - /** - * Return whether the relationship has any primary key join columns. - * (Equivalent to {@link #getPrimaryKeyJoinColumnsSize()} == 0.) - */ - boolean hasPrimaryKeyJoinColumns(); - - /** - * Return the primary key join column at the specified index. - */ - PrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index); - - /** - * Add a primary key join column. - */ - PrimaryKeyJoinColumn addPrimaryKeyJoinColumn(); - - /** - * Add a primary key join column. - */ - PrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index); - - /** - * Remove the specified primary key join column. - */ - void removePrimaryKeyJoinColumn(int index); - - /** - * Remove the specified primary key join column. - */ - void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn); - - /** - * Remove the specified primary key join column. - */ - void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java deleted file mode 100644 index c6829d95c3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import java.util.Arrays; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.java.JavaQuery; -import org.eclipse.jpt.jpa.core.context.orm.OrmQuery; - -/** - * Named and named native queries. - * <p> - * Queries can be defined on<ul> - * <li>Java and <code>orm.xml</code> entities - * <li>Java (<em>only</em>) mapped superclasses - * <li><code>orm.xml</code> entity mappings elements - * </ul> - * <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.0 - */ -public interface Query - extends JpaNamedContextNode<Query> -{ - /** - * TODO use this precedence until adopters protest... - * then move to JpaPlatform - */ - @SuppressWarnings("unchecked") - Iterable<Class<? extends Query>> PRECEDENCE_TYPE_LIST = Arrays.asList( - OrmQuery.class, - JavaQuery.class - ); - - - // ********** query ********** - - String QUERY_PROPERTY = "query"; //$NON-NLS-1$ - - String getQuery(); - - void setQuery(String query); - - - // ********** hints ********** - - String HINTS_LIST = "hints"; //$NON-NLS-1$ - - /** - * Return the query's hints. - */ - ListIterable<? extends QueryHint> getHints(); - - /** - * Return the number of hints. - */ - int getHintsSize(); - - /** - * Add a hint to the query and return the object representing it. - */ - QueryHint addHint(); - - /** - * Add a hint to the query and return the object representing it. - */ - QueryHint addHint(int index); - - /** - * Remove the hint at the index from the query. - */ - void removeHint(QueryHint queryHint); - - /** - * Remove the hint from the query. - */ - void removeHint(int index); - - /** - * Move the hint from the source index to the target index. - */ - void moveHint(int targetIndex, int sourceIndex); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java deleted file mode 100644 index 46ff9ddbc5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryContainer.java +++ /dev/null @@ -1,112 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Container for named queries and/or named native queries. - * Used by entities and the <code>orm.xml</code> - * </code>entity-mappings</code> element. - * <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 QueryContainer - extends JpaContextNode -{ - // ********** named queries ********** - - /** - * Return the container's named queries. - */ - ListIterable<? extends NamedQuery> getNamedQueries(); - - String NAMED_QUERIES_LIST = "namedQueries"; //$NON-NLS-1$ - - /** - * Return the number of named queries. - */ - int getNamedQueriesSize(); - - /** - * Add a new named query to the container and return it. - */ - NamedQuery addNamedQuery(); - - /** - * Add a new named query to the container at the specified index - * and return it. - */ - NamedQuery addNamedQuery(int index); - - /** - * Remove from the container the named query at the specified index. - */ - void removeNamedQuery(int index); - - /** - * Remove the specified named query from the container. - */ - void removeNamedQuery(NamedQuery namedQuery); - - /** - * Move a named query as specified. - */ - void moveNamedQuery(int targetIndex, int sourceIndex); - - - // ********** named native queries ********** - - /** - * Return the container's named native queries. - */ - ListIterable<? extends NamedNativeQuery> getNamedNativeQueries(); - - String NAMED_NATIVE_QUERIES_LIST = "namedNativeQueries"; //$NON-NLS-1$ - - /** - * Return the number of named native queries. - */ - int getNamedNativeQueriesSize(); - - /** - * Add a new named native query to the container and return it. - */ - NamedNativeQuery addNamedNativeQuery(); - - /** - * Add a new named native query to the container at the specified index - * and return it. - */ - NamedNativeQuery addNamedNativeQuery(int index); - - /** - * Remove from the container the named native query at the specified index. - */ - void removeNamedNativeQuery(int index); - - /** - * Remove the specified named native query from the container. - */ - void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery); - - /** - * Move a named native query as specified. - */ - void moveNamedNativeQuery(int targetIndex, int sourceIndex); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java deleted file mode 100644 index 6deee9ec1b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/QueryHint.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * query hint - * <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.0 - */ -public interface QueryHint - extends JpaContextNode -{ - String getName(); - void setName(String name); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - String getValue(); - void setValue(String value); - String VALUE_PROPERTY = "value"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java deleted file mode 100644 index 3cc216ecad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAccessHolder.java +++ /dev/null @@ -1,36 +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.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 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 2.2 - * @since 2.2 - */ -public interface ReadOnlyAccessHolder - extends Model -{ - /** - * Return the access type, whether specified or defaulted. - * This should never return <code>null</code> since at least the default - * will be set. - */ - AccessType getAccess(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java deleted file mode 100644 index 039065c53e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAssociationOverride.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Read-only association override - * <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 ReadOnlyAssociationOverride - extends ReadOnlyOverride -{ - /** - * Return the overridden relationship mapping. - * Return <code>null</code> if it does not exist. This relationship mapping - * will be found in the mapped superclass or embeddable type, not in the - * owning entity - */ - RelationshipMapping getMapping(); - - ReadOnlyOverrideRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java deleted file mode 100644 index f3e0078e3f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyAttributeOverride.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Read-only attribute override. - * <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 ReadOnlyAttributeOverride - extends ReadOnlyOverride -{ - ReadOnlyColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java deleted file mode 100644 index 977672f988..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseColumn.java +++ /dev/null @@ -1,122 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - - -/** - * Read-only - * <ul> - * <li>column - * <li>join column - * </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. - */ -public interface ReadOnlyBaseColumn - extends ReadOnlyNamedColumn -{ - // ********** table ********** - - String getSpecifiedTable(); - String SPECIFIED_TABLE_PROPERTY = "specifiedTable"; //$NON-NLS-1$ - String getDefaultTable(); - String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$ - - - // ********** unique ********** - - /** - * Return the specified unique setting if present, otherwise return the - * default unique setting. - */ - boolean isUnique(); - Boolean getSpecifiedUnique(); - String SPECIFIED_UNIQUE_PROPERTY = "specifiedUnique"; //$NON-NLS-1$ - boolean isDefaultUnique(); - String DEFAULT_UNIQUE_PROPERTY = "defaultUnique"; //$NON-NLS-1$ - boolean DEFAULT_UNIQUE = false; - - - // ********** nullable ********** - - /** - * Return the specified nullable setting if present, otherwise return the - * default nullable setting. - */ - boolean isNullable(); - Boolean getSpecifiedNullable(); - String SPECIFIED_NULLABLE_PROPERTY = "specifiedNullable"; //$NON-NLS-1$ - boolean isDefaultNullable(); - String DEFAULT_NULLABLE_PROPERTY = "defaultNullable"; //$NON-NLS-1$ - boolean DEFAULT_NULLABLE = true; - - - // ********** insertable ********** - - /** - * Return the specified insertable setting if present, otherwise return the - * default insertable setting. - */ - boolean isInsertable(); - Boolean getSpecifiedInsertable(); - String SPECIFIED_INSERTABLE_PROPERTY = "specifiedInsertable"; //$NON-NLS-1$ - boolean isDefaultInsertable(); - String DEFAULT_INSERTABLE_PROPERTY = "defaultInsertable"; //$NON-NLS-1$ - boolean DEFAULT_INSERTABLE = true; - - - // ********** updatable ********** - - /** - * Return the specified updatable setting if present, otherwise return the - * default updatable setting. - */ - boolean isUpdatable(); - Boolean getSpecifiedUpdatable(); - String SPECIFIED_UPDATABLE_PROPERTY = "specifiedUpdatable"; //$NON-NLS-1$ - boolean isDefaultUpdatable(); - String DEFAULT_UPDATABLE_PROPERTY = "defaultUpdatable"; //$NON-NLS-1$ - boolean DEFAULT_UPDATABLE = true; - - - // ********** misc ********** - - boolean tableNameIsInvalid(); - - /** - * Return a list of table names that are valid for this column - */ - Iterable<String> getCandidateTableNames(); - - - // ********** owner ********** - - /** - * Interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides). - */ - interface Owner - extends NamedColumn.Owner - { - /** - * return whether the given table cannot be explicitly specified - * in the column's 'table' element - */ - boolean tableNameIsInvalid(String tableName); - - /** - * Return a list of table names that are valid for this column - */ - Iterable<String> getCandidateTableNames(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java deleted file mode 100644 index b3e0a990aa..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.jpa.db.Table; - -/** - * Read-only - * <ul> - * <li>join column - * <li>primary key join column - * </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. - */ -public interface ReadOnlyBaseJoinColumn - extends ReadOnlyNamedColumn -{ - // ********** referenced column name ********** - - /** - * Return the specified referenced column name if present, - * otherwise return the default referenced column name. - */ - String getReferencedColumnName(); - String getSpecifiedReferencedColumnName(); - String SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY = "specifiedReferencedColumnName"; //$NON-NLS-1$ - String getDefaultReferencedColumnName(); - String DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY = "defaultReferencedColumnName"; //$NON-NLS-1$ - - - // ********** misc ********** - - /** - * Return the wrapper for the referenced column datasource table - */ - Table getReferencedColumnDbTable(); - - boolean referencedColumnIsResolved(); - - // TODO bjv rename? - boolean isVirtual(); - - boolean isDefault(); - - - // ********** owner ********** - - /** - * Interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides). - */ - interface Owner - extends ReadOnlyNamedColumn.Owner - { - /** - * Return the wrapper for the datasource table for the referenced column - */ - Table getReferencedColumnDbTable(); - - boolean joinColumnIsDefault(ReadOnlyBaseJoinColumn joinColumn); - - /** - * Return the number of join columns in the owner's list the join - * column belongs to. - */ - int getJoinColumnsSize(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java deleted file mode 100644 index 1ea60e1b64..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyColumn.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * Read-only 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 ReadOnlyColumn - extends ReadOnlyBaseColumn -{ - // ********** length ********** - - /** - * Return the specified length if present, otherwise return the default length. - */ - int getLength(); - Integer getSpecifiedLength(); - String SPECIFIED_LENGTH_PROPERTY = "specifiedLength"; //$NON-NLS-1$ - int getDefaultLength(); - String DEFAULT_LENGTH_PROPERTY = "defaultLength"; //$NON-NLS-1$ - int DEFAULT_LENGTH = 255; - - - // ********** precision ********** - - /** - * Return the specified precision if present, otherwise return the default precision. - */ - int getPrecision(); - Integer getSpecifiedPrecision(); - String SPECIFIED_PRECISION_PROPERTY = "specifiedPrecision"; //$NON-NLS-1$ - int getDefaultPrecision(); - String DEFAULT_PRECISION_PROPERTY = "defaultPrecision"; //$NON-NLS-1$ - int DEFAULT_PRECISION = 0; - - - // ********** scale ********** - - /** - * Return the specified scale if present, otherwise return the default scale. - */ - int getScale(); - Integer getSpecifiedScale(); - String SPECIFIED_SCALE_PROPERTY = "specifiedScale"; //$NON-NLS-1$ - int getDefaultScale(); - String DEFAULT_SCALE_PROPERTY = "defaultScale"; //$NON-NLS-1$ - int DEFAULT_SCALE = 0; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java deleted file mode 100644 index a03dbde4d5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumn.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Read-only join 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 ReadOnlyJoinColumn - extends ReadOnlyBaseJoinColumn, ReadOnlyBaseColumn -{ - /** - * Interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides). - */ - interface Owner - extends ReadOnlyBaseJoinColumn.Owner, ReadOnlyBaseColumn.Owner - { - /** - * The target of the relationship will usually be the target entity. - * In the case of a target foreign key relationship the source and target - * are swapped. - */ - Entity getRelationshipTarget(); - - /** - * return the join column's attribute name - */ - String getAttributeName(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java deleted file mode 100644 index bce23660f0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationship.java +++ /dev/null @@ -1,53 +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.core.context; - -/** - * Join column relationship<ul> - * <li>1:1 - * <li>1:m - * <li>m:1 - * <li>association override - * </ul> - * <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. - * - * @see RelationshipMapping - * @see Relationship - * @see JoinColumn - */ -public interface ReadOnlyJoinColumnRelationship - extends ReadOnlyRelationship -{ - /** - * Return the (never <code>null</code>) strategy used to configure - * the relationship's join column strategy. - */ - ReadOnlyJoinColumnRelationshipStrategy getJoinColumnStrategy(); - - /** - * Return whether the join column strategy is the - * relationship's current strategy. - */ - boolean strategyIsJoinColumn(); - - /** - * Return whether this relationship may potentially have a default join - * column. For example, a 1-1 mapping may have a default join column - * if it does not specify a "mapped by" attribute or a join table; - * but a 1-M mapping does not support a default join column in any - * situation. - */ - boolean mayHaveDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java deleted file mode 100644 index c29e1f8e7f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,110 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - - -/** - * Read-only join column relationship strategy. - * <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. - * - * @see ReadOnlyAssociationOverride - * @see JoinColumnRelationship - */ -public interface ReadOnlyJoinColumnRelationshipStrategy - extends ReadOnlyRelationshipStrategy -{ - /** - * The source of the relationship is usually the owning type mapping. - * In the case of a target foreign key relationship the source and target - * are swapped. - * @see #isTargetForeignKey() - */ - TypeMapping getRelationshipSource(); - - /** - * The target of the relationship usually is the target entity. - * In the case of a target foreign key relationship the source and target - * are swapped. - * @see #isTargetForeignKey() - */ - TypeMapping getRelationshipTarget(); - - /** - * Return whether this relationship is a target foreign key relationship. - * A one-to-many mapping with a join column will have the foreign key - * in the target table. - */ - boolean isTargetForeignKey(); - - - // ********** join columns ********** - - /** - * Return the join columns whether specified or default. - */ - ListIterable<? extends ReadOnlyJoinColumn> getJoinColumns(); - - /** - * Return the number of join columns, whether specified and default. - */ - int getJoinColumnsSize(); - - - // ********** specified join columns ********** - - /** - * Change notification identifier for "specifiedJoinColumns" list - */ - String SPECIFIED_JOIN_COLUMNS_LIST = "specifiedJoinColumns"; //$NON-NLS-1$ - - /** - * Return the specified join columns. - */ - ListIterable<? extends ReadOnlyJoinColumn> getSpecifiedJoinColumns(); - - /** - * Return the number of specified join columns. - */ - int getSpecifiedJoinColumnsSize(); - - /** - * Return whether the strategy has any specified join columns. - * (Equivalent to {@link #getSpecifiedJoinColumnsSize()} != 0.) - */ - boolean hasSpecifiedJoinColumns(); - - /** - * Return the specified join column at the specified index. - */ - ReadOnlyJoinColumn getSpecifiedJoinColumn(int index); - - - // ********** default join column ********** - - /** - * Change notification identifier for "defaultJoinColumn" property - */ - String DEFAULT_JOIN_COLUMN_PROPERTY = "defaultJoinColumn"; //$NON-NLS-1$ - - /** - * Return the default join column. If there are specified join - * columns, there is no default join column. There are also - * times that there may be no default join column even if there are no - * specified join columns. - */ - ReadOnlyJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java deleted file mode 100644 index b356f98499..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTable.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Used by association overrides. - * <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 ReadOnlyJoinTable - extends ReadOnlyReferenceTable -{ - ReadOnlyJoinTableRelationshipStrategy getParent(); - - RelationshipMapping getRelationshipMapping(); - - - // ********** inverse join columns ********** - - /** - * Return the join table's inverse join columns, whether specified or default. - */ - ListIterable<? extends ReadOnlyJoinColumn> getInverseJoinColumns(); - - /** - * Return the number of inverse join columns, whether specified or default. - */ - int getInverseJoinColumnsSize(); - - /** - * Return the specified inverse join columns. - */ - ListIterable<? extends ReadOnlyJoinColumn> getSpecifiedInverseJoinColumns(); - String SPECIFIED_INVERSE_JOIN_COLUMNS_LIST = "specifiedInverseJoinColumns"; //$NON-NLS-1$ - - /** - * Return the number of specified inverse join columns. - */ - int getSpecifiedInverseJoinColumnsSize(); - - /** - * Return whether the join table has specified inverse join columns. - */ - boolean hasSpecifiedInverseJoinColumns(); - - /** - * Return the specified inverse join column at the specified index. - */ - ReadOnlyJoinColumn getSpecifiedInverseJoinColumn(int index); - - /** - * Return the default inverse join column or null. A default inverse join column - * only exists if there are no specified inverse join columns. - */ - ReadOnlyJoinColumn getDefaultInverseJoinColumn(); - String DEFAULT_INVERSE_JOIN_COLUMN = "defaultInverseJoinColumn"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java deleted file mode 100644 index 5e09f3e852..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationship.java +++ /dev/null @@ -1,50 +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.core.context; - -/** - * Join table relationship<ul> - * <li>1:1 (JPA 2.0) - * <li>1:m - * <li>m:1 (JPA 2.0) - * <li>m:m - * <li>association override (JPA 2.0) - * </ul> - * <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 ReadOnlyJoinTableRelationship - extends ReadOnlyRelationship -{ - /** - * Return the (never <code>null</code>) strategy used to configure - * the relationship's join table strategy. - */ - ReadOnlyJoinTableRelationshipStrategy getJoinTableStrategy(); - - /** - * Return whether the join table strategy is the - * relationship's current strategy. - */ - boolean strategyIsJoinTable(); - - /** - * Return whether this relationship may potentially have a default join - * table. For example, a M-M mapping may have a default join table - * if it does not specify a "mapped by" attribute or a join table; - * but a M-1 mapping does not support a default join table in any - * situation. - */ - boolean mayHaveDefaultJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java deleted file mode 100644 index 3a35c3addf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java +++ /dev/null @@ -1,52 +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.core.context; - -import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver; -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; - -/** - * Read-only join table relationship strategy. - * <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. - * - * @see ReadOnlyAssociationOverride - * @see JoinTableRelationship - */ -public interface ReadOnlyJoinTableRelationshipStrategy - extends ReadOnlyRelationshipStrategy -{ - /** - * Change notification identifier for "joinTable" property - */ - String JOIN_TABLE_PROPERTY = "joinTable"; //$NON-NLS-1$ - - /** - * Return the strategy's join table. This will be the - * specified or default join table if one is specified or a default - * join table applies, otherwise <code>null</code>. - */ - ReadOnlyJoinTable getJoinTable(); - - /** - * Return the default name of the strategy's join table - */ - String getJoinTableDefaultName(); - - boolean validatesAgainstDatabase(); - - JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver); - - JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java deleted file mode 100644 index 593cfd293d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; -import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver; -import org.eclipse.jpt.jpa.db.Table; - -/** - * Read-only - * <ul> - * <li>column - * <li>join column - * <li>primary key join column - * <li>discriminator column - * <li>order column - * </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. - */ -public interface ReadOnlyNamedColumn - extends JpaContextNode -{ - // ********** name ********** - - /** - * Return the specified name if present, otherwise return the default - * name. - */ - String getName(); - String getSpecifiedName(); - String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$ - String getDefaultName(); - String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$ - - - // ********** table ********** - - /** - * Return the name of the column's table. A column that does not have a - * <em>specified</em> table still has a table (as determined by - * the column's owner). - */ - String getTable(); - - - // ********** column definition ********** - - String getColumnDefinition(); - String COLUMN_DEFINITION_PROPERTY = "columnDefinition"; //$NON-NLS-1$ - - - // ********** database stuff ********** - - /** - * Return the column's datasource table. - */ - Table getDbTable(); - - /** - * Return whether the column is found on the datasource. - */ - boolean isResolved(); - - - // ********** owner ********** - - /** - * Interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides). - */ - interface Owner - { - /** - * Return the type mapping containing the column. - */ - TypeMapping getTypeMapping(); - - /** - * Return the name of the table which the column belongs to by default. - */ - String getDefaultTableName(); - - /** - * Return the default column name. - */ - String getDefaultColumnName(); - - /** - * Return the database table for the specified table name. - */ - Table resolveDbTable(String tableName); - - JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java deleted file mode 100644 index 8b5e26784d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.jpa.core.internal.context.BaseColumnTextRangeResolver; -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; -import org.eclipse.jpt.jpa.db.Table; - -/** - * Read-only (<em>specified</em> or <em>virtual</em>)<ul> - * <li>attribute override - * <li>association override - * </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. - */ -public interface ReadOnlyOverride - extends JpaContextNode -{ - String getName(); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - /** - * Return <code>true</code> if the override is not explicitly specified on - * the override's parent (i.e. it occurs by default); return <code>false</code> - * if the override is explicitly specified on the override's parent. - * - * @see Override_#convertToVirtual() - * @see VirtualOverride#convertToSpecified() - */ - // TODO bjv rename? - boolean isVirtual(); - - /** - * @see OverrideContainer#getTypeMapping() - */ - TypeMapping getTypeMapping(); - - /** - * Return whether the specified table cannot be explicitly specified - * as the table for the override's column or join column. - */ - boolean tableNameIsInvalid(String tableName); - - /** - * Return the names of tables that are valid for the override's - * column or join column. - */ - Iterable<String> getCandidateTableNames(); - - /** - * Return the database table for the specified table name. - */ - Table resolveDbTable(String tableName); - - /** - * Return the name of the default table for the override's column or join column. - */ - String getDefaultTableName(); - - JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, BaseColumnTextRangeResolver textRangeResolver); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java deleted file mode 100644 index 6889075443..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java +++ /dev/null @@ -1,59 +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.core.context; - -import org.eclipse.jpt.jpa.core.internal.context.BaseColumnTextRangeResolver; -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; -import org.eclipse.jpt.jpa.db.Table; - -/** - * Read-only association override 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. - * - * @see AssociationOverride - */ -public interface ReadOnlyOverrideRelationship - extends ReadOnlyJoinColumnRelationship -{ - String getAttributeName(); - - /** - * @see ReadOnlyOverride#getTypeMapping() - */ - TypeMapping getTypeMapping(); - - /** - * Return whether the specified table cannot be explicitly specified - * as the table for the relationship's join column. - */ - boolean tableNameIsInvalid(String tableName); - - /** - * Return the names of tables that are valid for the relationship's - * join column. - */ - Iterable<String> getCandidateTableNames(); - - /** - * Return the database table for the specified table name. - */ - Table resolveDbTable(String tableName); - - String getDefaultTableName(); - - JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, BaseColumnTextRangeResolver textRangeResolver); - - void initializeOnSpecified(OverrideRelationship specifiedRelationship); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java deleted file mode 100644 index 2ea0af3151..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPersistentAttribute.java +++ /dev/null @@ -1,96 +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.core.context; - -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; - -/** - * Read-only context persistent <em>attribute</em> (field or property). - * <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 ReadOnlyPersistentAttribute - extends JpaContextNode, JpaStructureNode, ReadOnlyAccessHolder -{ - // ********** name ********** - - String getName(); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - - // ********** mapping ********** - - /** - * Return the attribute's mapping. This is never <code>null</code> - * (although, it may be a <em>null</em> mapping). - * Set the mapping via {@link PersistentAttribute#setMappingKey(String)}. - */ - AttributeMapping getMapping(); - String MAPPING_PROPERTY = "mapping"; //$NON-NLS-1$ - - /** - * Return the attribute's mapping key. - */ - String getMappingKey(); - - /** - * Return the key for the attribute's default mapping. - * This can be <code>null</code> (e.g. for <em>specified</em> - * <code>orm.xml</code> attributes). - * @see AttributeMapping#isDefault() - */ - String getDefaultMappingKey(); - String DEFAULT_MAPPING_KEY_PROPERTY = "defaultMappingKey"; //$NON-NLS-1$ - - - // ********** misc ********** - - /** - * Return the persistent type that owns (declares) the attribute. - */ - PersistentType getOwningPersistentType(); - - /** - * Return the attribute's owning persistent type's mapping (as opposed to - * the attribute's target type's mapping). - */ - TypeMapping getOwningTypeMapping(); - - /** - * Return the resolved, qualified name of the attribute's type - * (e.g. <code>"java.util.Collection"</code> or <code>"byte</code>[]"). - * Return <code>null</code> if the attribute's type can not be resolved. - * If the type is an array, this name will include the appropriate number - * of bracket pairs. - * This name will not include the type's generic type arguments - * (e.g. <code>"java.util.Collection<java.lang.String>"</code> will only return - * <code>"java.util.Collection"</code>). - */ - String getTypeName(); - - /** - * If the attribute is mapped to a primary key column, return the - * column's name, otherwise return <code>null</code>. - */ - String getPrimaryKeyColumnName(); - - /** - * Return whether the attribute has a textual representation - * in its underlying resource. - */ - boolean isVirtual(); - - JavaPersistentAttribute getJavaPersistentAttribute(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java deleted file mode 100644 index 4f41aa63b7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyPrimaryKeyJoinColumn.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * Read-only primary key join 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 ReadOnlyPrimaryKeyJoinColumn - extends ReadOnlyBaseJoinColumn -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java deleted file mode 100644 index 23e0917bb2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyReferenceTable.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Read-only reference table (i.e. a table that joins with one other table, - * as opposed to a "join table" that joins with two other tables)<ul> - * <li>join table - * <li>collection table - * </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. - */ -public interface ReadOnlyReferenceTable - extends ReadOnlyTable -{ - // TODO is this method necessary? - PersistentAttribute getPersistentAttribute(); - - - // ********** join columns ********** - - /** - * Return the reference table's join columns, whether specified or default. - */ - ListIterable<? extends ReadOnlyJoinColumn> getJoinColumns(); - - /** - * Return the number of join columns, whether specified or default. - */ - int getJoinColumnsSize(); - - /** - * Return the reference table's specified join columns. - */ - ListIterable<? extends ReadOnlyJoinColumn> getSpecifiedJoinColumns(); - String SPECIFIED_JOIN_COLUMNS_LIST = "specifiedJoinColumns"; //$NON-NLS-1$ - - /** - * Return the number of specified join columns. - */ - int getSpecifiedJoinColumnsSize(); - - /** - * Return whether the reference table has specified join columns. - */ - boolean hasSpecifiedJoinColumns(); - - /** - * Return the specified join column at the specified index. - */ - ReadOnlyJoinColumn getSpecifiedJoinColumn(int index); - - /** - * Return the default join column or <code>null</code>. - * A default join column only exists if there are no specified join columns. - */ - ReadOnlyJoinColumn getDefaultJoinColumn(); - String DEFAULT_JOIN_COLUMN_PROPERTY = "defaultJoinColumn"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java deleted file mode 100644 index aa7b27f25b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationship.java +++ /dev/null @@ -1,74 +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.core.context; - -/** - * A relationship contains the settings describing how entities are related - * in a {@link RelationshipMapping} or {@link AssociationOverride}:<ul> - * <li>join column - * <li>join table - * <li>"mapped by" - * <li>primary key join column - * </ul> - * Supported mappings:<ul> - * <li>1:1 - * <li>1:m - * <li>m:1 - * <li>m:m - * </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. - * - * @see RelationshipMapping - * @see AssociationOverride - */ -public interface ReadOnlyRelationship - extends JpaContextNode -{ - /** - * Return the relationship's mapping; which for a mapping relationship is - * the relationship's parent, but in the case of an override is the - * overridden mapping (from a superclass or embeddable type). - */ - RelationshipMapping getMapping(); - - /** - * Return the type mapping that contains the relationship's mapping or - * override. - */ - TypeMapping getTypeMapping(); - - /** - * Return the entity that contains the relationship's mapping or override. - * This is just a convenience method that calls {@link #getTypeMapping()} - * and returns <code>null</code> if the result is not an {@link Entity}. - */ - Entity getEntity(); - - /** - * String associated with changes to the predominant strategy property - */ - final static String STRATEGY_PROPERTY = "strategy"; //$NON-NLS-1$ - - /** - * Return the current strategy, this is never <code>null</code>. - */ - ReadOnlyRelationshipStrategy getStrategy(); - - /** - * Return whether the the relationship is virtual. - */ - boolean isVirtual(); - - void initializeOn(Relationship newRelationship); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java deleted file mode 100644 index 39b22c7e01..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyRelationshipStrategy.java +++ /dev/null @@ -1,44 +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.core.context; - -/** - * Strategy describing how two entities are related, either for a - * {@link RelationshipMapping} or an {@link AssociationOverride}:<ul> - * <li>join column - * <li>join table - * <li>"mapped by" - * <li>primary key join column - * </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. - * - * @see RelationshipMapping - * @see ReadOnlyAssociationOverride - * @see ReadOnlyRelationship - */ -public interface ReadOnlyRelationshipStrategy - extends JpaContextNode -{ - /** - * Return the strategy's relationship. - */ - ReadOnlyRelationship getRelationship(); - - /** - * Return the table name associated with the strategy's columns. - * The join table name, for instance, or in the case of a bi-directional - * relationship, the table of the owning relationship. - */ - String getTableName(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java deleted file mode 100644 index b491f4ac37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlySecondaryTable.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Read-only entity secondary table - * <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 ReadOnlySecondaryTable - extends ReadOnlyTable -{ - public Entity getParent(); - - /** - * Return whether the secondary table is part of an <code>orm.xml</code> - * entity but is specified only in the entity's Java annotations (as - * opposed to explicitly in the <code>orm.xml</code>). - */ - boolean isVirtual(); - - - // ********** primary key join columns ********** - - /** - * Return the secondary table's primary key join columns, - * whether specified or default. - */ - ListIterable<? extends ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - - /** - * Return the number of primary key join columns, - * whether specified or default. - */ - int getPrimaryKeyJoinColumnsSize(); - - - // ********** specified primary key join columns ********** - - /** - * Return the specified primary key join columns. - */ - ListIterable<? extends ReadOnlyPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - String SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST = "specifiedPrimaryKeyJoinColumns"; //$NON-NLS-1$ - - /** - * Return the number of specified primary key join columns. - */ - int getSpecifiedPrimaryKeyJoinColumnsSize(); - - - // ********** default primary key join columns ********** - - /** - * Return the default primary key join column or null. A default primary - * key join column only exists if there are no specified primary key join - * columns. - */ - ReadOnlyPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); - String DEFAULT_PRIMARY_KEY_JOIN_COLUMN = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java deleted file mode 100644 index 43a793961a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; -import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver; -import org.eclipse.jpt.jpa.db.Catalog; -import org.eclipse.jpt.jpa.db.Schema; -import org.eclipse.jpt.jpa.db.SchemaContainer; - -/** - * Read-only table - * <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 ReadOnlyTable - extends JpaContextNode -{ - // ********** name ********** - - /** - * Return the specified name if present, otherwise return the default - * name. - */ - String getName(); - String getSpecifiedName(); - String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$ - String getDefaultName(); - String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$ - - /** - * Return whether the table can be resolved to a table on the database. - */ - boolean isResolved(); - - /** - * Return the corresponding database table. - */ - org.eclipse.jpt.jpa.db.Table getDbTable(); - - - // ********** schema ********** - - /** - * Return the specified schema if present, otherwise return the default - * schema. - */ - String getSchema(); - String getSpecifiedSchema(); - String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$ - String getDefaultSchema(); - String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$ - - /** - * Return whether the table's schema can be resolved to a schema on the - * database. - */ - boolean schemaIsResolved(); - - /** - * Return the corresponding database schema. - */ - Schema getDbSchema(); - - - // ********** catalog ********** - - /** - * Return the specified catalog if present, otherwise return the default - * catalog. - */ - String getCatalog(); - String getSpecifiedCatalog(); - String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$ - String getDefaultCatalog(); - String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$ - - /** - * Return whether the table has a catalog and it can be resolved to a - * catalog on the database. - */ - boolean catalogIsResolved(); - - /** - * Return the corresponding database catalog. - */ - Catalog getDbCatalog(); - - - // ********** unique constraints ********** - - ListIterable<? extends ReadOnlyUniqueConstraint> getUniqueConstraints(); - String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$ - int getUniqueConstraintsSize(); - ReadOnlyUniqueConstraint getUniqueConstraint(int index); - - - // ********** misc ********** - - /** - * Return the corresponding database schema container (catalog or database). - */ - SchemaContainer getDbSchemaContainer(); - - /** - * Return whether the table is validated against a live database connection. - */ - boolean validatesAgainstDatabase(); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner { - JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java deleted file mode 100644 index 74e130a620..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyUniqueConstraint.java +++ /dev/null @@ -1,49 +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.core.context; - -/** - * Read-only database unique constraint - * <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 ReadOnlyUniqueConstraint - extends JpaContextNode -{ - /** - * Return the unique constraint's column names. - */ - Iterable<String> getColumnNames(); - String COLUMN_NAMES_LIST = "columnNames"; //$NON-NLS-1$ - - /** - * Return the number of column names in the unique constraint. - */ - int getColumnNamesSize(); - - /** - * Return the column name at the specified index. - */ - String getColumnName(int index); - - - // ********** owner ********** - - /** - * All containers must implement this interface. - */ - interface Owner { - Iterable<String> getCandidateUniqueConstraintColumnNames(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java deleted file mode 100644 index ebda45d015..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReferenceTable.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Reference table (i.e. a table that joins with one other table, - * as opposed to a "join table" that joins with two other tables)<ul> - * <li>join table - * <li>collection table - * </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.3 - * @since 2.3 - */ -public interface ReferenceTable - extends Table, ReadOnlyReferenceTable -{ - // ********** join columns ********** - - /** - * Convert the reference table's default join column to a specified join column. - */ - void convertDefaultJoinColumnToSpecified(); - - ListIterable<? extends JoinColumn> getJoinColumns(); - - ListIterable<? extends JoinColumn> getSpecifiedJoinColumns(); - - JoinColumn getSpecifiedJoinColumn(int index); - - /** - * Add and return a specified join column to the reference table. - */ - JoinColumn addSpecifiedJoinColumn(); - - /** - * Add and return a specified join column to the reference table. - */ - JoinColumn addSpecifiedJoinColumn(int index); - - /** - * Remove the join column at the specified index from the reference table. - */ - void removeSpecifiedJoinColumn(int index); - - /** - * Remove the specified join column from the reference table. - */ - void removeSpecifiedJoinColumn(JoinColumn joinColumn); - - /** - * Move the join column at the specified source index to the - * specified target index. - */ - void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex); - - JoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java deleted file mode 100644 index 53b2c5b4d9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Relationship.java +++ /dev/null @@ -1,42 +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.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. - * - * @see RelationshipMapping - * @see AssociationOverride - * - * @version 2.3 - * @since 2.2 - */ -public interface Relationship - extends ReadOnlyRelationship -{ - RelationshipStrategy getStrategy(); - - - // ********** conversions ********** - - void initializeFrom(ReadOnlyRelationship oldRelationship); - - void initializeFromMappedByRelationship(MappedByRelationship oldRelationship); - - void initializeFromJoinColumnRelationship(ReadOnlyJoinColumnRelationship oldRelationship); - - void initializeFromJoinTableRelationship(ReadOnlyJoinTableRelationship oldRelationship); - - // we only have a single "client" of the primary key relationship (1:1 mapping) -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java deleted file mode 100644 index 16cf97465b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipMapping.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA 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.3 - * @since 2.0 - */ -public interface RelationshipMapping - extends FetchableMapping -{ - /** - * Return the meta-information used to populate the entities of the - * relationship - */ - MappingRelationship getRelationship(); - - /** - * Return the relationship owner or null if this is the owning side - * or it is a unidirectional mapping. - */ - RelationshipMapping getRelationshipOwner(); - - - // **************** target entity ************************************** - - String getTargetEntity(); - - String getSpecifiedTargetEntity(); - void setSpecifiedTargetEntity(String value); - String SPECIFIED_TARGET_ENTITY_PROPERTY = "specifiedTargetEntity"; //$NON-NLS-1$ - - String getDefaultTargetEntity(); - String DEFAULT_TARGET_ENTITY_PROPERTY = "defaultTargetEntity"; //$NON-NLS-1$ - - Entity getResolvedTargetEntity(); - - /** - * Return all attribute names on the target entity, provided target entity - * resolves - */ - Iterable<String> getAllTargetEntityAttributeNames(); - - /** - * Return the char to be used for browsing or creating the target entity IType. - * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char) - */ - char getTargetEntityEnclosingTypeSeparator(); - - // **************** cascade ************************************** - - Cascade getCascade(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.java deleted file mode 100644 index de6411800c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/RelationshipStrategy.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.core.context; - -import org.eclipse.jpt.jpa.db.Table; - -/** - * Strategy describing how two entities are joined, either for a - * {@link RelationshipMapping} or an {@link AssociationOverride}:<ul> - * <li>join column - * <li>join table - * <li>"mapped by" - * <li>primary key join column - * </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. - * - * @see RelationshipMapping - * @see AssociationOverride - * @see Relationship - * - * @version 2.3 - * @since 2.2 - */ -public interface RelationshipStrategy - extends ReadOnlyRelationshipStrategy -{ - Relationship getRelationship(); - - /** - * Add this strategy to the relationship. - */ - void addStrategy(); - - /** - * Remove this strategy from the relationship. - */ - void removeStrategy(); - - /** - * Return whether the relationship's mapping can be overridden with an - * association override. - */ - boolean isOverridable(); - - /** - * Return the database table for the specified table name. - */ - Table resolveDbTable(String tableName); - - /** - * Return whether the specified table cannot be explicitly specified - * in the column's <code>table</code> element. - */ - boolean tableNameIsInvalid(String tableName); - - /** - * Return a message description used when the column's table is not valid - * in this context. This will be passed in as a parameter to a validation - * message. Here is an example where the description is what is returned - * by the implementation: - * <p>location: - * Table "table name" for map key column "column name" - * <p>description: - * does not match join table - */ - String getColumnTableNotValidDescription(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java deleted file mode 100644 index 9c91492b04..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SecondaryTable.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * entity secondary table - * <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.0 - */ -public interface SecondaryTable - extends Table, ReadOnlySecondaryTable -{ - ListIterable<? extends PrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<? extends PrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - PrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); - - /** - * Add a specified primary key join column to the secondary table. - * Return the newly-created primary key join column. - */ - PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(); - - /** - * Add a specified primary key join column to the secondary table. - * Return the newly-created primary key join column. - */ - PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index); - - /** - * Remove the specified primary key join column at the specified index from - * the secondary table. - */ - void removeSpecifiedPrimaryKeyJoinColumn(int index); - - /** - * Remove the specified primary key join column from the secondary table. - */ - void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn pkJoinColumn); - - /** - * Move the specified primary key join column from the specified source - * index to the specified target index. - */ - void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java deleted file mode 100644 index fd164b1e86..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SequenceGenerator.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * sequence generator - * <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.0 - */ -public interface SequenceGenerator - extends Generator -{ - int DEFAULT_INITIAL_VALUE = 1; - - - // ********** sequence name ********** - - /** - * Return the specified sequence name if present, otherwise return the - * default sequence name. - */ - String getSequenceName(); - String getSpecifiedSequenceName(); - void setSpecifiedSequenceName(String value); - String SPECIFIED_SEQUENCE_NAME_PROPERTY = "specifiedSequenceName"; //$NON-NLS-1$ - String getDefaultSequenceName(); - String DEFAULT_SEQUENCE_NAME_PROPERTY = "defaultSequenceName"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java deleted file mode 100644 index cc2323fdcd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/SingleRelationshipMapping.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -/** - * JPA single relationship (m:1, 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.0 - */ -public interface SingleRelationshipMapping - extends RelationshipMapping, OptionalMapping -{ - FetchType DEFAULT_FETCH_TYPE = FetchType.EAGER; -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java deleted file mode 100644 index f25f804419..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Table.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * <ul> - * <li>table - * <li>secondary table - * <li>join table - * <li>collection table - * </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.2 - * @since 2.0 - */ -public interface Table - extends ReadOnlyTable -{ - void setSpecifiedName(String value); - - void setSpecifiedSchema(String value); - - void setSpecifiedCatalog(String value); - - ListIterable<? extends UniqueConstraint> getUniqueConstraints(); - UniqueConstraint getUniqueConstraint(int index); - UniqueConstraint addUniqueConstraint(); - UniqueConstraint addUniqueConstraint(int index); - void removeUniqueConstraint(int index); - void removeUniqueConstraint(UniqueConstraint uniqueConstraint); - void moveUniqueConstraint(int targetIndex, int sourceIndex); - - /** - * Return whether the table is specified in the - * (Java or XML) resource. - */ - boolean isSpecifiedInResource(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java deleted file mode 100644 index 13a2fad455..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TableGenerator.java +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -import org.eclipse.jpt.jpa.db.Table; - -/** - * table generator - * <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.0 - */ -public interface TableGenerator - extends Generator -{ - int DEFAULT_INITIAL_VALUE = 0; - - - // ********** table ********** - - /** - * Return the specified table if present, otherwise return the default - * table. - */ - String getTable(); - String getSpecifiedTable(); - void setSpecifiedTable(String value); - String SPECIFIED_TABLE_PROPERTY = "specifiedTable"; //$NON-NLS-1$ - String getDefaultTable(); - String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$ - - - // ********** schema ********** - - /** - * Return the specified schema if present, otherwise return the default - * schema. - */ - String getSchema(); - String getSpecifiedSchema(); - void setSpecifiedSchema(String value); - String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$ - String getDefaultSchema(); - String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$ - - - // ********** catalog ********** - - /** - * Return the specified catalog if present, otherwise return the default - * catalog. - */ - String getCatalog(); - String getSpecifiedCatalog(); - void setSpecifiedCatalog(String value); - String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$ - String getDefaultCatalog(); - String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$ - - - // ********** primary key column name ********** - - /** - * Return the specified primary key colum name if present, otherwise return - * the default primary key colum name. - */ - String getPkColumnName(); - String getSpecifiedPkColumnName(); - void setSpecifiedPkColumnName(String value); - String SPECIFIED_PK_COLUMN_NAME_PROPERTY = "specifiedPkColumnName"; //$NON-NLS-1$ - String getDefaultPkColumnName(); - String DEFAULT_PK_COLUMN_NAME_PROPERTY = "defaultPkColumnName"; //$NON-NLS-1$ - - - // ********** value column name ********** - - /** - * Return the specified value colum name if present, otherwise return - * the default value colum name. - */ - String getValueColumnName(); - String getSpecifiedValueColumnName(); - void setSpecifiedValueColumnName(String value); - String SPECIFIED_VALUE_COLUMN_NAME_PROPERTY = "specifiedValueColumnName"; //$NON-NLS-1$ - String getDefaultValueColumnName(); - String DEFAULT_VALUE_COLUMN_NAME_PROPERTY = "defaultValueColumnName"; //$NON-NLS-1$ - - - // ********** primary key column value ********** - - /** - * Return the specified primary key colum value if present, otherwise return - * the default primary key colum value. - */ - String getPkColumnValue(); - String getSpecifiedPkColumnValue(); - void setSpecifiedPkColumnValue(String value); - String SPECIFIED_PK_COLUMN_VALUE_PROPERTY = "specifiedPkColummValue"; //$NON-NLS-1$ - String getDefaultPkColumnValue(); - String DEFAULT_PK_COLUMN_VALUE_PROPERTY = "defaultPkColummValue"; //$NON-NLS-1$ - - - // ********** unique constraints ********** - - <T extends UniqueConstraint> Iterable<T> getUniqueConstraints(); - int getUniqueConstraintsSize(); - UniqueConstraint addUniqueConstraint(); - UniqueConstraint addUniqueConstraint(int index); - void removeUniqueConstraint(int index); - void removeUniqueConstraint(UniqueConstraint uniqueConstraint); - void moveUniqueConstraint(int targetIndex, int sourceIndex); - String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$ - - - // ********** database stuff ********** - - /** - * Return the generator's database table. - * Return null if the generator's table (name) is invalid. - */ - Table getDbTable(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalConverter.java deleted file mode 100644 index b00639b466..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalConverter.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.core.context; - -/** - * JPA temporal 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 TemporalConverter - extends Converter -{ - static final String[] TEMPORAL_MAPPING_SUPPORTED_TYPES = {"java.util.Date", "java.util.Calendar", "java.util.GregorianCalendar"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - - TemporalType getTemporalType(); - void setTemporalType(TemporalType temporalType); - String TEMPORAL_TYPE_PROPERTY = "temporalType"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java deleted file mode 100644 index 63b0fd27a3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TemporalType.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 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.core.context; - -/** - * Temporal Type - * - * 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.0 - */ -public enum TemporalType { - - DATE( - org.eclipse.jpt.jpa.core.resource.java.TemporalType.DATE, - org.eclipse.jpt.jpa.core.resource.orm.TemporalType.DATE - ), - TIME( - org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIME, - org.eclipse.jpt.jpa.core.resource.orm.TemporalType.TIME - ), - TIMESTAMP( - org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIMESTAMP, - org.eclipse.jpt.jpa.core.resource.orm.TemporalType.TIMESTAMP - ); - - - private org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType; - private org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType; - - TemporalType(org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType, org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType) { - if (javaTemporalType == null) { - throw new NullPointerException(); - } - if (ormTemporalType == null) { - throw new NullPointerException(); - } - this.javaTemporalType = javaTemporalType; - this.ormTemporalType = ormTemporalType; - } - - public org.eclipse.jpt.jpa.core.resource.java.TemporalType getJavaTemporalType() { - return this.javaTemporalType; - } - - public org.eclipse.jpt.jpa.core.resource.orm.TemporalType getOrmTemporalType() { - return this.ormTemporalType; - } - - - // ********** static methods ********** - - public static TemporalType fromJavaResourceModel(org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType) { - return (javaTemporalType == null) ? null : fromJavaResourceModel_(javaTemporalType); - } - - private static TemporalType fromJavaResourceModel_(org.eclipse.jpt.jpa.core.resource.java.TemporalType javaTemporalType) { - for (TemporalType temporalType : TemporalType.values()) { - if (temporalType.getJavaTemporalType() == javaTemporalType) { - return temporalType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.java.TemporalType toJavaResourceModel(TemporalType temporalType) { - return (temporalType == null) ? null : temporalType.getJavaTemporalType(); - } - - public static TemporalType fromOrmResourceModel(org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType) { - return (ormTemporalType == null) ? null : fromOrmResourceModel_(ormTemporalType); - } - - private static TemporalType fromOrmResourceModel_(org.eclipse.jpt.jpa.core.resource.orm.TemporalType ormTemporalType) { - for (TemporalType temporalType : TemporalType.values()) { - if (temporalType.getOrmTemporalType() == ormTemporalType) { - return temporalType; - } - } - return null; - } - - public static org.eclipse.jpt.jpa.core.resource.orm.TemporalType toOrmResourceModel(TemporalType temporalType) { - return (temporalType == null) ? null : temporalType.getOrmTemporalType(); - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java deleted file mode 100644 index b6d759493d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TransientMapping.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA transient "mapping". Because of default mappings, attributes must be - * explicitly marked "transient" if they are not to be mapped to the database. - * <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.0 - * @since 2.0 - */ -public interface TransientMapping - extends AttributeMapping -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java deleted file mode 100644 index 827961d571..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/TypeMapping.java +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context; - -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.db.Schema; - -/** - * type mapping:<ul> - * <li>entity - * <li>mapped superclass - * <li>embeddable - * </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.3 - * @since 2.0 - */ -public interface TypeMapping - extends JpaContextNode -{ - PersistentType getPersistentType(); - - /** - * Return a unique key for the type mapping. If this is defined in an - * extension they should be equal. - */ - String getKey(); - - /** - * Return the name, specified or default if not specified. - */ - String getName(); - - boolean isMapped(); - - /** - * Return the resolved id class specified on this type mapping, null otherwise - */ - JavaPersistentType getIdClass(); - - - // ********** inheritance ********** - - /** - * Return the type mapping of this type mapping's super type. - * Return null if this is the root. - */ - TypeMapping getSuperTypeMapping(); - - /** - * Return the type mapping's "persistence" inheritance hierarchy, - * <em>including</em> the type mapping itself. - * The returned iterator will return elements infinitely if the hierarchy - * has a loop. - */ - Iterable<TypeMapping> getInheritanceHierarchy(); - - - // ********** tables ********** - - /** - * Return the type mapping's primary table name. - * Return null if a primary table is not applicable. - */ - String getPrimaryTableName(); - - /** - * Return the type mapping's primary database table. - * Return null if a primary table is not applicable. - */ - org.eclipse.jpt.jpa.db.Table getPrimaryDbTable(); - - Schema getDbSchema(); - - /** - * Return the type mapping's "associated" tables, which includes the primary - * table and the collection of secondary tables. - */ - Iterable<ReadOnlyTable> getAssociatedTables(); - - /** - * Return the type mapping's "associated" tables, which includes the primary - * table and the collection of secondary tables, as well as all inherited - * "associated" tables. - */ - Iterable<ReadOnlyTable> getAllAssociatedTables(); - - /** - * Return the names of the type mapping's "associated" tables, which - * includes the primary table and the collection of secondary tables, as - * well as all the inherited "associated" tables. - */ - Iterable<String> getAllAssociatedTableNames(); - - /** - * Return the resolved <em>associated</em> db table with the specified name; - * i.e. the specified table must be among those associated with the type - * mapping otherwise return <code>null</code>. - * <p> - * <strong>NB:</strong> The spec does allow for columns or join columns to - * specify a schema and/or catalog; so the results can be unpredictable.... - */ - org.eclipse.jpt.jpa.db.Table resolveDbTable(String tableName); - - /** - * Return whether the specified table is invalid for any annotations - * associated with the type mapping. The table name is case- - * <em>sensitive</em> when the database connection is missing or inactive; - * when the database connection is active, case-sensitivity is determined - * by the database. - */ - boolean tableNameIsInvalid(String tableName); - - - // ********** mappings ********** - - /** - * A convenience method for getting the attribute mappings from PersistentType.attributes() - */ - <T extends AttributeMapping> Iterable<T> getAttributeMappings(); - - /** - * Return attribute mappings of a particular mapping type that are declared on this type mapping - */ - <T extends AttributeMapping> Iterable<T> getAttributeMappings(String mappingKey); - - /** - * Return all the attribute mappings in the type mapping's - * inheritance hierarchy. - */ - Iterable<AttributeMapping> getAllAttributeMappings(); - - /** - * Return attribute mappings of a particular mapping type that are declared anywhere on this - * type mapping's hierarchy - */ - <T extends AttributeMapping> Iterable<T> getAllAttributeMappings(String mappingKey); - - /** - * Return whether the given attribute mapping key is valid for this - * particular type mapping (for example, id's are not valid for an - * embeddable type mapping) - */ - boolean attributeMappingKeyAllowed(String attributeMappingKey); - - /** - * Return whether the attribute with the specified name is a derived ID. - */ - boolean attributeIsDerivedId(String attributeName); - - - // ********** attribute overrides ********** - - /** - * Return an Iterator of attribute names that can be overridden by a - * sub type mapping. - */ - Iterable<String> getOverridableAttributeNames(); - - /** - * Return an Iterator of all attribute names that can be overridden in this - * type mapping. - */ - Iterable<String> getAllOverridableAttributeNames(); - - /** - * Return the column of the overridable attribute mapping (or attribute - * override) with the specified attribute name. - * <p> - * In JPA 2.0 this name can use dot-notation to designate nested attributes - * in embedded attribute mapping's embeddable type mapping. - */ - Column resolveOverriddenColumn(String attributeName); - - - // ********** association overrides ********** - - /** - * Return an Iterator of associations names that can be overridden in this - * type mapping. - */ - Iterable<String> getOverridableAssociationNames(); - - /** - * Return an Iterator of all associations names that can be overridden in this - * type mapping. - */ - Iterable<String> getAllOverridableAssociationNames(); - - Relationship resolveOverriddenRelationship(String attributeName); - - - // ********** validation ********** - - /** - * Return whether any database metadata specific validation should occur. - * (For instance, if the connection is not active, then it should not.) - */ - boolean validatesAgainstDatabase(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java deleted file mode 100644 index 04682f9363..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/UniqueConstraint.java +++ /dev/null @@ -1,63 +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.core.context; - -/** - * database unique constraint - * <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.0 - */ -public interface UniqueConstraint - extends ReadOnlyUniqueConstraint -{ - void initializeFrom(ReadOnlyUniqueConstraint oldUniqueConstraint); - - - // ********** column names ********** - - /** - * Add the specified column name to the end of the - * unique constraint's list of column names. - */ - void addColumnName(String columnName); - - /** - * Add the specified column name to the - * unique constraint's list of column names - * at the specified index. - */ - void addColumnName(int index, String columnName); - - /** - * Remove the specified column name from the - * unique constraint's list of column names. - */ - void removeColumnName(String columnName); - - /** - * Remove the column name at the specified index from the - * unique constraint's list of column names. - */ - void removeColumnName(int index); - - /** - * Move the column name at the specified source index - * to the specified target index in the - * unique constraint's list of column names. - */ - void moveColumnName(int targetIndex, int sourceIndex); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java deleted file mode 100644 index eb47be8fb8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VersionMapping.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context; - -/** - * JPA 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 2.2 - * @since 2.0 - */ -public interface VersionMapping - extends ColumnMapping, ConvertibleMapping -{ - String[] SUPPORTED_TYPE_NAMES = { - int.class.getName(), - java.lang.Integer.class.getName(), - short.class.getName(), - java.lang.Short.class.getName(), - long.class.getName(), - java.lang.Long.class.getName(), - java.sql.Timestamp.class.getName() - }; -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.java deleted file mode 100644 index e6de19472f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAssociationOverride.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.core.context; - -/** - * <em>Virtual</em> association override - * <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 VirtualAssociationOverride - extends VirtualOverride, ReadOnlyAssociationOverride -{ - ReadOnlyRelationship resolveOverriddenRelationship(); - - // covariant overrides - AssociationOverride convertToSpecified(); - - VirtualOverrideRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.java deleted file mode 100644 index 1436e77340..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualAttributeOverride.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.core.context; - -/** - * <em>Virtual</em> attribute override - * <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 VirtualAttributeOverride - extends VirtualOverride, ReadOnlyAttributeOverride -{ - // covariant overrides - AttributeOverride convertToSpecified(); - - VirtualColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.java deleted file mode 100644 index 69408b68e6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseColumn.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.core.context; - -/** - * Virtual - * <ul> - * <li>column - * <li>join column - * </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. - */ -public interface VirtualBaseColumn - extends VirtualNamedColumn, ReadOnlyBaseColumn -{ - ReadOnlyBaseColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java deleted file mode 100644 index 494dda70a1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualBaseJoinColumn.java +++ /dev/null @@ -1,25 +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.core.context; - -/** - * Virtual join column (no virtual primary key join columns yet) - * <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 VirtualBaseJoinColumn - extends VirtualNamedColumn, ReadOnlyBaseJoinColumn -{ - ReadOnlyBaseJoinColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java deleted file mode 100644 index 29dac38adb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualColumn.java +++ /dev/null @@ -1,40 +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.core.context; - -/** - * Virtual 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 VirtualColumn - extends VirtualBaseColumn, ReadOnlyColumn -{ - ReadOnlyColumn getOverriddenColumn(); - - - // ********** owner ********** - - /** - * Interface allowing the virtual column to be get the column it overrides. - */ - interface Owner - extends ReadOnlyBaseColumn.Owner - { - /** - * Return the column overridden by the virtual column. - */ - ReadOnlyColumn resolveOverriddenColumn(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java deleted file mode 100644 index 73ab8e8335..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumn.java +++ /dev/null @@ -1,25 +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.core.context; - -/** - * Virtual join 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 VirtualJoinColumn - extends VirtualBaseJoinColumn, VirtualBaseColumn, ReadOnlyJoinColumn -{ - ReadOnlyJoinColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java deleted file mode 100644 index eb9019d98c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationship.java +++ /dev/null @@ -1,26 +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.core.context; - -/** - * Virtual join column 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 VirtualJoinColumnRelationship - extends ReadOnlyJoinColumnRelationship, - VirtualRelationship -{ - VirtualJoinColumnRelationshipStrategy getJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.java deleted file mode 100644 index 0905e56be0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinColumnRelationshipStrategy.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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Virtual join column relationship strategy. - * <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 VirtualJoinColumnRelationshipStrategy - extends ReadOnlyJoinColumnRelationshipStrategy, VirtualRelationshipStrategy -{ - ListIterable<? extends VirtualJoinColumn> getJoinColumns(); - ListIterable<? extends VirtualJoinColumn> getSpecifiedJoinColumns(); - VirtualJoinColumn getSpecifiedJoinColumn(int index); - VirtualJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.java deleted file mode 100644 index 263988cd70..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTable.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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Used by association overrides. - * <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 VirtualJoinTable - extends VirtualReferenceTable, ReadOnlyJoinTable -{ - VirtualJoinTableRelationshipStrategy getParent(); - - ListIterable<? extends VirtualJoinColumn> getInverseJoinColumns(); - ListIterable<? extends VirtualJoinColumn> getSpecifiedInverseJoinColumns(); - VirtualJoinColumn getSpecifiedInverseJoinColumn(int index); - VirtualJoinColumn getDefaultInverseJoinColumn(); - - ReadOnlyJoinTable getOverriddenTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java deleted file mode 100644 index 8f322197d3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationship.java +++ /dev/null @@ -1,26 +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.core.context; - -/** - * Virtual join table 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 VirtualJoinTableRelationship - extends ReadOnlyJoinTableRelationship, - VirtualRelationship -{ - VirtualJoinTableRelationshipStrategy getJoinTableStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java deleted file mode 100644 index 94c9901b64..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualJoinTableRelationshipStrategy.java +++ /dev/null @@ -1,25 +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.core.context; - -/** - * Virtual join table relationship strategy. - * <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 VirtualJoinTableRelationshipStrategy - extends ReadOnlyJoinTableRelationshipStrategy, VirtualRelationshipStrategy -{ - VirtualJoinTable getJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.java deleted file mode 100644 index 7a7316315a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualNamedColumn.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.core.context; - -/** - * <em>Virtual</em><ul> - * <li>column - * <li>join column - * </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. - */ -public interface VirtualNamedColumn - extends ReadOnlyNamedColumn -{ - /** - * Return the virtual column's wrapped column. - */ - ReadOnlyNamedColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java deleted file mode 100644 index 3aac4c73e1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverride.java +++ /dev/null @@ -1,32 +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.core.context; - -/** - * <em>Virtual</em><ul> - * <li>attribute override - * <li>association override - * </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. - */ -public interface VirtualOverride - extends ReadOnlyOverride -{ - /** - * Convert the <em>virtual</em> override to a <em>specified</em> override. - * Return the new <em>specified</em> override. - * @see #isVirtual() - */ - Override_ convertToSpecified(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.java deleted file mode 100644 index 693897dc7b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualOverrideRelationship.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.core.context; - -/** - * Virtual association override 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. - * - * @see AssociationOverride - */ -public interface VirtualOverrideRelationship - extends ReadOnlyOverrideRelationship, - VirtualJoinColumnRelationship -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java deleted file mode 100644 index 92af7bf637..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualPrimaryKeyJoinColumn.java +++ /dev/null @@ -1,32 +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.core.context; - -/** - * Virtual primary key join column. There are only <em>orm.xml</em> virtual - * primary key join columns; used to represent the default columns taken from - * the Java entity. Therefore, it's arguable whether we need this interface; but - * it makes the inheritance hierarchies a bit more consistent.... - * <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 VirtualPrimaryKeyJoinColumn - extends VirtualBaseJoinColumn, ReadOnlyPrimaryKeyJoinColumn -{ - /** - * This is not the best method name; we are simply overloading the meaning - * of the inherited method. - */ - PrimaryKeyJoinColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java deleted file mode 100644 index 21a4ec56c7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualReferenceTable.java +++ /dev/null @@ -1,32 +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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Virtual reference table - * <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 VirtualReferenceTable - extends VirtualTable, ReadOnlyReferenceTable -{ - ListIterable<? extends VirtualJoinColumn> getJoinColumns(); - ListIterable<? extends VirtualJoinColumn> getSpecifiedJoinColumns(); - VirtualJoinColumn getSpecifiedJoinColumn(int index); - VirtualJoinColumn getDefaultJoinColumn(); - - ReadOnlyReferenceTable getOverriddenTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java deleted file mode 100644 index e7bf4c856a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationship.java +++ /dev/null @@ -1,27 +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.core.context; - -/** - * Virtual 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 VirtualRelationship - extends ReadOnlyRelationship -{ - VirtualRelationshipStrategy getStrategy(); - - ReadOnlyRelationship resolveOverriddenRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java deleted file mode 100644 index 0d9570d197..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualRelationshipStrategy.java +++ /dev/null @@ -1,25 +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.core.context; - -/** - * Virtual strategy - * <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 VirtualRelationshipStrategy - extends ReadOnlyRelationshipStrategy -{ - VirtualRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.java deleted file mode 100644 index f9275f56f9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualSecondaryTable.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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Virtual secondary table - * <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 VirtualSecondaryTable - extends VirtualTable, ReadOnlySecondaryTable -{ - ListIterable<? extends VirtualPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<? extends VirtualPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - VirtualPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); - - SecondaryTable getOverriddenTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.java deleted file mode 100644 index 2f5a64bd31..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualTable.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.core.context; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; - -/** - * Virtual table - * <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 VirtualTable - extends ReadOnlyTable -{ - ReadOnlyTable getOverriddenTable(); - - ListIterable<? extends VirtualUniqueConstraint> getUniqueConstraints(); - VirtualUniqueConstraint getUniqueConstraint(int index); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.java deleted file mode 100644 index 1ae02a89bc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/VirtualUniqueConstraint.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.core.context; - -/** - * Virtual database unique constraint. <em>Virtual</em> unique constraints - * are held by <em>virtual</em> join tables (which are held by <em>virtual</em> - * association overrides) and, in the case or <code>orm.xml</code>, - * <em>virtual</em> secondary tables. - * <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 VirtualUniqueConstraint - extends ReadOnlyUniqueConstraint -{ - /** - * Return the wrapped unique constraint. - */ - ReadOnlyUniqueConstraint getOverriddenUniqueConstraint(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java deleted file mode 100644 index 5ff9c36b37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java +++ /dev/null @@ -1,40 +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.core.context; - -import java.util.List; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.wst.validation.internal.provisional.core.IMessage; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; - -/** - * XML JPA context node - * <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.1 - */ -public interface XmlContextNode - extends JpaContextNode -{ -// TODO bjv rename to XmlJpaContextNode - /** - * Add to the list of current validation messages - */ - void validate(List<IMessage> messages, IReporter reporter); - - TextRange getValidationTextRange(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java deleted file mode 100644 index f413d9d170..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlFile.java +++ /dev/null @@ -1,34 +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.core.context; - -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource; - -/** - * Context representation of any JPA XML file. - * <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 XmlFile - extends XmlContextNode, JpaStructureNode -{ - /** - * Return the resource model object - */ - JpaXmlResource getXmlResource(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java deleted file mode 100644 index d483ec56ad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java +++ /dev/null @@ -1,55 +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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; -import org.eclipse.jpt.common.core.resource.java.JavaResourceField; -import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod; -import org.eclipse.jpt.jpa.core.context.AccessType; -import org.eclipse.jpt.jpa.core.context.JpaContextNode; -import org.eclipse.jpt.jpa.core.context.PersistentAttribute; -import org.eclipse.jpt.jpa.core.context.PersistentType; -import org.eclipse.jpt.jpa.core.internal.context.JptValidator; -import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver; - -/** - * Represents a JPA accessor (field/property). - * <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 Accessor extends JpaContextNode -{ - /** - * Return the <em>resource</em> attribute(field/method) that is to be annotated. - */ - JavaResourceAttribute getResourceAttribute(); - - boolean isFor(JavaResourceField resourceField); - - boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter); - - /** - * Build a Java persistent attribute that wraps the original Java resource - * attributes and behaves as though it has no annotations. This will cause - * all the settings in the Java <em>context</em> attribute to default. - */ - JavaPersistentAttribute buildUnannotatedJavaAttribute(PersistentType parent); - - AccessType getDefaultAccess(); - - JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java deleted file mode 100644 index 94676c16d0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/DefaultJavaAttributeMappingDefinition.java +++ /dev/null @@ -1,20 +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.core.context.java; - -public interface DefaultJavaAttributeMappingDefinition - extends JavaAttributeMappingDefinition -{ - /** - * Return whether the definition's mapping is the "default" mapping for the - * specified persistent attribute. - */ - boolean isDefault(JavaPersistentAttribute persistentAttribute); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java deleted file mode 100644 index e71862f8e3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JarFile.java +++ /dev/null @@ -1,68 +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.core.context.java; - -import java.util.List; -import org.eclipse.core.resources.IFolder; -import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot; -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.JpaContextNode; -import org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer; -import org.eclipse.wst.validation.internal.provisional.core.IMessage; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; - -/** - * A JAR file identified by a <code>persistence.xml</code> <code>jar-file</code> element. - * This holds persistent types corresponding to all the "persistable" types - * discovered in the JAR. - * <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.2 - */ -public interface JarFile - extends JpaContextNode, JpaStructureNode, PersistentTypeContainer -{ - JavaResourcePackageFragmentRoot getJarResourcePackageFragmentRoot(); - - - // ********** Java persistent types ********** - - /** - * Return the JAR file's Java persistent types. - * Return only the types that are annotated with JPA annotations. - */ - Iterable<JavaPersistentType> getJavaPersistentTypes(); - String JAVA_PERSISTENT_TYPES_COLLECTION = "javaPersistentTypes"; //$NON-NLS-1$ - - /** - * Return the size of the JAR file's Java persistent types. - */ - int getJavaPersistentTypesSize(); - - - // ********** validation ********** - - /** - * Add to the list of current validation messages - */ - void validate(List<IMessage> messages, IReporter reporter); - - /** - * Return true if this jar file exists in the given folder - */ - boolean isIn(IFolder folder); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java deleted file mode 100644 index 07f9c95e90..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverride.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.AssociationOverride; -import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation; - -/** - * <em>Specified</em> Java association override - * <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.0 - */ -public interface JavaAssociationOverride - extends JavaReadOnlyAssociationOverride, AssociationOverride, JavaOverride -{ - JavaVirtualAssociationOverride convertToVirtual(); - - AssociationOverrideAnnotation getOverrideAnnotation(); - - JavaOverrideRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java deleted file mode 100644 index 9677de19a6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAssociationOverrideContainer.java +++ /dev/null @@ -1,59 +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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer; -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship; -import org.eclipse.jpt.jpa.core.context.VirtualOverride; - -/** - * Java association override 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 2.3 - * @since 2.3 - */ -public interface JavaAssociationOverrideContainer - extends AssociationOverrideContainer, JavaOverrideContainer -{ - /** - * Return the specified override's relationship. - * This is used by the <code>orm.xml</code> association override container - * when it is also using the Java container's override names. - * @see #getOverrideNames() - */ - ReadOnlyOverrideRelationship getOverrideRelationship(String overrideName); - - // covariant overrides - ListIterable<JavaReadOnlyAssociationOverride> getOverrides(); - JavaReadOnlyAssociationOverride getOverrideNamed(String name); - ListIterable<JavaAssociationOverride> getSpecifiedOverrides(); - JavaAssociationOverride getSpecifiedOverride(int index); - JavaAssociationOverride getSpecifiedOverrideNamed(String name); - ListIterable<JavaVirtualAssociationOverride> getVirtualOverrides(); - JavaVirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride); - JavaAssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** owner ********** - - interface Owner - extends AssociationOverrideContainer.Owner, JavaOverrideContainer.Owner - { - // combine interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java deleted file mode 100644 index 5a585114d1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMapping.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; -import org.eclipse.jpt.jpa.core.context.AttributeMapping; - -/** - * Java attribute 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.3 - * @since 2.0 - */ -public interface JavaAttributeMapping - extends AttributeMapping, JavaJpaContextNode -{ - JavaPersistentAttribute getParent(); - - JavaPersistentAttribute getPersistentAttribute(); - - JavaResourceAttribute getResourceAttribute(); - - Annotation getMappingAnnotation(); - - Annotation getAnnotationForUpdate(); - - void updateDefault(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java deleted file mode 100644 index f435b729ba..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeMappingDefinition.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.JpaFactory; - -/** - * Map a string key to an attribute mapping and its corresponding - * Java annotations. - * <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 JavaAttributeMappingDefinition -{ - /** - * Return the attribute mapping's key. - */ - String getKey(); - - /** - * Return the name of the attribute mapping's annotation. - */ - String getAnnotationName(); - - /** - * Return the names of the attribute mapping's "supporting" annotations. - */ - Iterable<String> getSupportingAnnotationNames(); - - /** - * Return whether the definition's mapping is - * the "specified" mapping for the specified persistent attribute. - * <p> - * <strong>NB:</strong> A mapping is not necessarily "specified" if its - * annotation is present - * (see {@link org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaIdMappingDefinition2_0#isSpecified(JavaPersistentAttribute)}) - */ - boolean isSpecified(JavaPersistentAttribute persistentAttribute); - - /** - * Build a Java attribute mapping for the specified persistent attribute. - * Use the specified factory for creation so extenders can simply override - * the appropriate factory method instead of building a definition for the - * same key. - */ - JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java deleted file mode 100644 index 5b992d9ed7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverride.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.AttributeOverride; -import org.eclipse.jpt.jpa.core.resource.java.AttributeOverrideAnnotation; - -/** - * <em>Specified</em> Java attribute override - * <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.0 - */ -public interface JavaAttributeOverride - extends JavaReadOnlyAttributeOverride, AttributeOverride, JavaOverride -{ - JavaVirtualAttributeOverride convertToVirtual(); - - AttributeOverrideAnnotation getOverrideAnnotation(); - - JavaColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java deleted file mode 100644 index 039cfd4a2d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaAttributeOverrideContainer.java +++ /dev/null @@ -1,59 +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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer; -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn; -import org.eclipse.jpt.jpa.core.context.VirtualOverride; - -/** - * Java attribute override 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 2.3 - * @since 2.3 - */ -public interface JavaAttributeOverrideContainer - extends AttributeOverrideContainer, JavaOverrideContainer -{ - /** - * Return the specified override's column. - * This is used by the <code>orm.xml</code> attribute override container - * when it is also using the Java container's override names. - * @see #getOverrideNames() - */ - ReadOnlyColumn getOverrideColumn(String overrideName); - - // covariant overrides - ListIterable<JavaReadOnlyAttributeOverride> getOverrides(); - JavaReadOnlyAttributeOverride getOverrideNamed(String name); - ListIterable<JavaAttributeOverride> getSpecifiedOverrides(); - JavaAttributeOverride getSpecifiedOverride(int index); - JavaAttributeOverride getSpecifiedOverrideNamed(String name); - ListIterable<JavaVirtualAttributeOverride> getVirtualOverrides(); - JavaVirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride); - JavaAttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** Java owner ********** - - interface Owner - extends AttributeOverrideContainer.Owner, JavaOverrideContainer.Owner - { - // combine two interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java deleted file mode 100644 index bca2d1b354..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseColumn.java +++ /dev/null @@ -1,31 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.BaseColumn; -import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation; - -/** - * Java column or join 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 2.3 - * @since 2.0 - */ -public interface JavaBaseColumn - extends BaseColumn, JavaNamedColumn, JavaReadOnlyBaseColumn -{ - BaseColumnAnnotation getColumnAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java deleted file mode 100644 index ab5405f5d5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseEmbeddedMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping; - -/** - * Behavior common to Java embedded and embedded ID mappings. - * <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.0 - */ -public interface JavaBaseEmbeddedMapping - extends BaseEmbeddedMapping, JavaAttributeMapping -{ - JavaAttributeOverrideContainer getAttributeOverrideContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.java deleted file mode 100644 index 043eeae1f1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBaseJoinColumn.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.BaseJoinColumn; - -/** - * Java join column or primary key join 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 2.3 - * @since 2.3 - */ -public interface JavaBaseJoinColumn - extends BaseJoinColumn, JavaNamedColumn, JavaReadOnlyBaseJoinColumn -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java deleted file mode 100644 index b5d8038928..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaBasicMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.BasicMapping; -import org.eclipse.jpt.jpa.core.resource.java.BasicAnnotation; - -/** - * Java 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 2.3 - * @since 2.0 - */ -public interface JavaBasicMapping - extends BasicMapping, JavaColumnMapping, JavaConvertibleMapping -{ - BasicAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.java deleted file mode 100644 index 9f0562919b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCascade.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.Cascade; - -/** - * Java cascade (persist, merge, remove, refresh) - * <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 JavaCascade - extends Cascade, JavaJpaContextNode -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.java deleted file mode 100644 index 3c0a4fb3eb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaCollectionMapping.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.CollectionMapping; - -/** - * JPA Java collection mapping (e.g. 1:m, m:m, element collection) - * <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 JavaCollectionMapping - extends CollectionMapping, JavaAttributeMapping -{ - JavaOrderable getOrderable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java deleted file mode 100644 index 786fc76b2d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.Column; -import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation; - -/** - * Java 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 2.3 - * @since 2.0 - */ -public interface JavaColumn - extends Column, JavaBaseColumn -{ - CompleteColumnAnnotation getColumnAnnotation(); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner - extends JavaReadOnlyBaseColumn.Owner - { - CompleteColumnAnnotation getColumnAnnotation(); - void removeColumnAnnotation(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java deleted file mode 100644 index 1d4f3fd5fa..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumnMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ColumnMapping; - -/** - * Java column 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.3 - * @since 2.0 - */ -public interface JavaColumnMapping - extends ColumnMapping, JavaAttributeMapping, JavaColumn.Owner -{ - JavaColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java deleted file mode 100644 index 1b2d8c96e0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java +++ /dev/null @@ -1,143 +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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; -import org.eclipse.jpt.common.utility.internal.ClassName; -import org.eclipse.jpt.common.utility.internal.StringTools; -import org.eclipse.jpt.jpa.core.JpaFactory; -import org.eclipse.jpt.jpa.core.context.Converter; - -/** - * Java 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 JavaConverter - extends Converter, JavaJpaContextNode -{ - JavaAttributeMapping getParent(); - - Annotation getConverterAnnotation(); - - /** - * Allow the converter to clean up any related annotations before it is - * removed itself. - */ - void dispose(); - - - // ********** adapter ********** - - /** - * This interface allows a convertible mapping to interact with various - * Java converters via the same protocol. - */ - public interface Adapter - { - /** - * Return the type of converter handled by the adapter. - */ - Class<? extends Converter> getConverterType(); - - /** - * Build a converter corresponding to the specified mapping - * if the mapping's resource attribute is modified by the adapter's - * converter annotation. Return <code>null</code> otherwise. - * This is used to build a converter during construction of the - * converter's mapping. - */ - JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory); - - /** - * Return the adapter's converter annotation for the specified Java - * resource persistent member. - * Return <code>null</code> if the adapter's converter annotation is - * missing. - * The returned converter annotation is compared to the parent's - * converter's converter annotation while the context model is synchronized - * with the resource model. If it has changed, the parent will build - * a new converter (via the adapter). - * - * @see #buildConverter(Annotation, JavaAttributeMapping, JpaFactory) - */ - Annotation getConverterAnnotation(JavaResourceAttribute javaResourceAttribute); - - /** - * Build a converter using the specified converter annotation. - * This is used when the context model is synchronized with the - * resource model (and the resource model has changed). - * - * @see #getConverterAnnotation(JavaResourcePersistentAttribute) - */ - JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory); - - /** - * Build a new converter and, if necessary, its corresponding converter - * annotation. - */ - JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory); - - /** - * Remove the adapter's converter annotation from the specified - * Java resource persistent member. - */ - void removeConverterAnnotation(JavaResourceAttribute javaResourcePersistentAttribute); - } - - - // ********** abstract adapter ********** - - public abstract static class AbstractAdapter - implements JavaConverter.Adapter - { - public JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory) { - Annotation annotation = this.getConverterAnnotation(parent.getResourceAttribute()); - return (annotation == null) ? null : this.buildConverter(annotation, parent, factory); - } - - public Annotation getConverterAnnotation(JavaResourceAttribute attribute) { - return attribute.getAnnotation(this.getAnnotationName()); - } - - protected abstract String getAnnotationName(); - - public JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory) { - return this.buildConverter(this.buildConverterAnnotationIfNecessary(parent.getResourceAttribute()), parent, factory); - } - - protected Annotation buildConverterAnnotationIfNecessary(JavaResourceAttribute attribute) { - // the annotation may already be present, after we remove the other converter annotations - Annotation annotation = this.getConverterAnnotation(attribute); - return (annotation != null) ? annotation : this.buildConverterAnnotation(attribute); - } - - protected Annotation buildConverterAnnotation(JavaResourceAttribute attribute) { - return attribute.addAnnotation(this.getAnnotationName()); - } - - public void removeConverterAnnotation(JavaResourceAttribute attribute) { - attribute.removeAnnotation(this.getAnnotationName()); - } - - @Override - public String toString() { - return StringTools.buildToStringFor(this, ClassName.getSimpleName(this.getAnnotationName())); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.java deleted file mode 100644 index a6f9bd607f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConvertibleMapping.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ConvertibleMapping; - -/** - * Java attribute mapping that has a converter (e.g. basic, ID, version). - * <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 JavaConvertibleMapping - extends ConvertibleMapping, JavaAttributeMapping -{ - JavaConverter getConverter(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java deleted file mode 100644 index 170f2eb345..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn; -import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation; - -/** - * Java 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 2.3 - * @since 2.0 - */ -public interface JavaDiscriminatorColumn - extends DiscriminatorColumn, JavaNamedColumn -{ - DiscriminatorColumnAnnotation getColumnAnnotation(); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - */ - interface Owner - extends DiscriminatorColumn.Owner, JavaReadOnlyNamedColumn.Owner - { - // combine interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java deleted file mode 100644 index f00fca6d49..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddable.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.Embeddable; -import org.eclipse.jpt.jpa.core.resource.java.EmbeddableAnnotation; - -/** - * 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.3 - * @since 2.0 - */ -public interface JavaEmbeddable - extends Embeddable, JavaTypeMapping -{ - EmbeddableAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java deleted file mode 100644 index 8f066b4392..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedIdMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping; -import org.eclipse.jpt.jpa.core.resource.java.EmbeddedIdAnnotation; - -/** - * Java embedded 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 2.3 - * @since 2.0 - */ -public interface JavaEmbeddedIdMapping - extends EmbeddedIdMapping, JavaBaseEmbeddedMapping -{ - EmbeddedIdAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java deleted file mode 100644 index ff6631c380..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEmbeddedMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.EmbeddedMapping; -import org.eclipse.jpt.jpa.core.resource.java.EmbeddedAnnotation; - -/** - * Java embedded 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.3 - * @since 2.0 - */ -public interface JavaEmbeddedMapping - extends EmbeddedMapping, JavaBaseEmbeddedMapping -{ - EmbeddedAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java deleted file mode 100644 index 993344ef97..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEntity.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.Entity; -import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation; - -/** - * 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.3 - * @since 2.0 - */ -public interface JavaEntity - extends Entity, JavaTypeMapping -{ - EntityAnnotation getMappingAnnotation(); - - JavaTable getTable(); - - JavaIdClassReference getIdClassReference(); - - JavaDiscriminatorColumn getDiscriminatorColumn(); - - - // ********** secondary tables ********** - - ListIterable<JavaSecondaryTable> getSecondaryTables(); - ListIterable<JavaSecondaryTable> getSpecifiedSecondaryTables(); - JavaSecondaryTable addSpecifiedSecondaryTable(); - JavaSecondaryTable addSpecifiedSecondaryTable(int index); - - - // ********** primary key join columns ********** - - ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<JavaPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index); - - JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); - String DEFAULT_PRIMARY_KEY_JOIN_COLUMN_PROPERTY = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$ - - - // ********** containers ********** - - JavaAttributeOverrideContainer getAttributeOverrideContainer(); - JavaAssociationOverrideContainer getAssociationOverrideContainer(); - JavaQueryContainer getQueryContainer(); - JavaGeneratorContainer getGeneratorContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java deleted file mode 100644 index a054463334..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaEnumeratedConverter.java +++ /dev/null @@ -1,57 +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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.jpa.core.JpaFactory; -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.EnumeratedConverter; -import org.eclipse.jpt.jpa.core.resource.java.EnumeratedAnnotation; - -/** - * Java enumerated 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. - */ -public interface JavaEnumeratedConverter - extends EnumeratedConverter, JavaConverter -{ - // ********** adapter ********** - - public static class Adapter - extends JavaConverter.AbstractAdapter - { - private static final Adapter INSTANCE = new Adapter(); - public static Adapter instance() { - return INSTANCE; - } - - private Adapter() { - super(); - } - - public Class<? extends Converter> getConverterType() { - return EnumeratedConverter.class; - } - - @Override - protected String getAnnotationName() { - return EnumeratedAnnotation.ANNOTATION_NAME; - } - - public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) { - return factory.buildJavaEnumeratedConverter(parent, (EnumeratedAnnotation) converterAnnotation); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java deleted file mode 100644 index d93495dd04..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.GeneratedValue; -import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation; - -/** - * Java generated value - * <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.0 - * @since 2.0 - */ -public interface JavaGeneratedValue - extends GeneratedValue, JavaJpaContextNode -{ - GeneratedValueAnnotation getGeneratedValueAnnotation(); - - /** - * Return the (best guess) text location of the generator. - */ - TextRange getGeneratorTextRange(CompilationUnit astRoot); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java deleted file mode 100644 index 25395aff31..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.Generator; -import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation; - -/** - * Java sequence and table generators - * <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.0 - * @since 2.0 - */ -public interface JavaGenerator - extends Generator, JavaJpaContextNode -{ - GeneratorAnnotation getGeneratorAnnotation(); - - TextRange getNameTextRange(CompilationUnit astRoot); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java deleted file mode 100644 index 3615dcae23..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratorContainer.java +++ /dev/null @@ -1,47 +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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement; -import org.eclipse.jpt.jpa.core.context.GeneratorContainer; - -/** - * Java generator 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 2.3 - * @since 2.3 - */ -public interface JavaGeneratorContainer - extends GeneratorContainer, JavaJpaContextNode -{ - // ********** sequence generator ********** - - JavaSequenceGenerator getSequenceGenerator(); - - JavaSequenceGenerator addSequenceGenerator(); - - - // ********** table generator ********** - - JavaTableGenerator getTableGenerator(); - - JavaTableGenerator addTableGenerator(); - - interface Owner - { - JavaResourceAnnotatedElement getResourceAnnotatedElement(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java deleted file mode 100644 index e21214ca35..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdClassReference.java +++ /dev/null @@ -1,35 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.IdClassReference; - -/** - * Java ID class reference - * <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 JavaIdClassReference - extends IdClassReference, JavaJpaContextNode -{ - /** - * Return the fully qualified name of the id class, taking into consideration the default value if applicable - */ - String getFullyQualifiedIdClassName(); - String FULLY_QUALIFIED_ID_CLASS_PROPERTY = "fullyQualifiedIdClass"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java deleted file mode 100644 index 7fe82f003d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaIdMapping.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.IdMapping; -import org.eclipse.jpt.jpa.core.resource.java.IdAnnotation; - -/** - * Java 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 2.3 - * @since 2.0 - */ -public interface JavaIdMapping - extends IdMapping, JavaColumnMapping, JavaConvertibleMapping, JavaGeneratorContainer.Owner -{ - IdAnnotation getMappingAnnotation(); - - JavaGeneratorContainer getGeneratorContainer(); - - JavaGeneratedValue getGeneratedValue(); - JavaGeneratedValue addGeneratedValue(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java deleted file mode 100644 index f6b7c4e69c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumn.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.JoinColumn; -import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation; - -/** - * Java join 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 2.3 - * @since 2.0 - */ -public interface JavaJoinColumn - extends JoinColumn, JavaReadOnlyJoinColumn, JavaBaseJoinColumn, JavaBaseColumn -{ - JoinColumnAnnotation getColumnAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.java deleted file mode 100644 index b42bc14b39..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship; - -/** - * Java join column relationship (1:1, 1:m, m:1, and association override) - * <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 JavaJoinColumnRelationship - extends JoinColumnRelationship, JavaRelationship -{ - JavaJoinColumnRelationshipStrategy getJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java deleted file mode 100644 index cf5e5dc3af..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,38 +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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.JoinColumnRelationshipStrategy; - -/** - * Java join column relationship strategy - * <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 JavaJoinColumnRelationshipStrategy - extends JoinColumnRelationshipStrategy, JavaRelationshipStrategy -{ - ListIterable<JavaJoinColumn> getJoinColumns(); - - ListIterable<JavaJoinColumn> getSpecifiedJoinColumns(); - JavaJoinColumn getSpecifiedJoinColumn(int index); - JavaJoinColumn addSpecifiedJoinColumn(); - JavaJoinColumn addSpecifiedJoinColumn(int index); - - JavaJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java deleted file mode 100644 index 38644bad90..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTable.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.JoinTable; -import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation; - -/** - * Java join table - * <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.0 - */ -public interface JavaJoinTable - extends JoinTable, JavaReferenceTable -{ - JavaJoinTableRelationshipStrategy getParent(); - - JoinTableAnnotation getTableAnnotation(); - - - // ********** inverse join columns ********** - - ListIterable<JavaJoinColumn> getInverseJoinColumns(); - - ListIterable<JavaJoinColumn> getSpecifiedInverseJoinColumns(); - JavaJoinColumn getSpecifiedInverseJoinColumn(int index); - JavaJoinColumn addSpecifiedInverseJoinColumn(); - JavaJoinColumn addSpecifiedInverseJoinColumn(int index); - - JavaJoinColumn getDefaultInverseJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.java deleted file mode 100644 index 2418a7d02e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.JoinTableRelationship; - -/** - * Java join table relationship (1:1, 1:m, m:1, m:m) - * <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 JavaJoinTableRelationship - extends JoinTableRelationship, JavaRelationship -{ - JavaJoinTableRelationshipStrategy getJoinTableStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java deleted file mode 100644 index c6c912fa07..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJoinTableRelationshipStrategy.java +++ /dev/null @@ -1,37 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.JoinTableRelationshipStrategy; -import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation; - -/** - * Java join table relationship strategy - * <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.2 - */ -public interface JavaJoinTableRelationshipStrategy - extends JoinTableRelationshipStrategy, JavaRelationshipStrategy -{ - JavaJoinTable getJoinTable(); - - /** - * Return the join table annotation, use a null object instead of returning null - * if the join table annotation does not exist. - */ - JoinTableAnnotation getJoinTableAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java deleted file mode 100644 index 068f576114..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import java.util.List; -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.Filter; -import org.eclipse.jpt.jpa.core.context.JpaContextNode; -import org.eclipse.wst.validation.internal.provisional.core.IMessage; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; - -/** - * Java JPA context node. - * <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.0 - */ -public interface JavaJpaContextNode - extends JpaContextNode -{ - /** - * Return the Java code-completion proposals for the specified position - * in the source code. - */ - Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot); - - - // ********** validation ********** - - /** - * Adds to the list of current validation messages - */ - void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot); - - TextRange getValidationTextRange(CompilationUnit astRoot); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java deleted file mode 100644 index 83b059ee32..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaLobConverter.java +++ /dev/null @@ -1,57 +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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.jpa.core.JpaFactory; -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.LobConverter; -import org.eclipse.jpt.jpa.core.resource.java.LobAnnotation; - -/** - * Java LOB 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. - */ -public interface JavaLobConverter - extends LobConverter, JavaConverter -{ - // ********** adapter ********** - - public static class Adapter - extends JavaConverter.AbstractAdapter - { - private static final Adapter INSTANCE = new Adapter(); - public static Adapter instance() { - return INSTANCE; - } - - private Adapter() { - super(); - } - - public Class<? extends Converter> getConverterType() { - return LobConverter.class; - } - - @Override - protected String getAnnotationName() { - return LobAnnotation.ANNOTATION_NAME; - } - - public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) { - return factory.buildJavaLobConverter(parent, (LobAnnotation) converterAnnotation); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java deleted file mode 100644 index 9e2544dc8f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyMapping.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ManyToManyMapping; -import org.eclipse.jpt.jpa.core.resource.java.ManyToManyAnnotation; - -/** - * Java 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.2 - * @since 2.0 - */ -public interface JavaManyToManyMapping - extends ManyToManyMapping, JavaMultiRelationshipMapping -{ - ManyToManyAnnotation getMappingAnnotation(); - - ManyToManyAnnotation getAnnotationForUpdate(); - - JavaManyToManyRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.java deleted file mode 100644 index 0ecaef922d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToManyRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ManyToManyRelationship; - -/** - * Java m: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 JavaManyToManyRelationship - extends ManyToManyRelationship, - JavaMappedByRelationship, - JavaMappingJoinTableRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java deleted file mode 100644 index 6c7db3b15d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneMapping.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ManyToOneMapping; -import org.eclipse.jpt.jpa.core.resource.java.ManyToOneAnnotation; - -/** - * Java m: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.0 - */ -public interface JavaManyToOneMapping - extends ManyToOneMapping, JavaSingleRelationshipMapping -{ - ManyToOneAnnotation getMappingAnnotation(); - - JavaManyToOneRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java deleted file mode 100644 index c146adb25a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaManyToOneRelationship.java +++ /dev/null @@ -1,31 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship; - -/** - * Java m:1 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 JavaManyToOneRelationship - extends ManyToOneRelationship, - JavaMappingJoinColumnRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java deleted file mode 100644 index 4a7fec62be..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationship.java +++ /dev/null @@ -1,35 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.MappedByRelationship; -import org.eclipse.jpt.jpa.core.resource.java.OwnableRelationshipMappingAnnotation; - -/** - * Java "mapped by" relationship (1:1, 1:m, m:m) - * <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 JavaMappedByRelationship - extends MappedByRelationship, JavaRelationship -{ - JavaMappedByRelationshipStrategy getMappedByStrategy(); - - OwnableRelationshipMappingAnnotation getMappingAnnotation(); - - OwnableRelationshipMappingAnnotation getMappingAnnotationForUpdate(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.java deleted file mode 100644 index 77b3356adb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedByRelationshipStrategy.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy; - -/** - * Java "mapped by" relationship strategy - * <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 JavaMappedByRelationshipStrategy - extends JavaRelationshipStrategy, MappedByRelationshipStrategy -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java deleted file mode 100644 index 1ccd402c93..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappedSuperclass.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.MappedSuperclass; -import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation; - -/** - * 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 2.3 - * @since 2.0 - */ -public interface JavaMappedSuperclass - extends MappedSuperclass, JavaTypeMapping -{ - MappedSuperclassAnnotation getMappingAnnotation(); - - JavaIdClassReference getIdClassReference(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java deleted file mode 100644 index 8dfcbb3dd6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinColumnRelationship.java +++ /dev/null @@ -1,26 +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.core.context.java; - -/** - * Java mapping join column relationship (1:1, 1:m, m:1) - * <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 JavaMappingJoinColumnRelationship - extends JavaJoinColumnRelationship, - JavaMappingRelationship -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java deleted file mode 100644 index 7ee0f2b173..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingJoinTableRelationship.java +++ /dev/null @@ -1,26 +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.core.context.java; - -/** - * Java mapping join table relationship (1:1, 1:m, m:1, m:m) - * <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 JavaMappingJoinTableRelationship - extends JavaJoinTableRelationship, - JavaMappingRelationship -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.java deleted file mode 100644 index e47c8299b1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMappingRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.MappingRelationship; - -/** - * Java mapping relationship (1:1, 1:m, m:1, m:m) - * <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 JavaMappingRelationship - extends MappingRelationship, JavaRelationship -{ - JavaRelationshipMapping getMapping(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.java deleted file mode 100644 index d0ceb37255..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaMultiRelationshipMapping.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.MultiRelationshipMapping; - -/** - * Java multi-valued relationship (1:m, 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.3 - * @since 2.0 - */ -public interface JavaMultiRelationshipMapping - extends MultiRelationshipMapping, JavaRelationshipMapping, JavaCollectionMapping -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java deleted file mode 100644 index 6fbca4a8f3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedColumn.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.NamedColumn; -import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation; - -/** - * Java - * <ul> - * <li>column - * <li>join column - * <li>primary key join column - * <li>discriminator column - * <li>order column - * </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.3 - * @since 2.0 - */ -public interface JavaNamedColumn - extends NamedColumn, JavaReadOnlyNamedColumn -{ - NamedColumnAnnotation getColumnAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java deleted file mode 100644 index 3c8ddfa1b5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedNativeQuery.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.NamedNativeQuery; -import org.eclipse.jpt.jpa.core.resource.java.NamedNativeQueryAnnotation; - -/** - * Java named native query - * <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.0 - */ -public interface JavaNamedNativeQuery - extends NamedNativeQuery, JavaQuery -{ - NamedNativeQueryAnnotation getQueryAnnotation(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java deleted file mode 100644 index d20b49c229..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaNamedQuery.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.NamedQuery; -import org.eclipse.jpt.jpa.core.resource.java.NamedQueryAnnotation; - -/** - * Java named query - * <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.0 - */ -public interface JavaNamedQuery - extends NamedQuery, JavaQuery -{ - NamedQueryAnnotation getQueryAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java deleted file mode 100644 index dc6461010b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyMapping.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.OneToManyMapping; -import org.eclipse.jpt.jpa.core.resource.java.OneToManyAnnotation; - -/** - * Java 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 2.2 - * @since 2.0 - */ -public interface JavaOneToManyMapping - extends OneToManyMapping, JavaMultiRelationshipMapping -{ - OneToManyAnnotation getMappingAnnotation(); - - OneToManyAnnotation getAnnotationForUpdate(); - - JavaOneToManyRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.java deleted file mode 100644 index dab064d031..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToManyRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.OneToManyRelationship; - -/** - * 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. - * - * @version 2.2 - * @since 2.2 - */ -public interface JavaOneToManyRelationship - extends OneToManyRelationship, - JavaMappedByRelationship, - JavaMappingJoinTableRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java deleted file mode 100644 index b98d965be9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneMapping.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.OneToOneMapping; -import org.eclipse.jpt.jpa.core.resource.java.OneToOneAnnotation; - -/** - * Java 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.0 - */ -public interface JavaOneToOneMapping - extends OneToOneMapping, JavaSingleRelationshipMapping -{ - OneToOneAnnotation getMappingAnnotation(); - - OneToOneAnnotation getAnnotationForUpdate(); - - JavaOneToOneRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java deleted file mode 100644 index 3715ccf9e2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOneToOneRelationship.java +++ /dev/null @@ -1,33 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.OneToOneRelationship; - -/** - * Java 1:1 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 JavaOneToOneRelationship - extends OneToOneRelationship, - JavaMappedByRelationship, - JavaPrimaryKeyJoinColumnRelationship, - JavaMappingJoinColumnRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java deleted file mode 100644 index 2a5c042baf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOrderable.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.Orderable; - -/** - * Multi-valued (1:m, m:m) relationship mappings support ordering. - * <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 JavaOrderable - extends Orderable, JavaJpaContextNode -{ - JavaAttributeMapping getParent(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.java deleted file mode 100644 index d7ccd3b444..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverride.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation; - -/** - * <em>Specified</em> Java override - * <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.3 - */ -public interface JavaOverride - extends Override_, JavaReadOnlyOverride -{ - OverrideAnnotation getOverrideAnnotation(); - - // covariant overrides - JavaVirtualOverride convertToVirtual(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java deleted file mode 100644 index b300c2b616..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java +++ /dev/null @@ -1,65 +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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.resource.java.JavaResourceMember; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.OverrideContainer; -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.context.VirtualOverride; - -/** - * Java attribute or association override 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 2.3 - * @since 2.3 - */ -public interface JavaOverrideContainer - extends OverrideContainer, JavaJpaContextNode -{ - /** - * Return the names of all the container's overrides, specified and virtual. - * This is used by the <code>orm.xml</code> override container so any - * invalid Java overrides (i.e. overrides for a non-existent or - * non-overridable attributes) are included among the <code>orm.xml</code> - * virtual overrides. - * @see org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmEntity.OverrideContainerOwner#getJavaOverrideNames() - */ - Iterable<String> getOverrideNames(); - - // covariant overrides - ListIterable<? extends JavaReadOnlyOverride> getOverrides(); - JavaReadOnlyOverride getOverrideNamed(String name); - ListIterable<? extends JavaOverride> getSpecifiedOverrides(); - JavaOverride getSpecifiedOverride(int index); - JavaOverride getSpecifiedOverrideNamed(String name); - ListIterable<? extends JavaVirtualOverride> getVirtualOverrides(); - JavaVirtualOverride convertOverrideToVirtual(Override_ specifiedOverride); - JavaOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** owner ********** - - interface Owner - extends OverrideContainer.Owner - { - JavaResourceMember getResourceMember(); - - TextRange getValidationTextRange(CompilationUnit astRoot); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.java deleted file mode 100644 index 486182aeca..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.OverrideRelationship; -import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation; - -/** - * Java association override 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 JavaOverrideRelationship - extends OverrideRelationship, - JavaJoinColumnRelationship -{ - AssociationOverrideAnnotation getOverrideAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java deleted file mode 100644 index 73637c835f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; -import org.eclipse.jpt.common.core.resource.java.JavaResourceField; -import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod; -import org.eclipse.jpt.jpa.core.context.CollectionMapping; -import org.eclipse.jpt.jpa.core.context.Embeddable; -import org.eclipse.jpt.jpa.core.context.PersistentAttribute; -import org.eclipse.jpt.jpa.core.jpa2.resource.java.JPA2_0; - -/** - * Context Java persistent <em>attribute</em> (field or property). - * <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.0 - */ -public interface JavaPersistentAttribute - extends PersistentAttribute, JavaJpaContextNode -{ - // ********** covariant overrides ********** - - JavaAttributeMapping getMapping(); - - JavaAttributeMapping setMappingKey(String key); - - - // ********** misc ********** - - /** - * Return the accessor(field/property) for the attribute - */ - Accessor getAccessor(); - - /** - * Return the corresponding <em>resource</em> attribute. - * This is the attribute (field/method) that is annotated. - * @see Accessor#getResourceAttribute() - */ - JavaResourceAttribute getResourceAttribute(); - - /** - * @see Accessor#isFor(JavaResourceField) - */ - boolean isFor(JavaResourceField resourceField); - - /** - * @see Accessor#isFor(JavaResourceMethod, JavaResourceMethod) - */ - boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter); - - /** - * Return whether the attribute contains the given offset into its Java - * source code file. - */ - boolean contains(int offset, CompilationUnit astRoot); - - /** - * Return the embeddable (type mapping) corresponding to the persistent - * attribute's type. Return <code>null</code> if it is not found. - */ - Embeddable getEmbeddable(); - - // ********** type ********** - - /** - * Return whether the attribute's type is valid for a default basic mapping. - */ - boolean typeIsBasic(); - - /** - * Return the attribute's type name if it is valid as a target type - * (i.e. the type is neither an array nor a "container"). - */ - String getSingleReferenceTargetTypeName(); - - /** - * If the attribute's type is an appropriate "container" type, - * return the type parameter that can be used as a target type. - * Return null if the attribute is not a container or if the type - * parameter is not valid as a target type (i.e. it is either - * an array or a "container"). - */ - String getMultiReferenceTargetTypeName(); - - /** - * If the attribute's type is a map type, - * return the type parameter that can be used as a key type. - * Return null if the attribute is not a map or if the type - * parameter is not valid as a key type (i.e. it is either - * an array or a "container"). - */ - String getMultiReferenceMapKeyTypeName(); - - /** - * Return the JpaContainer that corresponds to this attribute's type. - * Return a null implementation if the type is not a container (map or collection) - */ - JpaContainerDefinition getJpaContainerDefinition(); - - - // ********** JPA container ********** - - /** - * JPA container definition interface (and null implementation) - */ - interface JpaContainerDefinition { - String getTypeName(); - boolean isContainer(); - boolean isMap(); - String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute); - String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute); - String getMetamodelContainerFieldTypeName(); - String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping); - - final class Null implements JpaContainerDefinition { - public static final JpaContainerDefinition INSTANCE = new Null(); - public static JpaContainerDefinition instance() { - return INSTANCE; - } - // ensure single instance - private Null() { - super(); - } - public String getTypeName() { - return null; - } - public boolean isContainer() { - return false; - } - public boolean isMap() { - return false; - } - public String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute) { - return null; - } - public String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute) { - return null; - } - public String getMetamodelContainerFieldTypeName() { - return JPA2_0.COLLECTION_ATTRIBUTE; - } - public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) { - return null; - } - @Override - public String toString() { - return JpaContainerDefinition.class.getSimpleName() + ".Null"; //$NON-NLS-1$ - } - } - } - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java deleted file mode 100644 index 30200d7a66..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentType.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; -import org.eclipse.jpt.common.core.resource.java.JavaResourceType; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.PersistentType; - -/** - * Context Java persistent type. - * <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.0 - */ -public interface JavaPersistentType - extends PersistentType, JavaJpaContextNode -{ - // ********** covariant overrides ********** - - JavaTypeMapping getMapping(); - - ListIterable<JavaPersistentAttribute> getAttributes(); - String ATTRIBUTES_LIST = "attributes"; //$NON-NLS-1$ - - JavaPersistentAttribute getAttributeNamed(String attributeName); - - - // ********** Java ********** - - /** - * Return whether any attribute in this persistent type is annotated - */ - boolean hasAnyAnnotatedAttributes(); - - /** - * Return the Java resource persistent type. - */ - JavaResourceType getJavaResourceType(); - - JavaPersistentAttribute getAttributeFor(JavaResourceAttribute javaResourceAttribute); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java deleted file mode 100644 index 6c047186b5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumn.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation; - -/** - * Java primary key join 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 2.1 - * @since 2.0 - */ -public interface JavaPrimaryKeyJoinColumn - extends PrimaryKeyJoinColumn, JavaBaseJoinColumn -{ - PrimaryKeyJoinColumnAnnotation getColumnAnnotation(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java deleted file mode 100644 index 6c47161927..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationship.java +++ /dev/null @@ -1,31 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationship; - -/** - * Java primary key join column relationship (1:1) - * <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 JavaPrimaryKeyJoinColumnRelationship - extends PrimaryKeyJoinColumnRelationship, - JavaMappingRelationship -{ - JavaPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java deleted file mode 100644 index 6c5dfea50d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPrimaryKeyJoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,34 +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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationshipStrategy; - -/** - * Java primary key join column relationship strategy - * <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 JavaPrimaryKeyJoinColumnRelationshipStrategy - extends JavaRelationshipStrategy, PrimaryKeyJoinColumnRelationshipStrategy -{ - ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - JavaPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index); - JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(); - JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java deleted file mode 100644 index da27403d3f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.Query; -import org.eclipse.jpt.jpa.core.resource.java.QueryAnnotation; - -/** - * Java named and named native queries - * <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.0 - * @since 2.0 - */ -public interface JavaQuery - extends Query, JavaJpaContextNode -{ - QueryAnnotation getQueryAnnotation(); - - - // ********** hints ********** - - ListIterable<JavaQueryHint> getHints(); - - JavaQueryHint addHint(); - - JavaQueryHint addHint(int index); - - - // ********** validation ********** - - TextRange getNameTextRange(CompilationUnit astRoot); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java deleted file mode 100644 index 044261ba17..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryContainer.java +++ /dev/null @@ -1,52 +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.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.QueryContainer; - -/** - * Java query 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 2.3 - * @since 2.3 - */ -public interface JavaQueryContainer - extends QueryContainer, JavaJpaContextNode -{ - // ********** named queries ********** - - ListIterable<JavaNamedQuery> getNamedQueries(); - - JavaNamedQuery addNamedQuery(); - - JavaNamedQuery addNamedQuery(int index); - - - // ********** named native queries ********** - - ListIterable<JavaNamedNativeQuery> getNamedNativeQueries(); - - JavaNamedNativeQuery addNamedNativeQuery(); - - JavaNamedNativeQuery addNamedNativeQuery(int index); - - interface Owner - { - JavaResourceAnnotatedElement getResourceAnnotatedElement(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java deleted file mode 100644 index 859b893437..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQueryHint.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.QueryHint; -import org.eclipse.jpt.jpa.core.resource.java.QueryHintAnnotation; - -/** - * Java query hint - * <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.0 - */ -public interface JavaQueryHint - extends QueryHint, JavaJpaContextNode -{ - QueryHintAnnotation getQueryHintAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java deleted file mode 100644 index 72aca913ba..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAssociationOverride.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride; - -/** - * Java read-only association override - * <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 JavaReadOnlyAssociationOverride - extends ReadOnlyAssociationOverride, JavaReadOnlyOverride -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java deleted file mode 100644 index 151b828022..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyAttributeOverride.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride; - -/** - * Read-only Java attribute override - * <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 JavaReadOnlyAttributeOverride - extends ReadOnlyAttributeOverride, JavaReadOnlyOverride -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java deleted file mode 100644 index f2f463dc80..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java +++ /dev/null @@ -1,45 +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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn; - -/** - * Java read-only column or join 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 JavaReadOnlyBaseColumn - extends ReadOnlyBaseColumn, JavaReadOnlyNamedColumn -{ - /** - * Return the (best guess) text location of the column's table. - */ - TextRange getTableTextRange(CompilationUnit astRoot); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner - extends ReadOnlyBaseColumn.Owner, JavaReadOnlyNamedColumn.Owner - { - // combine interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java deleted file mode 100644 index e391b7f967..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java +++ /dev/null @@ -1,46 +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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn; - -/** - * Java read-only join column or primary key join 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 JavaReadOnlyBaseJoinColumn - extends ReadOnlyBaseJoinColumn, JavaReadOnlyNamedColumn -{ - /** - * Return the (best guess) text location of the join column's - * referenced column name. - */ - TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot); - - - // ********** owner ********** - - /** - * interface allowing join columns to be used in multiple places - * (e.g. 1:1 mappings and join tables) - */ - interface Owner - extends ReadOnlyBaseJoinColumn.Owner, JavaReadOnlyNamedColumn.Owner - { - // combine interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java deleted file mode 100644 index 8e7a5b4840..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java +++ /dev/null @@ -1,36 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn; - -/** - * Java read-only join 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 2.3 - * @since 2.0 - */ -public interface JavaReadOnlyJoinColumn - extends ReadOnlyJoinColumn, JavaReadOnlyBaseJoinColumn, JavaReadOnlyBaseColumn -{ - // ********** owner ********** - - interface Owner - extends ReadOnlyJoinColumn.Owner, JavaReadOnlyBaseJoinColumn.Owner, JavaReadOnlyBaseColumn.Owner - { - // combine interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java deleted file mode 100644 index 2f6b9d688c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java +++ /dev/null @@ -1,56 +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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.NamedColumn; -import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn; - -/** - * Java read-only - * <ul> - * <li>column - * <li>join column - * <li>primary key join column - * <li>discriminator column - * <li>order column - * </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. - */ -public interface JavaReadOnlyNamedColumn - extends ReadOnlyNamedColumn, JavaJpaContextNode -{ - /** - * Return the (best guess) text location of the column's name. - */ - TextRange getNameTextRange(CompilationUnit astRoot); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner - extends NamedColumn.Owner - { - /** - * Return the column owner's text range. This can be returned by the - * column when its annotation is not present. - */ - TextRange getValidationTextRange(CompilationUnit astRoot); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java deleted file mode 100644 index 651e56ff29..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java +++ /dev/null @@ -1,32 +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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride; - -/** - * Read-only Java override - * <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 JavaReadOnlyOverride - extends ReadOnlyOverride, JavaJpaContextNode -{ - /** - * Return the (best guess) text location of the override's name. - */ - TextRange getNameTextRange(CompilationUnit astRoot); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.java deleted file mode 100644 index 59aae9e166..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship; - -/** - * Java relationship (join column, join table, mapped by, primary key join - * column, 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 JavaReadOnlyRelationship - extends ReadOnlyRelationship, JavaJpaContextNode -{ - JavaReadOnlyRelationshipStrategy getStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java deleted file mode 100644 index 196563f5ce..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyRelationshipStrategy.java +++ /dev/null @@ -1,27 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy; - -/** - * Java read-only relationship strategy - * <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 JavaReadOnlyRelationshipStrategy - extends ReadOnlyRelationshipStrategy, JavaJpaContextNode -{ - JavaReadOnlyRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java deleted file mode 100644 index b2b2d342d7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.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.core.context.java; - -import org.eclipse.jdt.core.dom.CompilationUnit; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyTable; - -/** - * Java read-only table - * <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 JavaReadOnlyTable - extends ReadOnlyTable, JavaJpaContextNode -{ - TextRange getNameTextRange(CompilationUnit astRoot); - TextRange getSchemaTextRange(CompilationUnit astRoot); - TextRange getCatalogTextRange(CompilationUnit astRoot); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.java deleted file mode 100644 index f0d2546f07..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyUniqueConstraint.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint; - -/** - * Java read-only unique constraint - * <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 JavaReadOnlyUniqueConstraint - extends ReadOnlyUniqueConstraint, JavaJpaContextNode -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java deleted file mode 100644 index b93abfeda9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReferenceTable.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.ReferenceTable; -import org.eclipse.jpt.jpa.core.resource.java.ReferenceTableAnnotation; - -/** - * Java reference table - * <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 JavaReferenceTable - extends ReferenceTable, JavaTable -{ - ReferenceTableAnnotation getTableAnnotation(); - - - // ********** join columns ********** - - ListIterable<JavaJoinColumn> getJoinColumns(); - - ListIterable<JavaJoinColumn> getSpecifiedJoinColumns(); - JavaJoinColumn getSpecifiedJoinColumn(int index); - JavaJoinColumn addSpecifiedJoinColumn(); - JavaJoinColumn addSpecifiedJoinColumn(int index); - - JavaJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java deleted file mode 100644 index 088cd7bd3a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationship.java +++ /dev/null @@ -1,31 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.Relationship; - -/** - * Java relationship (join column, join table, mapped by, primary key join - * column, 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 JavaRelationship - extends Relationship, JavaReadOnlyRelationship -{ - JavaRelationshipStrategy getStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java deleted file mode 100644 index 7636c3885d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipMapping.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.RelationshipMapping; -import org.eclipse.jpt.jpa.core.resource.java.RelationshipMappingAnnotation; - -/** - * Java 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.3 - * @since 2.0 - */ -public interface JavaRelationshipMapping - extends RelationshipMapping, JavaAttributeMapping -{ - RelationshipMappingAnnotation getMappingAnnotation(); - - RelationshipMappingAnnotation getAnnotationForUpdate(); - - JavaCascade getCascade(); - - JavaMappingRelationship getRelationship(); - - /** - * If the target entity is specified, this will return it fully qualified. - * If not specified, it returns the default target entity, which is always - * fully qualified - */ - String getFullyQualifiedTargetEntity(); - String FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY = "fullyQualifiedTargetEntity"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.java deleted file mode 100644 index f658507620..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaRelationshipStrategy.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.RelationshipStrategy; - -/** - * Java relationship strategy - * <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.2 - */ -public interface JavaRelationshipStrategy - extends RelationshipStrategy, JavaReadOnlyRelationshipStrategy -{ - JavaRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java deleted file mode 100644 index f36f708557..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSecondaryTable.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.SecondaryTable; -import org.eclipse.jpt.jpa.core.resource.java.SecondaryTableAnnotation; - -/** - * Java secondary table - * <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.0 - */ -public interface JavaSecondaryTable - extends SecondaryTable, JavaTable -{ - JavaEntity getParent(); - - SecondaryTableAnnotation getTableAnnotation(); - - - // ********** primary key join columns ********** - - ListIterable<JavaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<JavaPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(); - JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index); - JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java deleted file mode 100644 index f00727d412..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSequenceGenerator.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.SequenceGenerator; -import org.eclipse.jpt.jpa.core.resource.java.SequenceGeneratorAnnotation; - -/** - * Java sequence generator - * <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.0 - */ -public interface JavaSequenceGenerator - extends JavaGenerator, SequenceGenerator -{ - SequenceGeneratorAnnotation getGeneratorAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java deleted file mode 100644 index fc688ddfff..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaSingleRelationshipMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.SingleRelationshipMapping; -import org.eclipse.jpt.jpa.core.resource.java.SingleRelationshipMappingAnnotation; - -/** - * Java single (m:1, 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.0 - */ -public interface JavaSingleRelationshipMapping - extends SingleRelationshipMapping, JavaRelationshipMapping -{ - SingleRelationshipMappingAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java deleted file mode 100644 index e95b3def50..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaStructureNodes.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.JptJpaCorePlugin; - -/** - * - * - * 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.0 - * @since 2.0 - */ -public interface JavaStructureNodes -{ - String COMPILATION_UNIT_ID = - JptJpaCorePlugin.PLUGIN_ID + ".java.compilationUnit"; //$NON-NLS-1$ - - String PERSISTENT_TYPE_ID = - JptJpaCorePlugin.PLUGIN_ID + ".java.persistentType"; //$NON-NLS-1$ - - String PERSISTENT_ATTRIBUTE_ID = - JptJpaCorePlugin.PLUGIN_ID + ".java.persistentAttribute"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java deleted file mode 100644 index b34de68cad..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTable.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.Table; -import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation; - -/** - * Java table - * <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.0 - */ -public interface JavaTable - extends Table, JavaReadOnlyTable -{ - BaseTableAnnotation getTableAnnotation(); - - ListIterable<JavaUniqueConstraint> getUniqueConstraints(); - JavaUniqueConstraint getUniqueConstraint(int index); - JavaUniqueConstraint addUniqueConstraint(); - JavaUniqueConstraint addUniqueConstraint(int index); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java deleted file mode 100644 index ee8dba64e9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTableGenerator.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.TableGenerator; -import org.eclipse.jpt.jpa.core.resource.java.TableGeneratorAnnotation; - -/** - * Java table generator - * <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.0 - */ -public interface JavaTableGenerator - extends JavaGenerator, TableGenerator -{ - TableGeneratorAnnotation getGeneratorAnnotation(); - - @SuppressWarnings("unchecked") - Iterable<JavaUniqueConstraint> getUniqueConstraints(); - - JavaUniqueConstraint addUniqueConstraint(int index); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java deleted file mode 100644 index 29055561a9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java +++ /dev/null @@ -1,57 +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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.jpa.core.JpaFactory; -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.TemporalConverter; -import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation; - -/** - * Java temporal 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. - */ -public interface JavaTemporalConverter - extends TemporalConverter, JavaConverter -{ - // ********** adapter ********** - - public static class Adapter - extends JavaConverter.AbstractAdapter - { - private static final Adapter INSTANCE = new Adapter(); - public static Adapter instance() { - return INSTANCE; - } - - private Adapter() { - super(); - } - - public Class<? extends Converter> getConverterType() { - return TemporalConverter.class; - } - - @Override - protected String getAnnotationName() { - return TemporalAnnotation.ANNOTATION_NAME; - } - - public JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory) { - return factory.buildJavaTemporalConverter(parent, (TemporalAnnotation) converterAnnotation); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java deleted file mode 100644 index eed007e2aa..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTransientMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.TransientMapping; -import org.eclipse.jpt.jpa.core.resource.java.TransientAnnotation; - -/** - * Java transient "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.0 - * @since 2.0 - */ -public interface JavaTransientMapping - extends JavaAttributeMapping, TransientMapping -{ - TransientAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java deleted file mode 100644 index c03af30914..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMapping.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.common.core.resource.java.JavaResourceType; -import org.eclipse.jpt.jpa.core.context.TypeMapping; - -/** - * 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. - * - * @version 2.3 - * @since 2.0 - */ -public interface JavaTypeMapping - extends TypeMapping, JavaJpaContextNode -{ - JavaResourceType getJavaResourceType(); - - Annotation getMappingAnnotation(); - - - // ********** covariant overrides ********** - - JavaPersistentType getPersistentType(); - - @SuppressWarnings("unchecked") - Iterable<JavaAttributeMapping> getAttributeMappings(); - - @SuppressWarnings("unchecked") - Iterable<JavaAttributeMapping> getAttributeMappings(String mappingKey); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java deleted file mode 100644 index 27ccf16bb5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTypeMappingDefinition.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.java; - -import org.eclipse.jpt.common.core.resource.java.Annotation; -import org.eclipse.jpt.jpa.core.JpaFactory; - -/** - * Map a string key to a type mapping and its corresponding - * Java annotations. - * <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 JavaTypeMappingDefinition -{ - /** - * Return the type mapping's key. - */ - String getKey(); - - /** - * Return the name of the type mapping's annotation. - */ - String getAnnotationName(); - - /** - * Return the names of the type mapping's "supporting" annotations. - */ - Iterable<String> getSupportingAnnotationNames(); - - /** - * Build a Java type mapping for the specified persistent type and - * annotation. - * Use the specified factory for creation so extenders can simply override - * the appropriate factory method instead of building a definition for the - * same key. - */ - JavaTypeMapping buildMapping(JavaPersistentType persistentType, Annotation annotation, JpaFactory factory); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.java deleted file mode 100644 index 9073653d88..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaUniqueConstraint.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.UniqueConstraint; -import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation; - -/** - * Java unique constraint - * <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.0 - * @since 2.0 - */ -public interface JavaUniqueConstraint - extends UniqueConstraint, JavaReadOnlyUniqueConstraint -{ - UniqueConstraintAnnotation getUniqueConstraintAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java deleted file mode 100644 index d74d02a75b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVersionMapping.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VersionMapping; -import org.eclipse.jpt.jpa.core.resource.java.VersionAnnotation; - -/** - * Java 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 2.3 - * @since 2.0 - */ -public interface JavaVersionMapping - extends VersionMapping, JavaColumnMapping, JavaConvertibleMapping -{ - VersionAnnotation getMappingAnnotation(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.java deleted file mode 100644 index fd15ebd5b8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAssociationOverride.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualAssociationOverride; - -/** - * Java <em>virtual</em> association override - * <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 JavaVirtualAssociationOverride - extends VirtualAssociationOverride, - JavaVirtualOverride, - JavaReadOnlyAssociationOverride -{ - JavaVirtualOverrideRelationship getRelationship(); - - JavaAssociationOverride convertToSpecified(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.java deleted file mode 100644 index 3791994e37..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualAttributeOverride.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualAttributeOverride; - -/** - * Java <em>virtual</em> attribute override - * <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 JavaVirtualAttributeOverride - extends VirtualAttributeOverride, - JavaVirtualOverride, - JavaReadOnlyAttributeOverride -{ - JavaAttributeOverride convertToSpecified(); - - JavaVirtualColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java deleted file mode 100644 index 0841b9ccfe..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java +++ /dev/null @@ -1,46 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn; -import org.eclipse.jpt.jpa.core.context.VirtualColumn; - -/** - * Java virtual 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 JavaVirtualColumn - extends VirtualColumn, JavaReadOnlyBaseColumn -{ - /** - * The overridden column can be either a Java join column or an - * <code>orm.xml</code> join column; so we don't change the return type - * here. - */ - ReadOnlyColumn getOverriddenColumn(); - - - // ********** owner ********** - - interface Owner - extends VirtualColumn.Owner, JavaReadOnlyBaseColumn.Owner - { - /** - * The overridden column can be either a Java column or an - * <code>orm.xml</code> column; so we don't change the return type here. - */ - ReadOnlyColumn resolveOverriddenColumn(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java deleted file mode 100644 index f223e2f187..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumn.java +++ /dev/null @@ -1,33 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn; -import org.eclipse.jpt.jpa.core.context.VirtualJoinColumn; - -/** - * Java virtual join 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 JavaVirtualJoinColumn - extends VirtualJoinColumn, JavaReadOnlyJoinColumn -{ - /** - * The overridden join column can be either a Java join column or an - * <code>orm.xml</code> join column; so we don't change the return type - * here. - */ - ReadOnlyJoinColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.java deleted file mode 100644 index dfb9d21642..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationship; - -/** - * Java virtual join column 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 JavaVirtualJoinColumnRelationship - extends VirtualJoinColumnRelationship, - JavaVirtualRelationship -{ - JavaVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.java deleted file mode 100644 index 2e0262d863..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinColumnRelationshipStrategy.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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationshipStrategy; - -/** - * Java virtual join column relationship strategy. - * <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 JavaVirtualJoinColumnRelationshipStrategy - extends VirtualJoinColumnRelationshipStrategy, JavaVirtualRelationshipStrategy -{ - ListIterable<JavaVirtualJoinColumn> getJoinColumns(); - ListIterable<JavaVirtualJoinColumn> getSpecifiedJoinColumns(); - JavaVirtualJoinColumn getSpecifiedJoinColumn(int index); - JavaVirtualJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java deleted file mode 100644 index a70f5dbbbe..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTable.java +++ /dev/null @@ -1,49 +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.core.context.java; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable; -import org.eclipse.jpt.jpa.core.context.VirtualJoinTable; - -/** - * Java virtual join table - * <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 JavaVirtualJoinTable - extends VirtualJoinTable, JavaReadOnlyTable -{ - JavaVirtualJoinTableRelationshipStrategy getParent(); - - ListIterable<JavaVirtualUniqueConstraint> getUniqueConstraints(); - JavaVirtualUniqueConstraint getUniqueConstraint(int index); - - ListIterable<JavaVirtualJoinColumn> getJoinColumns(); - ListIterable<JavaVirtualJoinColumn> getSpecifiedJoinColumns(); - JavaVirtualJoinColumn getSpecifiedJoinColumn(int index); - JavaVirtualJoinColumn getDefaultJoinColumn(); - - ListIterable<JavaVirtualJoinColumn> getInverseJoinColumns(); - ListIterable<JavaVirtualJoinColumn> getSpecifiedInverseJoinColumns(); - JavaVirtualJoinColumn getSpecifiedInverseJoinColumn(int index); - JavaVirtualJoinColumn getDefaultInverseJoinColumn(); - - /** - * The overridden table can be either a Java table - * or an <code>orm.xml</code> table; so we don't change the - * return type here. - */ - public ReadOnlyJoinTable getOverriddenTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.java deleted file mode 100644 index 5f2963c8b2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationship; - -/** - * Java virtual join table 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 JavaVirtualJoinTableRelationship - extends VirtualJoinTableRelationship, - JavaVirtualRelationship -{ - JavaVirtualJoinTableRelationshipStrategy getJoinTableStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.java deleted file mode 100644 index 7c8ea38e78..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualJoinTableRelationshipStrategy.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationshipStrategy; - -/** - * Java virtual join table relationship strategy. - * <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 JavaVirtualJoinTableRelationshipStrategy - extends VirtualJoinTableRelationshipStrategy, JavaVirtualRelationshipStrategy -{ - JavaVirtualJoinTable getJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.java deleted file mode 100644 index c8427e4766..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverride.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualOverride; - -/** - * Java <em>virtual</em><ul> - * <li>attribute override - * <li>association override - * </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. - */ -public interface JavaVirtualOverride - extends VirtualOverride, JavaReadOnlyOverride -{ - JavaOverride convertToSpecified(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.java deleted file mode 100644 index 5a63e37edc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualOverrideRelationship.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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualOverrideRelationship; - -/** - * Java virtual association override 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 JavaVirtualOverrideRelationship - extends VirtualOverrideRelationship, - JavaVirtualJoinColumnRelationship -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java deleted file mode 100644 index fb03325c31..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationship.java +++ /dev/null @@ -1,27 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualRelationship; - -/** - * Java virtual 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 JavaVirtualRelationship - extends VirtualRelationship, JavaReadOnlyRelationship -{ - JavaVirtualRelationshipStrategy getStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java deleted file mode 100644 index 850754310e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualRelationshipStrategy.java +++ /dev/null @@ -1,27 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.VirtualRelationshipStrategy; - -/** - * Java virtual strategy - * <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 JavaVirtualRelationshipStrategy - extends VirtualRelationshipStrategy, JavaReadOnlyRelationshipStrategy -{ - JavaVirtualRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java deleted file mode 100644 index e3429579fb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualUniqueConstraint.java +++ /dev/null @@ -1,33 +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.core.context.java; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint; -import org.eclipse.jpt.jpa.core.context.VirtualUniqueConstraint; - -/** - * Java virtual database unique constraint - * <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 JavaVirtualUniqueConstraint - extends VirtualUniqueConstraint, JavaReadOnlyUniqueConstraint -{ - /** - * The overridden unique constraint can be either a Java unique constraint - * or an <code>orm.xml</code> unique constraint; so we don't change the - * return type here. - */ - ReadOnlyUniqueConstraint getOverriddenUniqueConstraint(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java deleted file mode 100644 index 0e77913758..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java +++ /dev/null @@ -1,195 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.AccessType; -import org.eclipse.jpt.jpa.core.context.MappingFileRoot; -import org.eclipse.jpt.jpa.core.context.PersistentType; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings; -import org.eclipse.jpt.jpa.db.Catalog; -import org.eclipse.jpt.jpa.db.Schema; -import org.eclipse.jpt.jpa.db.SchemaContainer; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * Context model corresponding to the - * XML resource model {@link XmlEntityMappings}, - * which corresponds to the <code>entity-mappings</code> element - * in the <code>orm.xml</code> file. - * <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.0 -*/ -public interface EntityMappings - extends MappingFileRoot, PersistentType.Owner -{ - /** - * Covariant override. - */ - OrmXml getParent(); - - XmlEntityMappings getXmlEntityMappings(); - - String getVersion(); - - String getDescription(); - void setDescription(String description); - String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$ - - /** - * "The <code>package</code> subelement specifies the package of the - * classes listed within the subelements and attributes of the same mapping - * file only. The <code>package</code> subelement is overridden if the fully - * qualified class name is specified for a class and the two disagree." - * <p> - * <strong>NB:</strong> No mention of how to resolve duplicates in the - * "default" package or sub-packages:<ul> - * <li><code>Bar</code> (in "default" package) vs. <code>foo.Bar</code> - * <li><code>baz.Bar</code> vs. <code>foo.baz.Bar</code> - * </ul> - * when package is specified as <code>foo</code>. - */ - String getPackage(); - void setPackage(String package_); - String PACKAGE_PROPERTY = "package"; //$NON-NLS-1$ - - AccessType getSpecifiedAccess(); - void setSpecifiedAccess(AccessType access); - String SPECIFIED_ACCESS_PROPERTY = "specifiedAccess"; //$NON-NLS-1$ - AccessType getDefaultAccess(); - String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$ - - /** - * Return the database schema container, which can be either a catalog or, - * if the database does not support catalogs, the database itself. - */ - SchemaContainer getDbSchemaContainer(); - - String getSpecifiedCatalog(); - void setSpecifiedCatalog(String catalog); - String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$ - String getDefaultCatalog(); - String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$ - Catalog getDbCatalog(); - - String getSpecifiedSchema(); - void setSpecifiedSchema(String schema); - String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$ - String getDefaultSchema(); - String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$ - Schema getDbSchema(); - - /** - * Covariant override. - */ - OrmPersistenceUnitMetadata getPersistenceUnitMetadata(); - - /** - * Covariant override. - */ - ListIterable<OrmPersistentType> getPersistentTypes(); - OrmPersistentType getPersistentType(String className); - int getPersistentTypesSize(); - OrmPersistentType addPersistentType(String mappingKey, String className); - void removePersistentType(int index); - void removePersistentType(OrmPersistentType persistentType); - //void movePersistentType(int targetIndex, int sourceIndex); - boolean containsPersistentType(String className); - String PERSISTENT_TYPES_LIST = "persistentTypes"; //$NON-NLS-1$ - - ListIterable<OrmSequenceGenerator> getSequenceGenerators(); - int getSequenceGeneratorsSize(); - OrmSequenceGenerator addSequenceGenerator(); - OrmSequenceGenerator addSequenceGenerator(int index); - void removeSequenceGenerator(int index); - void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator); - void moveSequenceGenerator(int targetIndex, int sourceIndex); - String SEQUENCE_GENERATORS_LIST = "sequenceGenerators"; //$NON-NLS-1$ - - ListIterable<OrmTableGenerator> getTableGenerators(); - int getTableGeneratorsSize(); - OrmTableGenerator addTableGenerator(); - OrmTableGenerator addTableGenerator(int index); - void removeTableGenerator(int index); - void removeTableGenerator(OrmTableGenerator tableGenerator); - void moveTableGenerator(int targetIndex, int sourceIndex); - String TABLE_GENERATORS_LIST = "tableGenerators"; //$NON-NLS-1$ - - OrmQueryContainer getQueryContainer(); - - /** - * Return the default package to be used for persistent types in this - * context. - */ - String getDefaultPersistentTypePackage(); - - void changeMapping(OrmPersistentType ormPersistentType, OrmTypeMapping oldMapping, OrmTypeMapping newMapping); - - boolean containsOffset(int textOffset); - - /** - * Return the Java resource type for the specified class name - * found in the JPA project. First look for one with the specified - * name (since it might be fully qualified). If not found, prepend the - * default package name and try again. - * - * @see #getPackage() - */ - JavaResourceAbstractType resolveJavaResourceType(String className); - - /** - * Return the persistent type for the specified class name - * found in the persistence unit. First look for one with the specified - * name (since it might be fully qualified). If not found, prepend the - * default package name and try again. - * - * @see #getPackage() - */ - PersistentType resolvePersistentType(String className); - - - - // ********** refactoring ********** - - /** - * Create DeleteEdits for deleting references (if any) to the type about to be deleted. - * Return an EmptyIterable if there are not any references to the given type. - */ - Iterable<DeleteEdit> createDeleteTypeEdits(IType type); - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java deleted file mode 100644 index fa9ef11e5b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/MappingFileDefinition.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.ResourceDefinition; - -/** - * A JPA platform can support multiple mapping files. Each will - * have a unique resource type and must be defined with a mapping file definition. - * <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 MappingFileDefinition - extends ResourceDefinition -{ - // nothing yet -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java deleted file mode 100644 index fa21aa9a48..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/NullOrmAttributeMappingDefinition.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.orm; - -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.jpt.jpa.core.MappingKeys; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping; - -/** - * 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 class NullOrmAttributeMappingDefinition - implements OrmAttributeMappingDefinition -{ - // singleton - private static final OrmAttributeMappingDefinition INSTANCE = - new NullOrmAttributeMappingDefinition(); - - - /** - * Return the singleton. - */ - public static OrmAttributeMappingDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private NullOrmAttributeMappingDefinition() { - super(); - } - - - public String getKey() { - return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY; - } - - public XmlAttributeMapping buildResourceMapping(EFactory factory) { - throw new UnsupportedOperationException(); - } - - public OrmAttributeMapping buildContextMapping(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping, OrmXmlContextNodeFactory factory) { - return factory.buildOrmNullAttributeMapping(parent, (XmlNullAttributeMapping) resourceMapping); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java deleted file mode 100644 index f3ee4a768b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverride.java +++ /dev/null @@ -1,35 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.AssociationOverride; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride; - -/** - * <em>Specified</em> <code>orm.xml</code> association override - * <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.0 - */ -public interface OrmAssociationOverride - extends OrmReadOnlyAssociationOverride, AssociationOverride, OrmOverride -{ - OrmVirtualAssociationOverride convertToVirtual(); - - XmlAssociationOverride getXmlOverride(); - - OrmOverrideRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java deleted file mode 100644 index 8241f04350..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAssociationOverrideContainer.java +++ /dev/null @@ -1,53 +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.core.context.orm; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer; -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.context.VirtualOverride; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride; - -/** - * <code>orm.xml</code> association override 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 2.3 - * @since 2.3 - */ -public interface OrmAssociationOverrideContainer - extends AssociationOverrideContainer, OrmOverrideContainer -{ - // covariant overrides - ListIterable<OrmReadOnlyAssociationOverride> getOverrides(); - OrmReadOnlyAssociationOverride getOverrideNamed(String name); - ListIterable<OrmAssociationOverride> getSpecifiedOverrides(); - OrmAssociationOverride getSpecifiedOverride(int index); - OrmAssociationOverride getSpecifiedOverrideNamed(String name); - ListIterable<OrmVirtualAssociationOverride> getVirtualOverrides(); - OrmVirtualAssociationOverride convertOverrideToVirtual(Override_ specifiedOverride); - OrmAssociationOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** owner ********** - - interface Owner - extends AssociationOverrideContainer.Owner, OrmOverrideContainer.Owner - { - @SuppressWarnings("unchecked") - EList<XmlAssociationOverride> getXmlOverrides(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java deleted file mode 100644 index 9c298bf8fb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMapping.java +++ /dev/null @@ -1,115 +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.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.AttributeMapping; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.Attributes; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * <code>orm.xml</code> attribute 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 2.3 - */ -public interface OrmAttributeMapping - extends AttributeMapping, XmlContextNode -{ - OrmPersistentAttribute getParent(); - - OrmPersistentAttribute getPersistentAttribute(); - - XmlAttributeMapping getXmlAttributeMapping(); - - OrmTypeMapping getTypeMapping(); - - void setName(String name); - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - /** - * Attributes are a sequence in the <code>orm.xml</code> schema. We must keep - * the list of attributes in the appropriate order so the WTP XML - * translators will write them to the XML document in that order and they - * will adhere to the schema. - * <p> - * Each implementation must implement this - * method and return a number that matches its order in the schema. - */ - int getXmlSequence(); - - void addXmlAttributeMappingTo(Attributes resourceAttributes); - - void removeXmlAttributeMappingFrom(Attributes resourceAttributes); - - boolean contains(int textOffset); - - TextRange getSelectionTextRange(); - - TextRange getNameTextRange(); - - - // ********** morphing mappings ********** - - void initializeOn(OrmAttributeMapping newMapping); - - void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping); - - void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping); - - void initializeFromOrmIdMapping(OrmIdMapping oldMapping); - - void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping); - - void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping); - - void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping); - - void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping); - - void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping); - - void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping); - - void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping); - - void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping); - - - // ********** refactoring ********** - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java deleted file mode 100644 index d6f5e55b84..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeMappingDefinition.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping; - -/** - * Part of mechanism to extend the types of <code>orm.xml</code> attribute - * mappings. - * <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 OrmAttributeMappingDefinition -{ - /** - * Return the definition's mapping key. - */ - String getKey(); - - /** - * Build a resource mapping. - */ - XmlAttributeMapping buildResourceMapping(EFactory factory); - - /** - * Build a context mapping. - */ - OrmAttributeMapping buildContextMapping( - OrmPersistentAttribute parent, - XmlAttributeMapping resourceMapping, - OrmXmlContextNodeFactory factory); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java deleted file mode 100644 index b42c1826ce..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverride.java +++ /dev/null @@ -1,35 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.AttributeOverride; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride; - -/** - * <em>Specified</em> <code>orm.xml</code> attribute override - * <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.0 - */ -public interface OrmAttributeOverride - extends OrmReadOnlyAttributeOverride, AttributeOverride, OrmOverride -{ - OrmVirtualAttributeOverride convertToVirtual(); - - XmlAttributeOverride getXmlOverride(); - - OrmColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java deleted file mode 100644 index cd0d995573..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmAttributeOverrideContainer.java +++ /dev/null @@ -1,55 +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.core.context.orm; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer; -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.context.VirtualOverride; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride; - -/** - * <code>orm.xml</code> attribute override 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 2.3 - * @since 2.3 - */ -public interface OrmAttributeOverrideContainer - extends AttributeOverrideContainer, OrmOverrideContainer -{ - void initializeFrom(OrmAttributeOverrideContainer oldContainer); - - // covariant overrides - ListIterable<OrmReadOnlyAttributeOverride> getOverrides(); - OrmReadOnlyAttributeOverride getOverrideNamed(String name); - ListIterable<OrmAttributeOverride> getSpecifiedOverrides(); - OrmAttributeOverride getSpecifiedOverride(int index); - OrmAttributeOverride getSpecifiedOverrideNamed(String name); - ListIterable<OrmVirtualAttributeOverride> getVirtualOverrides(); - OrmVirtualAttributeOverride convertOverrideToVirtual(Override_ specifiedOverride); - OrmAttributeOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - // ********** owner ********** - - interface Owner - extends AttributeOverrideContainer.Owner, OrmOverrideContainer.Owner - { - @SuppressWarnings("unchecked") - EList<XmlAttributeOverride> getXmlOverrides(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java deleted file mode 100644 index f4079361d0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseColumn.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.BaseColumn; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlColumn; - -/** - * <code>orm.xml</code> column or join 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 2.3 - * @since 2.0 - */ -public interface OrmBaseColumn - extends BaseColumn, OrmNamedColumn, OrmReadOnlyBaseColumn -{ - AbstractXmlColumn getXmlColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java deleted file mode 100644 index 17d8d1d110..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseEmbeddedMapping.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.BaseEmbeddedMapping; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlEmbedded; - -/** - * Behavior common to <code>orm.xml</code> embedded and embedded ID mappings. - * <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.0 - */ -public interface OrmBaseEmbeddedMapping - extends BaseEmbeddedMapping, OrmAttributeMapping -{ - AbstractXmlEmbedded getXmlAttributeMapping(); - - OrmAttributeOverrideContainer getAttributeOverrideContainer(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.java deleted file mode 100644 index aefd651dee..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBaseJoinColumn.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.BaseJoinColumn; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn; - -/** - * <code>orm.xml</code> join column or primary key join 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 2.3 - * @since 2.0 - */ -public interface OrmBaseJoinColumn - extends BaseJoinColumn, OrmNamedColumn, OrmReadOnlyBaseJoinColumn -{ - // TODO we need a common interface for XML join columns and pk join columns - AbstractXmlNamedColumn getXmlColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.java deleted file mode 100644 index f691894c99..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmBasicMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.BasicMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic; - -/** - * <code>orm.xml</code> 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 2.3 - * @since 2.0 - */ -public interface OrmBasicMapping - extends BasicMapping, OrmColumnMapping, OrmConvertibleMapping -{ - XmlBasic getXmlAttributeMapping(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java deleted file mode 100644 index f8333ad944..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCascade.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Cascade; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> cascade (persist, merge, remove, refresh) - * <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 OrmCascade - extends Cascade, XmlContextNode -{ - void initializeFrom(Cascade oldCascade); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.java deleted file mode 100644 index aae5833bcf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmCollectionMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.CollectionMapping; - -/** - * JPA <code>orm.xml</code> collection mapping (e.g. 1:m, m:m, element collection) - * <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 OrmCollectionMapping - extends CollectionMapping, OrmAttributeMapping -{ - OrmOrderable getOrderable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java deleted file mode 100644 index 313fac9dd4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Column; -import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn; - -/** - * <code>orm.xml</code> 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 2.3 - * @since 2.0 - */ -public interface OrmColumn - extends Column, OrmBaseColumn -{ - XmlColumn getXmlColumn(); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner - extends OrmReadOnlyBaseColumn.Owner - { - XmlColumn getXmlColumn(); - XmlColumn buildXmlColumn(); - void removeXmlColumn(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java deleted file mode 100644 index 0f8f85695f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumnMapping.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ColumnMapping; - -/** - * <code>orm.xml</code> column 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.0 - * @since 2.0 - */ -public interface OrmColumnMapping - extends ColumnMapping, OrmAttributeMapping, OrmColumn.Owner -{ - OrmColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java deleted file mode 100644 index 2e8001eb7e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConverter.java +++ /dev/null @@ -1,116 +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.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * <code>orm.xml</code> 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.0 - * @since 2.1 - */ -public interface OrmConverter - extends Converter, XmlContextNode -{ - OrmAttributeMapping getParent(); - - /** - * We need this "hack" because we can't build the resource converter before - * we build the context converter. There is no resource "converter", just a - * simple setting on the mapping. (Maybe "converter" is not the best way to - * model what is going on here....) - */ - void initialize(); - - - // ********** refactoring ********** - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - - // ********** adapter ********** - - /** - * This interface allows a convertible mapping to interact with various - * <code>orm.xml</code> converters via the same protocol. - */ - public interface Adapter - { - /** - * Return the type of converter handled by the adapter. - */ - Class<? extends Converter> getConverterType(); - - /** - * Build a converter for specified mapping - * if the mapping's XML has the adapter's value set. - * Return <code>null</code> otherwise. - * This is used to build a converter during construction of the - * converter's mapping. - */ - OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory); - - /** - * Return whether the specified XML mapping has the - * adapter's value set. If the adapter is active and the context - * mapping's converter does not match the adapter, the mapping will - * build a new converter (via the adapter). - * - * @see #buildNewConverter(OrmAttributeMapping, OrmXmlContextNodeFactory) - */ - boolean isActive(XmlConvertibleMapping xmlMapping); - - /** - * Build a converter for specified mapping. - * This is used when the context model is synchronized with the - * resource model (and the resource model has changed) or when a client - * changes a mapping's converter. - * The appropriate setting in the XML mapping will be configured once - * the context converter has been added to the context model (see {@link - * OrmConverter#initialize()}. - * - * @see #isActive(XmlConvertibleMapping) - */ - OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory); - - /** - * Clear the adapter's XML value from the specified XML mapping. - */ - void clearXmlValue(XmlConvertibleMapping xmlMapping); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java deleted file mode 100644 index ebfdafbd42..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmConvertibleMapping.java +++ /dev/null @@ -1,28 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ConvertibleMapping; - -/** - * <code>orm.xml</code> attribute mapping that has a - * converter (e.g. basic, ID, version). - * <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 OrmConvertibleMapping - extends ConvertibleMapping, OrmAttributeMapping -{ - OrmConverter getConverter(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java deleted file mode 100644 index 42f97da87b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java +++ /dev/null @@ -1,45 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn; -import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn; - -/** - * <code>orm.xml</code> 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 2.2 - * @since 2.0 - */ -public interface OrmDiscriminatorColumn - extends DiscriminatorColumn, OrmNamedColumn -{ - XmlDiscriminatorColumn getXmlColumn(); - - - // ********** owner ********** - - /** - * interface allowing discriminator columns to be used in multiple places - */ - interface Owner - extends DiscriminatorColumn.Owner, OrmReadOnlyNamedColumn.Owner - { - XmlDiscriminatorColumn getXmlColumn(); - XmlDiscriminatorColumn buildXmlColumn(); - void removeXmlColumn(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java deleted file mode 100644 index 03861f395b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddable.java +++ /dev/null @@ -1,36 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Embeddable; -import org.eclipse.jpt.jpa.core.context.java.JavaEmbeddable; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable; - -/** - * <code>orm.xml</code> 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.3 - * @since 2.0 - */ -public interface OrmEmbeddable - extends Embeddable, OrmTypeMapping -{ - XmlEmbeddable getXmlTypeMapping(); - - JavaEmbeddable getJavaTypeMapping(); - - JavaEmbeddable getJavaTypeMappingForDefaults(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.java deleted file mode 100644 index 84ec06f7da..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedIdMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.EmbeddedIdMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId; - -/** - * <code>orm.xml</code> embedded 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 2.3 - * @since 2.0 - */ -public interface OrmEmbeddedIdMapping - extends EmbeddedIdMapping, OrmBaseEmbeddedMapping -{ - XmlEmbeddedId getXmlAttributeMapping(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.java deleted file mode 100644 index 4587e93bae..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEmbeddedMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.EmbeddedMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded; - -/** - * <code>orm.xml</code> embedded 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.3 - * @since 2.0 - */ -public interface OrmEmbeddedMapping - extends EmbeddedMapping, OrmBaseEmbeddedMapping -{ - XmlEmbedded getXmlAttributeMapping(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java deleted file mode 100644 index 37ae997983..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEntity.java +++ /dev/null @@ -1,99 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.Entity; -import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable; -import org.eclipse.jpt.jpa.core.context.java.JavaEntity; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity; - -/** - * <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.3 - * @since 2.0 - */ -public interface OrmEntity - extends Entity, OrmTypeMapping -{ - XmlEntity getXmlTypeMapping(); - - JavaEntity getJavaTypeMapping(); - - JavaEntity getJavaTypeMappingForDefaults(); - - OrmTable getTable(); - - OrmIdClassReference getIdClassReference(); - - OrmDiscriminatorColumn getDiscriminatorColumn(); - - - // ********** secondary tables ********** - - ListIterable<ReadOnlySecondaryTable> getSecondaryTables(); - ListIterable<OrmSecondaryTable> getSpecifiedSecondaryTables(); - OrmSecondaryTable addSpecifiedSecondaryTable(); - OrmSecondaryTable addSpecifiedSecondaryTable(int index); - - /** - * Return the virtual (not specified) secondary tables. - */ - ListIterable<OrmVirtualSecondaryTable> getVirtualSecondaryTables(); - String VIRTUAL_SECONDARY_TABLES_LIST = "virtualSecondaryTables"; //$NON-NLS-1$ - - /** - * Return the number of virtual secondary tables. - */ - int getVirtualSecondaryTablesSize(); - - /** - * Return true if there are no virtual secondary tables on the orm entity. - * This is used to determine whether you can add specified secondary tables. - * You must first make sure all virtual secondary tables have been specified - * in xml before adding more. This is because adding one secondary table to xml - * will override all the secondary tables specified in the java entity - */ - boolean secondaryTablesAreDefinedInXml(); - - /** - * If true, then all virtual secondary tables are added in as specified secondary tables to the xml. - * If false, then all the specified secondary tables are remvoed from the xml. - */ - void setSecondaryTablesAreDefinedInXml(boolean defineInXml); - - - // ********** primary key join columns ********** - - ListIterable<ReadOnlyPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<OrmPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(); - OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index); - - ListIterable<ReadOnlyPrimaryKeyJoinColumn> getDefaultPrimaryKeyJoinColumns(); - int getDefaultPrimaryKeyJoinColumnsSize(); - String DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST = "defaultPrimaryKeyJoinColumns"; //$NON-NLS-1$ - - - // ********** containers ********** - - OrmAttributeOverrideContainer getAttributeOverrideContainer(); - OrmAssociationOverrideContainer getAssociationOverrideContainer(); - OrmQueryContainer getQueryContainer(); - OrmGeneratorContainer getGeneratorContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java deleted file mode 100644 index 859883f98b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java +++ /dev/null @@ -1,63 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.EnumeratedConverter; -import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping; - -/** - * <code>orm.xml</code> enumerated 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. - */ -public interface OrmEnumeratedConverter - extends EnumeratedConverter, OrmConverter -{ - // ********** adapter ********** - - public static class Adapter - implements OrmConverter.Adapter - { - private static final Adapter INSTANCE = new Adapter(); - public static Adapter instance() { - return INSTANCE; - } - - private Adapter() { - super(); - } - - public Class<? extends Converter> getConverterType() { - return EnumeratedConverter.class; - } - - public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) { - XmlConvertibleMapping xmlMapping = (XmlConvertibleMapping) parent.getXmlAttributeMapping(); - return (xmlMapping.getEnumerated() == null) ? null : factory.buildOrmEnumeratedConverter(parent); - } - - public boolean isActive(XmlConvertibleMapping xmlMapping) { - return xmlMapping.getEnumerated() != null; - } - - public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) { - return factory.buildOrmEnumeratedConverter(parent); - } - - public void clearXmlValue(XmlConvertibleMapping xmlMapping) { - xmlMapping.setEnumerated(null); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java deleted file mode 100644 index f42e8c098b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.GeneratedValue; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue; - -/** - * <code>orm.xml</code> generated value - * <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.0 - */ -public interface OrmGeneratedValue - extends GeneratedValue, XmlContextNode -{ - XmlGeneratedValue getXmlGeneratedValue(); - - /** - * Return the (best guess) text location of the generator. - */ - TextRange getGeneratorTextRange(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java deleted file mode 100644 index cd1791fd1f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.Generator; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator; - -/** - * <code>orm.xml</code> sequence and table generators - * <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.0 - * @since 2.0 - */ -public interface OrmGenerator - extends Generator, XmlContextNode -{ - XmlGenerator getXmlGenerator(); - - TextRange getNameTextRange(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java deleted file mode 100644 index b858c265f0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratorContainer.java +++ /dev/null @@ -1,43 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.GeneratorContainer; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> generator 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 2.3 - * @since 2.3 - */ -public interface OrmGeneratorContainer - extends GeneratorContainer, XmlContextNode -{ - // ********** sequence generator ********** - - OrmSequenceGenerator getSequenceGenerator(); - - OrmSequenceGenerator addSequenceGenerator(); - - - // ********** table generator ********** - - OrmTableGenerator getTableGenerator(); - - OrmTableGenerator addTableGenerator(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java deleted file mode 100644 index c27612bedc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdClassReference.java +++ /dev/null @@ -1,62 +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.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.jpa.core.context.IdClassReference; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference; -import org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * <code>orm.xml</code> ID class reference - * <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.3 - */ -public interface OrmIdClassReference - extends IdClassReference, XmlContextNode -{ - // ********** refactoring ********** - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - - // ********** owner ********** - - interface Owner { - XmlIdClassContainer getXmlIdClassContainer(); - JavaIdClassReference getJavaIdClassReferenceForDefaults(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java deleted file mode 100644 index 1b6be0b6dd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmIdMapping.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.IdMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlId; - -/** - * <code>orm.xml</code> 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 2.3 - * @since 2.0 - */ -public interface OrmIdMapping - extends IdMapping, OrmColumnMapping, OrmConvertibleMapping -{ - XmlId getXmlAttributeMapping(); - - OrmGeneratorContainer getGeneratorContainer(); - - OrmGeneratedValue getGeneratedValue(); - OrmGeneratedValue addGeneratedValue(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java deleted file mode 100644 index b2c7f54120..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumn.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.JoinColumn; -import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn; - -/** - * <code>orm.xml</code> join 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 2.3 - * @since 2.0 - */ -public interface OrmJoinColumn - extends JoinColumn, OrmReadOnlyJoinColumn, OrmBaseJoinColumn, OrmBaseColumn -{ - XmlJoinColumn getXmlColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java deleted file mode 100644 index e99324dbd7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationship.java +++ /dev/null @@ -1,34 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.JoinColumnRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer; - -/** - * <code>orm.xml</code> join column relationship - * (1:1, 1:m, m:1, and association override) - * <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 OrmJoinColumnRelationship - extends JoinColumnRelationship, OrmRelationship -{ - XmlJoinColumnContainer getXmlContainer(); - - OrmJoinColumnRelationshipStrategy getJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java deleted file mode 100644 index d6af886c1b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,38 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.JoinColumnRelationshipStrategy; - -/** - * <code>orm.xml</code> join column relationship strategy - * <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 OrmJoinColumnRelationshipStrategy - extends JoinColumnRelationshipStrategy, OrmRelationshipStrategy -{ - ListIterable<OrmJoinColumn> getJoinColumns(); - - ListIterable<OrmJoinColumn> getSpecifiedJoinColumns(); - OrmJoinColumn getSpecifiedJoinColumn(int index); - OrmJoinColumn addSpecifiedJoinColumn(); - OrmJoinColumn addSpecifiedJoinColumn(int index); - - OrmJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java deleted file mode 100644 index c7ec6c1230..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTable.java +++ /dev/null @@ -1,42 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.JoinTable; - -/** - * <code>orm.xml</code> join table - * <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.0 - */ -public interface OrmJoinTable - extends JoinTable, OrmReferenceTable -{ - OrmJoinTableRelationshipStrategy getParent(); - - // ********** inverse join columns ********** - - ListIterable<OrmJoinColumn> getInverseJoinColumns(); - - ListIterable<OrmJoinColumn> getSpecifiedInverseJoinColumns(); - OrmJoinColumn getSpecifiedInverseJoinColumn(int index); - OrmJoinColumn addSpecifiedInverseJoinColumn(); - OrmJoinColumn addSpecifiedInverseJoinColumn(int index); - - OrmJoinColumn getDefaultInverseJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java deleted file mode 100644 index 8d15df3467..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationship.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.JoinTableRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTableContainer; - -/** - * <code>orm.xml</code> join table relationship (1:1, 1:m, m:1, m:m) - * <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 OrmJoinTableRelationship - extends JoinTableRelationship, OrmRelationship -{ - XmlJoinTableContainer getXmlContainer(); - - OrmJoinTableRelationshipStrategy getJoinTableStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java deleted file mode 100644 index f35384d08e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmJoinTableRelationshipStrategy.java +++ /dev/null @@ -1,37 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.JoinTableRelationshipStrategy; -import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable; - -/** - * <code>orm.xml</code> join table relationship strategy - * <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 OrmJoinTableRelationshipStrategy - extends JoinTableRelationshipStrategy, OrmRelationshipStrategy -{ - OrmJoinTable getJoinTable(); - - XmlJoinTable getXmlJoinTable(); - - XmlJoinTable buildXmlJoinTable(); - - void removeXmlJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java deleted file mode 100644 index f1a29164b4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java +++ /dev/null @@ -1,63 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.LobConverter; -import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping; - -/** - * <code>orm.xml</code> LOB 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. - */ -public interface OrmLobConverter - extends LobConverter, OrmConverter -{ - // ********** adapter ********** - - public static class Adapter - implements OrmConverter.Adapter - { - private static final Adapter INSTANCE = new Adapter(); - public static Adapter instance() { - return INSTANCE; - } - - private Adapter() { - super(); - } - - public Class<? extends Converter> getConverterType() { - return LobConverter.class; - } - - public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) { - XmlConvertibleMapping xmlMapping = (XmlConvertibleMapping) parent.getXmlAttributeMapping(); - return xmlMapping.isLob() ? factory.buildOrmLobConverter(parent) : null; - } - - public boolean isActive(XmlConvertibleMapping xmlMapping) { - return xmlMapping.isLob(); - } - - public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) { - return factory.buildOrmLobConverter(parent); - } - - public void clearXmlValue(XmlConvertibleMapping xmlMapping) { - xmlMapping.setLob(false); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.java deleted file mode 100644 index de5e5ecb0b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ManyToManyMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany; - -/** - * <code>orm.xml</code> 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.2 - * @since 2.0 - */ -public interface OrmManyToManyMapping - extends ManyToManyMapping, OrmMultiRelationshipMapping -{ - XmlManyToMany getXmlAttributeMapping(); - - OrmManyToManyRelationship getRelationship(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java deleted file mode 100644 index f2f2d7edc0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToManyRelationship.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ManyToManyRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany; - -/** - * <code>orm.xml</code> m: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 OrmManyToManyRelationship - extends ManyToManyRelationship, - OrmMappedByRelationship, - OrmMappingJoinTableRelationship -{ - XmlManyToMany getXmlContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.java deleted file mode 100644 index 1bd07cf10a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ManyToOneMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne; - -/** - * <code>orm.xml</code> m: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.0 - */ -public interface OrmManyToOneMapping - extends ManyToOneMapping, OrmSingleRelationshipMapping -{ - XmlManyToOne getXmlAttributeMapping(); - - OrmManyToOneRelationship getRelationship(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java deleted file mode 100644 index c7b47fd010..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmManyToOneRelationship.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ManyToOneRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne; - -/** - * <code>orm.xml</code> m:1 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 OrmManyToOneRelationship - extends ManyToOneRelationship, OrmMappingJoinColumnRelationship -{ - XmlManyToOne getXmlContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java deleted file mode 100644 index 2ac19206a8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationship.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MappedByRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedByMapping; - -/** - * <code>orm.xml</code> "mapped by" relationship (1:1, 1:m, m:m) - * <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 OrmMappedByRelationship - extends MappedByRelationship, OrmRelationship -{ - XmlMappedByMapping getXmlContainer(); - - OrmMappedByRelationshipStrategy getMappedByStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.java deleted file mode 100644 index cc250f2d6c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedByRelationshipStrategy.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MappedByRelationshipStrategy; - -/** - * <code>orm.xml</code> "mapped by" relationship strategy - * <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 OrmMappedByRelationshipStrategy - extends OrmRelationshipStrategy, MappedByRelationshipStrategy -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.java deleted file mode 100644 index 437675b778..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappedSuperclass.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MappedSuperclass; -import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass; -import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass; - -/** - * <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.3 - * @since 2.0 - */ -public interface OrmMappedSuperclass - extends MappedSuperclass, OrmTypeMapping -{ - XmlMappedSuperclass getXmlTypeMapping(); - - OrmIdClassReference getIdClassReference(); - - JavaMappedSuperclass getJavaTypeMapping(); - - JavaMappedSuperclass getJavaTypeMappingForDefaults(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java deleted file mode 100644 index 504846fb08..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinColumnRelationship.java +++ /dev/null @@ -1,25 +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.core.context.orm; - -/** - * <code>orm.xml</code> mapping join column relationship (1:1, 1:m, m:1) - * <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 OrmMappingJoinColumnRelationship - extends OrmJoinColumnRelationship, OrmMappingRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java deleted file mode 100644 index 72403bbef2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingJoinTableRelationship.java +++ /dev/null @@ -1,26 +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.core.context.orm; - -/** - * <code>orm.xml</code> mapping join table relationship (1:1, 1:m, m:1, m:m) - * <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 OrmMappingJoinTableRelationship - extends OrmJoinTableRelationship, - OrmMappingRelationship -{ - // combine various interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.java deleted file mode 100644 index d366671163..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMappingRelationship.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MappingRelationship; - -/** - * <code>orm.xml</code> mapping relationship (1:1, 1:m, m:1, m:m) - * <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.2 - */ -public interface OrmMappingRelationship - extends MappingRelationship, OrmRelationship -{ - OrmRelationshipMapping getMapping(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java deleted file mode 100644 index f7b62096f1..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmMultiRelationshipMapping.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MultiRelationshipMapping; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlMultiRelationshipMapping; - -/** - * <code>orm.xml</code> multi-valued relationship (1:m, 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.3 - * @since 2.0 - */ -public interface OrmMultiRelationshipMapping - extends MultiRelationshipMapping, OrmRelationshipMapping, OrmCollectionMapping -{ - AbstractXmlMultiRelationshipMapping getXmlAttributeMapping(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java deleted file mode 100644 index da6ddfe211..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedColumn.java +++ /dev/null @@ -1,37 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.NamedColumn; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn; - -/** - * <code>orm.xml</code> - * <ul> - * <li>column - * <li>join column - * <li>primary key join column - * <li>discriminator column - * <li>order column - * </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.3 - * @since 2.0 - */ -public interface OrmNamedColumn - extends NamedColumn, OrmReadOnlyNamedColumn -{ - AbstractXmlNamedColumn getXmlColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java deleted file mode 100644 index c42f2c62bf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedNativeQuery.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.NamedNativeQuery; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery; - -/** - * <code>orm.xml</code> named native query - * <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.0 - */ -public interface OrmNamedNativeQuery - extends OrmQuery, NamedNativeQuery -{ - XmlNamedNativeQuery getXmlQuery(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.java deleted file mode 100644 index 1bbac18d43..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmNamedQuery.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.NamedQuery; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery; - -/** - * <code>orm.xml</code> named query - * <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.0 - */ -public interface OrmNamedQuery - extends OrmQuery, NamedQuery -{ - XmlNamedQuery getXmlQuery(); - -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.java deleted file mode 100644 index c984cb9004..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.OneToManyMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany; - -/** - * <code>orm.xml</code> 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 2.3 - * @since 2.0 - */ -public interface OrmOneToManyMapping - extends OneToManyMapping, OrmMultiRelationshipMapping -{ - XmlOneToMany getXmlAttributeMapping(); - - OrmOneToManyRelationship getRelationship(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java deleted file mode 100644 index a37d64d5de..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToManyRelationship.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.OneToManyRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany; - -/** - * <code>orm.xml</code> 1:m relationship reference - * <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 OrmOneToManyRelationship - extends OneToManyRelationship, - OrmMappedByRelationship, - OrmMappingJoinTableRelationship -{ - XmlOneToMany getXmlContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.java deleted file mode 100644 index 51bfe95b55..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.OneToOneMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne; - -/** - * <code>orm.xml</code> 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.0 - */ -public interface OrmOneToOneMapping - extends OneToOneMapping, OrmSingleRelationshipMapping -{ - XmlOneToOne getXmlAttributeMapping(); - - OrmOneToOneRelationship getRelationship(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java deleted file mode 100644 index 2947aadeb6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOneToOneRelationship.java +++ /dev/null @@ -1,34 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.OneToOneRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne; - -/** - * <code>orm.xml</code> 1:1 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 OrmOneToOneRelationship - extends OneToOneRelationship, - OrmMappedByRelationship, - OrmPrimaryKeyJoinColumnRelationship, - OrmMappingJoinColumnRelationship -{ - XmlOneToOne getXmlContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java deleted file mode 100644 index 96c78052cf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOrderable.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Orderable; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * Multi-valued (1:m, m:m) relationship mappings support ordering. - * <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 OrmOrderable - extends Orderable, XmlContextNode -{ - OrmAttributeMapping getParent(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.java deleted file mode 100644 index bd14dd1ee4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverride.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride; - -/** - * <em>Specified</em> <code>orm.xml</code> override - * <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 OrmOverride - extends Override_, OrmReadOnlyOverride -{ - XmlOverride getXmlOverride(); - - // covariant overrides - OrmVirtualOverride convertToVirtual(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java deleted file mode 100644 index 07357527d4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java +++ /dev/null @@ -1,80 +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.core.context.orm; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.OverrideContainer; -import org.eclipse.jpt.jpa.core.context.Override_; -import org.eclipse.jpt.jpa.core.context.VirtualOverride; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride; - -/** - * <code>orm.xml</code> attribute or association override 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 2.3 - * @since 2.3 - */ -public interface OrmOverrideContainer - extends OverrideContainer, XmlContextNode -{ - // covariant overrides - /** - * We need this covariant override because there is no override - * <em>container</em> element in the <code>orm.xml</code> file; - * there is simply a list of overrides. - */ - XmlContextNode getParent(); - ListIterable<? extends OrmReadOnlyOverride> getOverrides(); - OrmReadOnlyOverride getOverrideNamed(String name); - ListIterable<? extends OrmOverride> getSpecifiedOverrides(); - OrmOverride getSpecifiedOverride(int index); - OrmOverride getSpecifiedOverrideNamed(String name); - ListIterable<? extends OrmVirtualOverride> getVirtualOverrides(); - OrmVirtualOverride convertOverrideToVirtual(Override_ specifiedOverride); - OrmOverride convertOverrideToSpecified(VirtualOverride virtualOverride); - - - interface Owner - extends OverrideContainer.Owner - { - <T extends XmlOverride> EList<T> getXmlOverrides(); - - /** - * Return the names of all the corresponding Java overrides, specified and - * virtual. Return <code>null</code> if the Java overrides are not relevant - * (i.e. the parent is not an entity, the parent entity has no - * corresponding Java entity, or the parent entity is <em>metadata - * complete</em>). Return an empty list if the Java overrides are - * <em>possible</em> but there are simply none. - * <p> - * <strong>NB:</strong> Unlike overrides associated with attribute - * mappings, the overrides associated with an <code>orm.xml</code> - * entity are <em>additive</em> to any specified Java overrides. An - * <code>orm.xml</code> override only overrides the Java override with - * the same name. [JPA spec 10.1.3.13-14; JPA 2.0 spec 12.2.3.14-15] - * - * @see org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer#getOverrideNames() - */ - Iterable<String> getJavaOverrideNames(); - - TextRange getValidationTextRange(); - - OrmTypeMapping getTypeMapping(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.java deleted file mode 100644 index 8e0a60dc59..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideRelationship.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.OverrideRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride; - -/** - * <code>orm.xml</code> association override 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 OrmOverrideRelationship - extends OverrideRelationship, - OrmJoinColumnRelationship -{ - XmlAssociationOverride getXmlContainer(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java deleted file mode 100644 index f912d1067f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitDefaults.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.AccessType; -import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitDefaults; -import org.eclipse.jpt.jpa.db.Catalog; -import org.eclipse.jpt.jpa.db.Schema; -import org.eclipse.jpt.jpa.db.SchemaContainer; - -/** - * Context model corresponding to the - * XML resource model {@link org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitDefaults}, - * which corresponds to the <code>persistence-unit-defaults</code> element - * in the <code>orm.xml</code> file. - * <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 OrmPersistenceUnitDefaults - extends MappingFilePersistenceUnitDefaults -{ - /** - * Covariant override. - */ - OrmPersistenceUnitMetadata getParent(); - - // ********** access ********** - void setAccess(AccessType value); - String ACCESS_PROPERTY = "access"; //$NON-NLS-1$ - - // ********** schema container ********** - SchemaContainer getDbSchemaContainer(); - - // ********** catalog ********** - String getSpecifiedCatalog(); - void setSpecifiedCatalog(String newSpecifiedCatalog); - String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$ - String getDefaultCatalog(); - String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$ - Catalog getDbCatalog(); - - // ********** schema ********** - String getSpecifiedSchema(); - void setSpecifiedSchema(String newSpecifiedSchema); - String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$ - String getDefaultSchema(); - String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$ - Schema getDbSchema(); - - // ********** cascade persist ********** - void setCascadePersist(boolean value); - String CASCADE_PERSIST_PROPERTY = "cascadePersist"; //$NON-NLS-1$ -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java deleted file mode 100644 index ae87ffc6bf..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistenceUnitMetadata.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings; -import org.eclipse.jpt.jpa.core.resource.orm.XmlPersistenceUnitMetadata; - -/** - * Context <code>orm.xml</code> persistence unit metadata. - * Context model corresponding to the - * XML resource model {@link XmlPersistenceUnitMetadata}, - * which corresponds to the <code>persistence-unit-metadata</code> element - * in the <code>orm.xml</code> file. - * <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 OrmPersistenceUnitMetadata - extends MappingFilePersistenceUnitMetadata -{ - /** - * Covariant override. - */ - EntityMappings getParent(); - - /** - * This can be <code>null</code>. The context metadata is always present, - * even if the XML metadata is missing. - */ - XmlEntityMappings getXmlEntityMappings(); - void setXmlMappingMetadataComplete(boolean xmlMappingMetadataComplete); - String XML_MAPPING_METADATA_COMPLETE_PROPERTY = "xmlMappingMetadataComplete"; //$NON-NLS-1$ - - OrmPersistenceUnitDefaults getPersistenceUnitDefaults(); - - XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata(); - XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadataForUpdate(); - void removeXmlPersistenceUnitMetadataIfUnset(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java deleted file mode 100644 index b660504f2f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentAttribute.java +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.jpa.core.context.PersistentAttribute; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * Context <code>orm.xml</code> persistent <em>attribute</em> - * (field or property). - * <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.0 - */ -public interface OrmPersistentAttribute - extends PersistentAttribute, OrmReadOnlyPersistentAttribute -{ - /** - * Return an <code>orm.xml</code> mapping since the attribute is - * <em>specified</em>. - */ - OrmAttributeMapping getMapping(); - - /** - * Convert the (currently specified) attribute to a virtual attribute. - * The attribute will be removed - * from the list of specified attributes - * and removed from the <code>orm.xml</code> file. Return the new attribute. - * Return <code>null</code> if the attribute does not correspond to an - * attribute in the Java persistent type. - * <p> - * @see #isVirtual() - * @see #setMappingKey(String) - */ - OrmReadOnlyPersistentAttribute convertToVirtual(); - - OrmAttributeMapping setMappingKey(String key); - - /** - * Called by the attribute's mapping when it's name changes, - * effectively changing the attribute's name. - */ - void nameChanged(String oldName, String newName); - - - // ********** refactoring ********** - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java deleted file mode 100644 index 9ab880c257..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPersistentType.java +++ /dev/null @@ -1,195 +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.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.PersistentType; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * <code>orm.xml</code> persistent type - * <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.0 - */ -public interface OrmPersistentType - extends PersistentType, PersistentType.Owner, XmlContextNode -{ - // ********** covariant overrides ********** - - EntityMappings getParent(); - - OrmTypeMapping getMapping(); - - /** - * Return a combination of the persistent type's <em>specified</em> and - * <em>virtual</em> attributes. The <em>specified</em> attributes are those - * explicitly listed in the <code>orm.xml</code> file; while the - * <em>virtual</em> attributes are those derived from the corresponding - * Java persistent type. - */ - ListIterable<OrmReadOnlyPersistentAttribute> getAttributes(); - - OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName); - - - // ********** specified attributes ********** - - String SPECIFIED_ATTRIBUTES_LIST = "specifiedAttributes"; //$NON-NLS-1$ - - /** - * Return the persistent type's specified attributes. - */ - ListIterable<OrmPersistentAttribute> getSpecifiedAttributes(); - - /** - * Return the number of the persistent type's specified attributes. - */ - int getSpecifiedAttributesSize(); - - // TODO this is currently only used by tests; remove it and change tests to use - // OrmReadOnlyPersistenAttribute.convertToSpecified(String mappingKey) - OrmPersistentAttribute addSpecifiedAttribute(String mappingKey, String attributeName); - -// TODO bjv rename to 'defaultAttributes' - // ********** default attributes ********** - - String VIRTUAL_ATTRIBUTES_LIST = "virtualAttributes"; //$NON-NLS-1$ - - /** - * Return virtual <code>orm.xml</code> persistent attributes. These - * are attributes that exist in the corresponding Java class, but are not - * specified in the <code>orm.xml</code>. - */ - ListIterable<OrmReadOnlyPersistentAttribute> getVirtualAttributes(); - - /** - * Return the number of virtual <code>orm.xml</code> persistent attributes. - * @see #getVirtualAttributes() - */ - int getVirtualAttributesSize(); - - /** - * Convert the specified attribute to a virtual attribute. Remove the - * attribute from the type's list of specified attributes - * and remove it from the <code>orm.xml</code> file. Return the new - * (virtual) attribute. - * Return <code>null</code> if the specified attribute does not correspond - * to an attribute in the Java persistent type. - * <p> - * Throw an {@link IllegalArgumentException} if the attribute is already - * virtual. - * - * @see OrmPersistentAttribute#convertToVirtual() - */ - OrmReadOnlyPersistentAttribute convertAttributeToVirtual(OrmPersistentAttribute specifiedAttribute); - - /** - * Add the specified persistent attribute to the <code>orm.xml</code>. - * The attribute will be added to the <code>orm.xml</code> and moved - * from the list of virtual attributes to the list - * of specified attributes. It will keep the same mapping it had, either - * specified in a Java annotation or the default. - * <p> - * Throw an {@link IllegalArgumentException} if the attribute is already - * specified. - * - * @see OrmPersistentAttribute#convertToSpecified() - */ - OrmPersistentAttribute convertAttributeToSpecified(OrmReadOnlyPersistentAttribute virtualAttribute); - - /** - * Add the specified persistent attribute to the <code>orm.xml</code> with - * the specified mapping. The attribute will be added to the - * <code>orm.xml</code> and moved from the list of virtual attributes to - * the list of specified attributes. - * <p> - * Throw an {@link IllegalArgumentException} if the attribute is already - * specified. - * - * @see OrmPersistentAttribute#convertToSpecified(String) - */ - OrmPersistentAttribute convertAttributeToSpecified(OrmReadOnlyPersistentAttribute virtualAttribute, String mappingKey); - - - // ********** mapping morphing ********** - - /** - * This is called whenever the specified persistent attribute's mapping is - * changed as specified. - */ - void changeMapping(OrmPersistentAttribute ormPersistentAttribute, OrmAttributeMapping oldMapping, OrmAttributeMapping newMapping); - - - // ********** refactoring ********** - - /** - * If this {@link OrmPersistentType#isFor(String)} the given IType, create a text - * DeleteEdit for deleting the type mapping element and any text that precedes it. - * Otherwise return an EmptyIterable. - * Though this will contain 1 or 0 DeleteEdits, using an Iterable - * for ease of use with other createDeleteEdit API. - */ - Iterable<DeleteEdit> createDeleteTypeEdits(IType type); - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - - // ********** misc ********** - - boolean contains(int textOffset); - - /** - * This is called by the persistent type's mapping when its class - * (name) changes. - */ - void mappingClassChanged(String oldClass, String newClass); - - /** - * Return the Java persistent type that is referred to by the - * <code>orm.xml</code> persistent type. - * Return <code>null</code> if it is missing. - */ - JavaPersistentType getJavaPersistentType(); - String JAVA_PERSISTENT_TYPE_PROPERTY = "javaPersistentType"; //$NON-NLS-1$ - - /** - * Return the persistent type's default package, as set in its entity - * mappings. - */ - String getDefaultPackage(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java deleted file mode 100644 index 0b451cc727..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumn.java +++ /dev/null @@ -1,34 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn; - -/** - * <code>orm.xml</code> primary key join 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 2.1 - * @since 2.0 - */ -public interface OrmPrimaryKeyJoinColumn - extends PrimaryKeyJoinColumn, OrmBaseJoinColumn -{ - XmlPrimaryKeyJoinColumn getXmlColumn(); - - void initializeFrom(ReadOnlyPrimaryKeyJoinColumn oldColumn); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java deleted file mode 100644 index c8d304ed52..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationship.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationship; -import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumnContainer; - -/** - * <code>orm.xml</code> primary key join column relationship (1:1) - * <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 OrmPrimaryKeyJoinColumnRelationship - extends PrimaryKeyJoinColumnRelationship, OrmMappingRelationship -{ - XmlPrimaryKeyJoinColumnContainer getXmlContainer(); - - OrmPrimaryKeyJoinColumnRelationshipStrategy getPrimaryKeyJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java deleted file mode 100644 index a6aef3afef..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmPrimaryKeyJoinColumnRelationshipStrategy.java +++ /dev/null @@ -1,34 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumnRelationshipStrategy; - -/** - * <code>orm.xml</code> primary key join column relationship strategy - * <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 OrmPrimaryKeyJoinColumnRelationshipStrategy - extends OrmRelationshipStrategy, PrimaryKeyJoinColumnRelationshipStrategy -{ - ListIterable<OrmPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - OrmPrimaryKeyJoinColumn getPrimaryKeyJoinColumn(int index); - OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(); - OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java deleted file mode 100644 index 21bcadd2f4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java +++ /dev/null @@ -1,50 +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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.Query; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.XmlQuery; - -/** - * <code>orm.xml</code> named and named native queries - * <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.0 - */ -public interface OrmQuery - extends Query, XmlContextNode -{ - XmlQuery getXmlQuery(); - - - // ********** hints ********** - - ListIterable<OrmQueryHint> getHints(); - - OrmQueryHint addHint(); - - OrmQueryHint addHint(int index); - - - // ********** validation ********** - - TextRange getNameTextRange(); - - TextRange getQueryTextRange(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java deleted file mode 100644 index 99adfc4bf4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryContainer.java +++ /dev/null @@ -1,48 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.QueryContainer; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> query 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 2.3 - * @since 2.3 - */ -public interface OrmQueryContainer - extends QueryContainer, XmlContextNode -{ - // ********** named queries ********** - - ListIterable<OrmNamedQuery> getNamedQueries(); - - OrmNamedQuery addNamedQuery(); - - OrmNamedQuery addNamedQuery(int index); - - - // ********** named native queries ********** - - ListIterable<OrmNamedNativeQuery> getNamedNativeQueries(); - - OrmNamedNativeQuery addNamedNativeQuery(); - - OrmNamedNativeQuery addNamedNativeQuery(int index); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.java deleted file mode 100644 index beffe63141..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQueryHint.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.QueryHint; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint; - -/** - * <code>orm.xml</code> query hint - * <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.0 - */ -public interface OrmQueryHint - extends QueryHint, XmlContextNode -{ - XmlQueryHint getXmlQueryHint(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java deleted file mode 100644 index 0d680ecc39..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAssociationOverride.java +++ /dev/null @@ -1,27 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride; - -/** - * <code>orm.xml</code> association override - * <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 OrmReadOnlyAssociationOverride - extends ReadOnlyAssociationOverride, OrmReadOnlyOverride -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java deleted file mode 100644 index 2e446c2455..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyAttributeOverride.java +++ /dev/null @@ -1,27 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride; - -/** - * Read-only <code>orm.xml</code> attribute override - * <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 OrmReadOnlyAttributeOverride - extends ReadOnlyAttributeOverride, OrmReadOnlyOverride -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java deleted file mode 100644 index 652ff934c9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java +++ /dev/null @@ -1,44 +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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn; - -/** - * <code>orm.xml</code> read-only column or join 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 OrmReadOnlyBaseColumn - extends ReadOnlyBaseColumn, OrmReadOnlyNamedColumn -{ - /** - * Return the (best guess) text location of the column's table. - */ - TextRange getTableTextRange(); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner - extends ReadOnlyBaseColumn.Owner, OrmReadOnlyNamedColumn.Owner - { - // combine two interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java deleted file mode 100644 index e31619f90c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java +++ /dev/null @@ -1,45 +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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn; - -/** - * <code>orm.xml</code> read-only join column or primary key join 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 OrmReadOnlyBaseJoinColumn - extends ReadOnlyBaseJoinColumn, OrmReadOnlyNamedColumn -{ - /** - * Return the (best guess) text location of the column's - * referenced column name. - */ - TextRange getReferencedColumnNameTextRange(); - - - // ********** owner ********** - - /** - * interface allowing join columns to be used in multiple places - * (e.g. 1:1 mappings and join tables) - */ - interface Owner - extends ReadOnlyBaseJoinColumn.Owner, OrmReadOnlyNamedColumn.Owner - { - // combine two interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java deleted file mode 100644 index 25ab84a48e..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java +++ /dev/null @@ -1,36 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn; - -/** - * <code>orm.xml</code> read-only join 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 2.3 - * @since 2.0 - */ -public interface OrmReadOnlyJoinColumn - extends ReadOnlyJoinColumn, OrmReadOnlyBaseJoinColumn, OrmReadOnlyBaseColumn -{ - // ********** owner ********** - - interface Owner - extends ReadOnlyJoinColumn.Owner, OrmReadOnlyBaseJoinColumn.Owner, OrmReadOnlyBaseColumn.Owner - { - // combine interfaces - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java deleted file mode 100644 index 01dc613f00..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java +++ /dev/null @@ -1,56 +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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.NamedColumn; -import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> read-only - * <ul> - * <li>column - * <li>join column - * <li>primary key join column - * <li>discriminator column - * <li>order column - * </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. - */ -public interface OrmReadOnlyNamedColumn - extends ReadOnlyNamedColumn, XmlContextNode -{ - /** - * Return the (best guess) text location of the column's name. - */ - TextRange getNameTextRange(); - - - // ********** owner ********** - - /** - * interface allowing columns to be used in multiple places - * (e.g. basic mappings and attribute overrides) - */ - interface Owner - extends NamedColumn.Owner - { - /** - * Return the column owner's text range. This can be returned by the - * column when its annotation is not present. - */ - TextRange getValidationTextRange(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java deleted file mode 100644 index e38c0ac1a3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java +++ /dev/null @@ -1,32 +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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * Read-only <code>orm.xml</code> override - * <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 OrmReadOnlyOverride - extends ReadOnlyOverride, XmlContextNode -{ - /** - * Return the (best guess) text location of the override's name. - */ - TextRange getNameTextRange(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java deleted file mode 100644 index c0d60174e0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyPersistentAttribute.java +++ /dev/null @@ -1,98 +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.core.context.orm; - -import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; -import org.eclipse.jpt.common.core.resource.java.JavaResourceField; -import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod; -import org.eclipse.jpt.jpa.core.context.AttributeMapping; -import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; - -/** - * Read-only context <code>orm.xml</code> persistent <em>attribute</em> - * (field or property). - * <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 OrmReadOnlyPersistentAttribute - extends ReadOnlyPersistentAttribute, XmlContextNode -{ - /** - * A <em>specified</em> <code>orm.xml</code> attribute will return an - * <code>orm.xml</code> mapping, while a <em>virtual</em> attribute will - * return a Java mapping. If the attribute is <em>virtual</em>, the returned - * (Java) mapping is also <em>virtual</em>; i.e. it is read-only and is not to - * be modified (nor are any of its parts). The modifiable Java - * mapping can be retrieved via the modifiable Java attribute: - * {@link #resolveJavaPersistentAttribute()}. - */ - AttributeMapping getMapping(); - - OrmPersistentType getOwningPersistentType(); - - OrmTypeMapping getOwningTypeMapping(); - - /** - * If the <code>orm.xml</code> attribute is <em>virtual</em>, the returned Java - * attribute is also <em>virtual</em>; i.e. it is read-only and is not to - * be modified (nor are any of its parts [e.g. column]). The modifiable Java - * attribute can be retrieved via {@link #resolveJavaPersistentAttribute()}. - */ - JavaPersistentAttribute getJavaPersistentAttribute(); - String JAVA_PERSISTENT_ATTRIBUTE_PROPERTY = "javaPersistentAttribute"; //$NON-NLS-1$ - - /** - * Return the <code>orm.xml</code> attribute's Java attribute; which, in the - * case of <em>virtual</em> attributes, is not the same Java attribute as - * returned by {@link #getJavaPersistentAttribute()}. - * <p> - * This is probably useful only to tests; since nothing else will want to - * modify the returned Java attribute. - */ - JavaPersistentAttribute resolveJavaPersistentAttribute(); - - JavaResourceAttribute getJavaResourceAttribute(); - - boolean isFor(JavaResourceField javaResourceField); - - boolean isFor(JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter); - - boolean contains(int textOffset); - - - // ********** virtual -> specified ********** - - /** - * Convert the (currently virtual) attribute to a specified - * attribute. The attribute will be added to the list of specified - * attributes and added to the <code>orm.xml</code> file. The mapping will - * remain the same. Return the new attribute. - * @see #isVirtual() - * @throw IllegalStateException if the attribute is already specified - */ - OrmPersistentAttribute convertToSpecified(); - - /** - * Convert the (currently virtual) persistent attribute to a specified - * attribute. The attribute will be added to the list of specified - * attributes and added to the <code>orm.xml</code> file. The mapping will - * be changed according to the specified mapping key. - * Return the new attribute. - * @see #isVirtual() - * @throw IllegalStateException if the attribute is already specified - */ - OrmPersistentAttribute convertToSpecified(String mappingKey); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java deleted file mode 100644 index 09e3b7ebca..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationship.java +++ /dev/null @@ -1,32 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> relationship (join column, join table, mapped by, - * primary key join column, 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.3 - * @since 2.2 - */ -public interface OrmReadOnlyRelationship - extends ReadOnlyRelationship, XmlContextNode -{ - OrmReadOnlyRelationshipStrategy getStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.java deleted file mode 100644 index 38e20442f6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyRelationshipStrategy.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> read-only relationship strategy - * <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 OrmReadOnlyRelationshipStrategy - extends ReadOnlyRelationshipStrategy, XmlContextNode -{ - OrmReadOnlyRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java deleted file mode 100644 index d49312a8ac..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.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.core.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.ReadOnlyTable; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> read-only table - * <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 OrmReadOnlyTable - extends ReadOnlyTable, XmlContextNode -{ - TextRange getNameTextRange(); - TextRange getSchemaTextRange(); - TextRange getCatalogTextRange(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java deleted file mode 100644 index c8f8f00c81..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyUniqueConstraint.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; - -/** - * <code>orm.xml</code> read-only unique constraint - * <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.0 - */ -public interface OrmReadOnlyUniqueConstraint - extends ReadOnlyUniqueConstraint, XmlContextNode -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java deleted file mode 100644 index a5118a1231..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReferenceTable.java +++ /dev/null @@ -1,40 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.ReferenceTable; - -/** - * <code>orm.xml</code> join table or collection table - * <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 OrmReferenceTable - extends ReferenceTable, OrmTable -{ - // ********** join columns ********** - - ListIterable<OrmJoinColumn> getJoinColumns(); - - ListIterable<OrmJoinColumn> getSpecifiedJoinColumns(); - OrmJoinColumn getSpecifiedJoinColumn(int index); - OrmJoinColumn addSpecifiedJoinColumn(); - OrmJoinColumn addSpecifiedJoinColumn(int index); - - OrmJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java deleted file mode 100644 index 416a61364b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationship.java +++ /dev/null @@ -1,31 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Relationship; - -/** - * <code>orm.xml</code> relationship (join column, join table, mapped by, - * primary key join column, 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.3 - * @since 2.2 - */ -public interface OrmRelationship - extends Relationship, OrmReadOnlyRelationship -{ - OrmRelationshipStrategy getStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java deleted file mode 100644 index 739d460fc8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipMapping.java +++ /dev/null @@ -1,35 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.RelationshipMapping; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlRelationshipMapping; - -/** - * <code>orm.xml</code> 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.3 - * @since 2.0 - */ -public interface OrmRelationshipMapping - extends RelationshipMapping, OrmAttributeMapping -{ - AbstractXmlRelationshipMapping getXmlAttributeMapping(); - - OrmCascade getCascade(); - - OrmMappingRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.java deleted file mode 100644 index 7704ca4aa4..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmRelationshipStrategy.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.RelationshipStrategy; - -/** - * <code>orm.xml</code> relationship strategy - * <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 OrmRelationshipStrategy - extends RelationshipStrategy, OrmReadOnlyRelationshipStrategy -{ - OrmRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java deleted file mode 100644 index 93f476b411..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSecondaryTable.java +++ /dev/null @@ -1,46 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable; -import org.eclipse.jpt.jpa.core.context.SecondaryTable; -import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable; - -/** - * <code>orm.xml</code> secondary table - * <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.0 - */ -public interface OrmSecondaryTable - extends SecondaryTable, OrmTable -{ - OrmEntity getParent(); - - void initializeFrom(ReadOnlySecondaryTable oldSecondaryTable); - - XmlSecondaryTable getXmlTable(); - - - // ********** primary key join columns ********** - - ListIterable<OrmPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<OrmPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(); - OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index); - OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.java deleted file mode 100644 index b4158a6c45..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSequenceGenerator.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.SequenceGenerator; -import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator; - -/** - * <code>orm.xml</code> sequence generator - * <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.0 - */ -public interface OrmSequenceGenerator - extends SequenceGenerator, OrmGenerator -{ - XmlSequenceGenerator getXmlGenerator(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.java deleted file mode 100644 index bfe8774ab9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmSingleRelationshipMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.SingleRelationshipMapping; -import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlSingleRelationshipMapping; - -/** - * <code>orm.xml</code> single (1:1, m: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.0 - */ -public interface OrmSingleRelationshipMapping - extends SingleRelationshipMapping, OrmRelationshipMapping -{ - AbstractXmlSingleRelationshipMapping getXmlAttributeMapping(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmStructureNodes.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmStructureNodes.java deleted file mode 100644 index 64bd9c75bc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmStructureNodes.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.JptJpaCorePlugin; - -/** - * - * - * 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.0 - * @since 2.0 - */ -public interface OrmStructureNodes -{ - - String ENTITY_MAPPINGS_ID = JptJpaCorePlugin.PLUGIN_ID + ".orm.entityMappings"; //$NON-NLS-1$ - - String PERSISTENT_TYPE_ID = JptJpaCorePlugin.PLUGIN_ID + ".orm.persistentType"; //$NON-NLS-1$ - - String PERSISTENT_ATTRIBUTE_ID = JptJpaCorePlugin.PLUGIN_ID + ".orm.persistentAttribute"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java deleted file mode 100644 index 89e5d98697..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTable.java +++ /dev/null @@ -1,34 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.Table; - -/** - * <code>orm.xml</code> table - * <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.0 - */ -public interface OrmTable - extends Table, OrmReadOnlyTable -{ - ListIterable<OrmUniqueConstraint> getUniqueConstraints(); - OrmUniqueConstraint getUniqueConstraint(int index); - OrmUniqueConstraint addUniqueConstraint(); - OrmUniqueConstraint addUniqueConstraint(int index); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.java deleted file mode 100644 index bb6d5bc2e2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTableGenerator.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.TableGenerator; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator; - -/** - * <code>orm.xml</code> table generator - * <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.0 - */ -public interface OrmTableGenerator - extends TableGenerator, OrmGenerator -{ - XmlTableGenerator getXmlGenerator(); - - - // ********** unique constraints ********** - - @SuppressWarnings("unchecked") - Iterable<OrmUniqueConstraint> getUniqueConstraints(); - - OrmUniqueConstraint addUniqueConstraint(); - - OrmUniqueConstraint addUniqueConstraint(int index); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java deleted file mode 100644 index e474b841a2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java +++ /dev/null @@ -1,63 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.Converter; -import org.eclipse.jpt.jpa.core.context.TemporalConverter; -import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping; - -/** - * <code>orm.xml</code> temporal 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. - */ -public interface OrmTemporalConverter - extends TemporalConverter, OrmConverter -{ - // ********** adapter ********** - - public static class Adapter - implements OrmConverter.Adapter - { - private static final Adapter INSTANCE = new Adapter(); - public static Adapter instance() { - return INSTANCE; - } - - private Adapter() { - super(); - } - - public Class<? extends Converter> getConverterType() { - return TemporalConverter.class; - } - - public OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) { - XmlConvertibleMapping xmlMapping = (XmlConvertibleMapping) parent.getXmlAttributeMapping(); - return (xmlMapping.getTemporal() == null) ? null : factory.buildOrmTemporalConverter(parent); - } - - public boolean isActive(XmlConvertibleMapping xmlMapping) { - return xmlMapping.getTemporal() != null; - } - - public OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory) { - return factory.buildOrmTemporalConverter(parent); - } - - public void clearXmlValue(XmlConvertibleMapping xmlMapping) { - xmlMapping.setTemporal(null); - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.java deleted file mode 100644 index 4ee1e4b385..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTransientMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.TransientMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient; - -/** - * <code>orm.xml</code> transient "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.0 - */ -public interface OrmTransientMapping - extends TransientMapping, OrmAttributeMapping -{ - XmlTransient getXmlAttributeMapping(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java deleted file mode 100644 index ea81dae761..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMapping.java +++ /dev/null @@ -1,159 +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.core.context.orm; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.context.TypeMapping; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * <code>orm.xml</code> 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 3.0 - * @since 2.0 - */ -public interface OrmTypeMapping - extends TypeMapping, XmlContextNode -{ - // ********** class ********** - - /** - * <strong>NB:</strong> This may be a partial name to be prefixed by the - * entity mappings's package value. - * - * @see EntityMappings#getPackage() - */ - String getClass_(); - - /** - * @see #getClass_() - */ - void setClass(String class_); - String CLASS_PROPERTY = "class"; //$NON-NLS-1$ - - - // ********** metadata complete ********** - - boolean isMetadataComplete(); - Boolean getSpecifiedMetadataComplete(); - void setSpecifiedMetadataComplete(Boolean metadataComplete); - String SPECIFIED_METADATA_COMPLETE_PROPERTY = "specifiedMetadataComplete"; //$NON-NLS-1$ - - /** - * Override metadata complete is true if the type mapping's persistence - * unit is marked "XML mapping metadata complete". - */ - boolean isOverrideMetadataComplete(); - String OVERRIDE_METADATA_COMPLETE_PROPERTY = "overrideMetadataComplete"; //$NON-NLS-1$ - - - // ********** XML ********** - - /** - * Type mappings are a sequence in the orm schema. We must keep - * the list of type mappings in the appropriate order so the wtp xml - * translators will write them to the xml in that order and they - * will adhere to the schema. - * <p> - * Each concrete implementation must implement this - * method and return an int that matches its order in the schema. - */ - int getXmlSequence(); - - /** - * Add the type mapping's XML type mapping to the appropriate list - * in the specified XML entity mappings. - */ - void addXmlTypeMappingTo(XmlEntityMappings entityMappings); - - /** - * Remove the type mapping's XML type mapping from the appropriate list - * in the specified XML entity mappings. - */ - void removeXmlTypeMappingFrom(XmlEntityMappings entityMappings); - - XmlTypeMapping getXmlTypeMapping(); - - TextRange getSelectionTextRange(); - - TextRange getClassTextRange(); - - TextRange getAttributesTextRange(); - - boolean containsOffset(int textOffset); - - - // ********** Java type mapping ********** - - /** - * Return the Java type mapping corresponding to the <code>orm.xml</code> - * type mapping. Return <code>null</code> if there is no such Java type - * mapping; i.e. it does not exist or it is not the same type of type - * mapping (entity, mapped superclass, embeddable). - * - * @see #getJavaTypeMappingForDefaults() - */ - JavaTypeMapping getJavaTypeMapping(); - - /** - * Check "metadata complete" before returning the Java type mapping. - * For <code>orm.xml</code> defaults, if "metadata complete" is - * <code>true</code>, return <code>null</code>. - * - * @see #getJavaTypeMapping() - */ - JavaTypeMapping getJavaTypeMappingForDefaults(); - - - // ********** refactoring ********** - - /** - * Create a text DeleteEdit for deleting the type mapping element and any text that precedes it - */ - DeleteEdit createDeleteEdit(); - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - - // ********** misc ********** - - OrmPersistentType getPersistentType(); - - void initializeFrom(OrmTypeMapping oldMapping); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java deleted file mode 100644 index fef4b7d092..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTypeMappingDefinition.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 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.core.context.orm; - -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.jpt.jpa.core.MappingKeys; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping; - -/** - * Part of mechanism to extend the types of <code>orm.xml</code> type mappings. - * <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 OrmTypeMappingDefinition -{ - /** - * Return the definition's mapping key. - * @see MappingKeys - */ - String getKey(); - - /** - * Build a resource mapping using the specifed factory. - */ - XmlTypeMapping buildResourceMapping(EFactory factory); - - /** - * Build a context mapping for the specified parent and resource mapping, - * using the specified factory. - */ - OrmTypeMapping buildContextMapping( - OrmPersistentType parent, - XmlTypeMapping resourceMapping, - OrmXmlContextNodeFactory factory); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.java deleted file mode 100644 index f320080aa6..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmUniqueConstraint.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.UniqueConstraint; -import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint; - -/** - * <code>orm.xml</code> unique constraint - * <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.0 - */ -public interface OrmUniqueConstraint - extends UniqueConstraint, OrmReadOnlyUniqueConstraint -{ - XmlUniqueConstraint getXmlUniqueConstraint(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.java deleted file mode 100644 index 4f29cf3fd2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVersionMapping.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VersionMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion; - -/** - * <code>orm.xml</code> 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 2.3 - * @since 2.0 - */ -public interface OrmVersionMapping - extends VersionMapping, OrmColumnMapping, OrmConvertibleMapping -{ - XmlVersion getXmlAttributeMapping(); -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.java deleted file mode 100644 index 4023c5ab17..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAssociationOverride.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualAssociationOverride; - -/** - * <code>orm.xml</code> <em>virtual</em> association override - * <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 OrmVirtualAssociationOverride - extends VirtualAssociationOverride, - OrmVirtualOverride, - OrmReadOnlyAssociationOverride -{ - OrmVirtualOverrideRelationship getRelationship(); - - OrmAssociationOverride convertToSpecified(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.java deleted file mode 100644 index 407053f9cd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualAttributeOverride.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualAttributeOverride; - -/** - * Java <em>virtual</em> attribute override - * <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 OrmVirtualAttributeOverride - extends VirtualAttributeOverride, - OrmVirtualOverride, - OrmReadOnlyAttributeOverride -{ - OrmAttributeOverride convertToSpecified(); - - OrmVirtualColumn getColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java deleted file mode 100644 index 1deafbb7a2..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java +++ /dev/null @@ -1,46 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn; -import org.eclipse.jpt.jpa.core.context.VirtualColumn; - -/** - * <code>orm.xml</code> virtual 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 OrmVirtualColumn - extends VirtualColumn, OrmReadOnlyBaseColumn -{ - /** - * The overridden column can be either a Java join column or an - * <code>orm.xml</code> join column; so we don't change the return type - * here. - */ - ReadOnlyColumn getOverriddenColumn(); - - - // ********** owner ********** - - interface Owner - extends VirtualColumn.Owner, OrmReadOnlyBaseColumn.Owner - { - /** - * The overridden column can be either a Java column or an - * <code>orm.xml</code> column; so we don't change the return type here. - */ - ReadOnlyColumn resolveOverriddenColumn(); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java deleted file mode 100644 index 3c6f174550..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumn.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn; -import org.eclipse.jpt.jpa.core.context.VirtualJoinColumn; - -/** - * <code>orm.xml</code> virtual join 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 OrmVirtualJoinColumn - extends VirtualJoinColumn, OrmReadOnlyJoinColumn -{ - /** - * The overridden join column can be either a Java join column or an - * <code>orm.xml</code> join column; so we don't change the return type - * here. - */ - ReadOnlyJoinColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.java deleted file mode 100644 index d2d4154496..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationship.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationship; - -/** - * <code>orm.xml</code> virtual join column 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 OrmVirtualJoinColumnRelationship - extends VirtualJoinColumnRelationship, - OrmVirtualRelationship -{ - OrmVirtualJoinColumnRelationshipStrategy getJoinColumnStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.java deleted file mode 100644 index f938095e33..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinColumnRelationshipStrategy.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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.VirtualJoinColumnRelationshipStrategy; - -/** - * <code>orm.xml</code> virtual join column relationship strategy. - * <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 OrmVirtualJoinColumnRelationshipStrategy - extends VirtualJoinColumnRelationshipStrategy, OrmVirtualRelationshipStrategy -{ - ListIterable<OrmVirtualJoinColumn> getJoinColumns(); - ListIterable<OrmVirtualJoinColumn> getSpecifiedJoinColumns(); - OrmVirtualJoinColumn getSpecifiedJoinColumn(int index); - OrmVirtualJoinColumn getDefaultJoinColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java deleted file mode 100644 index 2a200360fb..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTable.java +++ /dev/null @@ -1,49 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable; -import org.eclipse.jpt.jpa.core.context.VirtualJoinTable; - -/** - * <code>orm.xml</code> virtual join table - * <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 OrmVirtualJoinTable - extends VirtualJoinTable, OrmReadOnlyTable -{ - OrmVirtualJoinTableRelationshipStrategy getParent(); - - ListIterable<OrmVirtualUniqueConstraint> getUniqueConstraints(); - OrmVirtualUniqueConstraint getUniqueConstraint(int index); - - ListIterable<OrmVirtualJoinColumn> getJoinColumns(); - ListIterable<OrmVirtualJoinColumn> getSpecifiedJoinColumns(); - OrmVirtualJoinColumn getSpecifiedJoinColumn(int index); - OrmVirtualJoinColumn getDefaultJoinColumn(); - - ListIterable<OrmVirtualJoinColumn> getInverseJoinColumns(); - ListIterable<OrmVirtualJoinColumn> getSpecifiedInverseJoinColumns(); - OrmVirtualJoinColumn getSpecifiedInverseJoinColumn(int index); - OrmVirtualJoinColumn getDefaultInverseJoinColumn(); - - /** - * The overridden table can be either a Java table - * or an <code>orm.xml</code> table; so we don't change the - * return type here. - */ - public ReadOnlyJoinTable getOverriddenTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.java deleted file mode 100644 index b5b58c4bfc..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationship.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationship; - -/** - * <code>orm.xml</code> virtual join table 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 OrmVirtualJoinTableRelationship - extends VirtualJoinTableRelationship, - OrmVirtualRelationship -{ - OrmVirtualJoinTableRelationshipStrategy getJoinTableStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.java deleted file mode 100644 index 2072e72dd5..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualJoinTableRelationshipStrategy.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualJoinTableRelationshipStrategy; - -/** - * <code>orm.xml</code> virtual join table relationship strategy. - * <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 OrmVirtualJoinTableRelationshipStrategy - extends VirtualJoinTableRelationshipStrategy, OrmVirtualRelationshipStrategy -{ - OrmVirtualJoinTable getJoinTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.java deleted file mode 100644 index 92abbba1d7..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverride.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualOverride; - -/** - * <code>orm.xml</code> <em>virtual</em><ul> - * <li>attribute override - * <li>association override - * </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. - */ -public interface OrmVirtualOverride - extends VirtualOverride, OrmReadOnlyOverride -{ - OrmOverride convertToSpecified(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.java deleted file mode 100644 index aae36353b0..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualOverrideRelationship.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualOverrideRelationship; - -/** - * <code>orm.xml</code> virtual association override 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 OrmVirtualOverrideRelationship - extends VirtualOverrideRelationship, - OrmVirtualJoinColumnRelationship -{ - // combine interfaces -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.java deleted file mode 100644 index 77388244a9..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualPrimaryKeyJoinColumn.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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualPrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn; - -/** - * <code>orm.xml</code> virtual primary key join column. This represents - * a default column taken from the 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. - */ -public interface OrmVirtualPrimaryKeyJoinColumn - extends VirtualPrimaryKeyJoinColumn, OrmReadOnlyBaseJoinColumn -{ - /** - * This is not the best method name; we are simply overloading the meaning - * of the inherited method. A better method name would be something like - * <code>getJavaColumn()</code> - */ - JavaPrimaryKeyJoinColumn getOverriddenColumn(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java deleted file mode 100644 index 7738e2e999..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationship.java +++ /dev/null @@ -1,27 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualRelationship; - -/** - * <code>orm.xml</code> virtual 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 OrmVirtualRelationship - extends VirtualRelationship, OrmReadOnlyRelationship -{ - OrmVirtualRelationshipStrategy getStrategy(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java deleted file mode 100644 index 08c209b2c3..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualRelationshipStrategy.java +++ /dev/null @@ -1,27 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.VirtualRelationshipStrategy; - -/** - * <code>orm.xml</code> virtual strategy - * <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 OrmVirtualRelationshipStrategy - extends VirtualRelationshipStrategy, OrmReadOnlyRelationshipStrategy -{ - OrmVirtualRelationship getRelationship(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java deleted file mode 100644 index 937913dd5b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualSecondaryTable.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.context.VirtualSecondaryTable; -import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable; - -/** - * <code>orm.xml</code> virtual secondary table - * <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 OrmVirtualSecondaryTable - extends VirtualSecondaryTable, OrmReadOnlyTable -{ - ListIterable<OrmVirtualPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns(); - ListIterable<OrmVirtualPrimaryKeyJoinColumn> getSpecifiedPrimaryKeyJoinColumns(); - OrmVirtualPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn(); - - JavaSecondaryTable getOverriddenTable(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java deleted file mode 100644 index 2e2c1ad703..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualUniqueConstraint.java +++ /dev/null @@ -1,33 +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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint; -import org.eclipse.jpt.jpa.core.context.VirtualUniqueConstraint; - -/** - * <code>orm.xml</code> virtual database unique constraint - * <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 OrmVirtualUniqueConstraint - extends VirtualUniqueConstraint, OrmReadOnlyUniqueConstraint -{ - /** - * The overridden unique constraint can be either a Java unique constraint - * or an <code>orm.xml</code> unique constraint; so we don't change the - * return type here. - */ - ReadOnlyUniqueConstraint getOverriddenUniqueConstraint(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java deleted file mode 100644 index 0b4a509790..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXml.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.orm; - -import org.eclipse.jpt.jpa.core.context.MappingFile; - -/** - * JPA <code>orm.xml</code> file. - * <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.0 - */ -public interface OrmXml - extends MappingFile -{ - // ********** root ********** - - /** - * String constant associated with changes to the - * <code>entity-mappings</code> property - */ - String ROOT_PROPERTY = "root"; //$NON-NLS-1$ - - /** - * Covariant override. - */ - EntityMappings getRoot(); - - OrmPersistentType getPersistentType(String name); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java deleted file mode 100644 index 9c15fc8639..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java +++ /dev/null @@ -1,270 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.orm; - -import org.eclipse.jpt.common.core.resource.java.JavaResourceField; -import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod; -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn; -import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable; -import org.eclipse.jpt.jpa.core.context.ReadOnlyTable; -import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint; -import org.eclipse.jpt.jpa.core.context.Table; -import org.eclipse.jpt.jpa.core.context.UniqueConstraint; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeOverride; -import org.eclipse.jpt.jpa.core.resource.orm.XmlBasic; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddable; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbedded; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEmbeddedId; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity; -import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings; -import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue; -import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratorContainer; -import org.eclipse.jpt.jpa.core.resource.orm.XmlId; -import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn; -import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToMany; -import org.eclipse.jpt.jpa.core.resource.orm.XmlManyToOne; -import org.eclipse.jpt.jpa.core.resource.orm.XmlMappedSuperclass; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedNativeQuery; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedQuery; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany; -import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToOne; -import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn; -import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryContainer; -import org.eclipse.jpt.jpa.core.resource.orm.XmlQueryHint; -import org.eclipse.jpt.jpa.core.resource.orm.XmlSecondaryTable; -import org.eclipse.jpt.jpa.core.resource.orm.XmlSequenceGenerator; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTableGenerator; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTransient; -import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint; -import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion; - -/** - * <code>orm.xml</code> context node factory - * <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 - */ -// TODO bjv we need a factory interface for a 1.0 orm.xml in a 2.0 project... -// since it must return slightly different objects (e.g. 2.0 attribute mappings) -// OrmXml1_0ContextNodeFactory2_0 ? -public interface OrmXmlContextNodeFactory -{ - EntityMappings buildEntityMappings(OrmXml parent, XmlEntityMappings entityMappings); - - OrmPersistenceUnitMetadata buildOrmPersistenceUnitMetadata(EntityMappings parent); - - OrmPersistenceUnitDefaults buildOrmPersistenceUnitDefaults(OrmPersistenceUnitMetadata parent); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.PersistentType2_0#getDeclaringTypeName() - */ - OrmPersistentType buildOrmPersistentType(EntityMappings parent, XmlTypeMapping resourceMapping); - - OrmEntity buildOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping); - - OrmMappedSuperclass buildOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping); - - OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0 - */ - OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentType parent, XmlAttributeMapping xmlMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0 - */ - OrmReadOnlyPersistentAttribute buildVirtualOrmPersistentField(OrmPersistentType parent, JavaResourceField javaResourceField); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyPersistentAttribute2_0 - */ - OrmReadOnlyPersistentAttribute buildVirtualOrmPersistentProperty(OrmPersistentType parent, JavaResourceMethod javaResourceGetter, JavaResourceMethod javaResourceSetter); - - OrmTable buildOrmTable(OrmEntity parent, Table.Owner owner); - - OrmSecondaryTable buildOrmSecondaryTable(OrmEntity parent, Table.Owner owner, XmlSecondaryTable xmlSecondaryTable); - - OrmVirtualSecondaryTable buildOrmVirtualSecondaryTable(OrmEntity parent, ReadOnlyTable.Owner owner, JavaSecondaryTable javaSecondaryTable); - - OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn); - - OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn); - - OrmJoinTable buildOrmJoinTable(OrmJoinTableRelationshipStrategy parent, Table.Owner owner); - - OrmVirtualJoinTable buildOrmVirtualJoinTable(OrmVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable); - - OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn); - - OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn); - - OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner); - - OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner); - - OrmAttributeOverride buildOrmAttributeOverride(OrmAttributeOverrideContainer parent, XmlAttributeOverride xmlOverride); - - OrmVirtualAttributeOverride buildOrmVirtualAttributeOverride(OrmAttributeOverrideContainer parent, String name); - - OrmAssociationOverride buildOrmAssociationOverride(OrmAssociationOverrideContainer parent, XmlAssociationOverride xmlOverride); - - OrmVirtualAssociationOverride buildOrmVirtualAssociationOverride(OrmAssociationOverrideContainer parent, String name); - - OrmOverrideRelationship buildOrmOverrideRelationship(OrmAssociationOverride parent); - - OrmVirtualOverrideRelationship buildOrmVirtualOverrideRelationship(OrmVirtualAssociationOverride parent); - - OrmDiscriminatorColumn buildOrmDiscriminatorColumn(OrmEntity parent, OrmDiscriminatorColumn.Owner owner); - - OrmColumn buildOrmColumn(XmlContextNode parent, OrmColumn.Owner owner); - - OrmVirtualColumn buildOrmVirtualColumn(XmlContextNode parent, OrmVirtualColumn.Owner owner); - - OrmGeneratedValue buildOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue resourceGeneratedValue); - - OrmGeneratorContainer buildOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer resourceGeneratorContainer); - - OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator); - - OrmTableGenerator buildOrmTableGenerator(XmlContextNode parent, XmlTableGenerator resourceTableGenerator); - - OrmQueryContainer buildOrmQueryContainer(XmlContextNode parent, XmlQueryContainer resourceQueryContainer); - - OrmNamedNativeQuery buildOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery resourceNamedQuery); - - OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery); - - OrmQueryHint buildOrmQueryHint(OrmQuery parent, XmlQueryHint resourceQueryhint); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmBasicMapping buildOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmManyToManyMapping buildOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmOneToManyMapping buildOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmManyToOneMapping buildOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmOneToOneMapping buildOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmEmbeddedIdMapping buildOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmEmbeddedMapping buildOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmIdMapping buildOrmIdMapping(OrmPersistentAttribute parent, XmlId resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmTransientMapping buildOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmVersionMapping buildOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmAttributeMapping buildOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping); - - /** - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmAttributeMapping buildUnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping); - - OrmUniqueConstraint buildOrmUniqueConstraint(XmlContextNode parent, UniqueConstraint.Owner owner, XmlUniqueConstraint resourceUniqueConstraint); - - OrmVirtualUniqueConstraint buildOrmVirtualUniqueConstraint(XmlContextNode parent, ReadOnlyUniqueConstraint overriddenUniqueConstraint); - - OrmConverter buildOrmEnumeratedConverter(OrmAttributeMapping parent); - - OrmConverter buildOrmTemporalConverter(OrmAttributeMapping parent); - - OrmConverter buildOrmLobConverter(OrmAttributeMapping parent); - - /** - * JPA 1.0 only - * <p> - * NB: A factory for a version 1.0 <code>orm.xml</code> in a JPA 2.0 project - * must build objects that implement the appropriate behavior. - * @see org.eclipse.jpt.jpa.core.jpa2.context.AttributeMapping2_0 - */ - OrmOrderable buildOrmOrderable(OrmAttributeMapping parent); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java deleted file mode 100644 index 7ed177a093..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlDefinition.java +++ /dev/null @@ -1,54 +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.core.context.orm; - -import org.eclipse.emf.ecore.EFactory; - -/** - * <code>orm.xml</code> definition - * <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 OrmXmlDefinition - extends MappingFileDefinition -{ - /** - * Return the factory for building XML resource nodes. - */ - EFactory getResourceNodeFactory(); - - /** - * Return the factory for building XML context nodes. - */ - OrmXmlContextNodeFactory getContextNodeFactory(); - - - // ********** type/attribute mappings ********** - - /** - * Return a type mapping definiton for the specified mapping key. - * @throws IllegalArgumentException if the mapping key is not - * supported - */ - OrmTypeMappingDefinition getTypeMappingDefinition(String mappingKey); - - /** - * Return an attribute mapping definiton for the specified mapping key. - * Never return <code>null</code>. - */ - OrmAttributeMappingDefinition getAttributeMappingDefinition(String mappingKey); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java deleted file mode 100644 index 1275887f77..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java +++ /dev/null @@ -1,62 +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.core.context.orm; - -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.jpt.jpa.core.MappingKeys; -import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping; -import org.eclipse.jpt.jpa.core.resource.orm.XmlNullAttributeMapping; - -/** - * 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 class UnsupportedOrmAttributeMappingDefinition - implements OrmAttributeMappingDefinition -{ - // singleton - private static final OrmAttributeMappingDefinition INSTANCE = - new UnsupportedOrmAttributeMappingDefinition(); - - - /** - * Return the singleton. - */ - public static OrmAttributeMappingDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private UnsupportedOrmAttributeMappingDefinition() { - super(); - } - - - public String getKey() { - return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY; - } - - public XmlAttributeMapping buildResourceMapping(EFactory factory) { - throw new UnsupportedOperationException(); - } - - public OrmAttributeMapping buildContextMapping(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping, OrmXmlContextNodeFactory factory) { - return factory.buildUnsupportedOrmAttributeMapping(parent, (XmlNullAttributeMapping) resourceMapping); - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java deleted file mode 100644 index 5902e9dd5f..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/ClassRef.java +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.PersistentType; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * Context model corresponding to the XML resource model - * {@link XmlJavaClassRef}, which corresponds to the <code>class<code> element - * in the <code>persistence.xml</code> file. - * This is also used for "implied" class refs; i.e. class refs that are not - * explicitly listed in the <code>persistence.xml</code> file. - * <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.0 - */ -public interface ClassRef - extends XmlContextNode, JpaStructureNode, PersistentType.Owner -{ - /** - * Return whether the class ref is a reference to the specified type. - */ - boolean isFor(String typeName); - - /** - * Return <code>true</code> if the mapping file ref is <em>virtual</em>; - * return <code>false</code> if the mapping file ref is represented by an - * entry in the <code>persistence.xml</code> file. - */ - boolean isVirtual(); - - /** - * Return the class ref's corresponding resource class ref. - * This is <code>null</code> for <em>implied</em> class refs. - */ - XmlJavaClassRef getXmlClassRef(); - - /** - * Return whether the text representation of this persistence unit contains - * the given text offset - */ - boolean containsOffset(int textOffset); - - - // ********** class name ********** - - /** - * String constant associated with changes to the class name - */ - final static String CLASS_NAME_PROPERTY = "className"; //$NON-NLS-1$ - - /** - * Return the class name of the class ref. - */ - String getClassName(); - - /** - * Set the class name of the class ref. - */ - void setClassName(String className); - - - // ********** java persistent type ********** - - /** - * String constant associated with changes to the java persistent type - */ - final static String JAVA_PERSISTENT_TYPE_PROPERTY = "javaPersistentType"; //$NON-NLS-1$ - - /** - * Return the JavaPersistentType that corresponds to this IClassRef. - * This can be null. - * This is not settable by users of this API. - */ - JavaPersistentType getJavaPersistentType(); - - - // ********** refactoring ********** - - /** - * If this {@link #isFor(String)} the given IType, create a text - * DeleteEdit for deleting the class element and any text that precedes it. - * Otherwise return an EmptyIterable. - * Though this will contain 1 or 0 DeleteEdits, using an Iterable - * for ease of use with other createDeleteEdit API. - */ - Iterable<DeleteEdit> createDeleteTypeEdits(IType type); - - /** - * Create ReplaceEdits for renaming the class element to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - * If this ClassRef does not match the original type, then return an empty Iterable. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming the class's package to the newName. - * The originalPackage has not yet been renamed. - * If this class is not a part of the original package, then return an empty Iterable. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java deleted file mode 100644 index 1ae7d394b8..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/JarFileRef.java +++ /dev/null @@ -1,86 +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.core.context.persistence; - -import org.eclipse.core.resources.IFolder; -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.context.java.JarFile; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * Context model corresponding to the - * XML resource model {@link XmlJarFileRef}, - * which corresponds to the <code>jar-file</code> - * element in the <code>persistence.xml</code> file. - * <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.2 - */ -public interface JarFileRef - extends XmlContextNode, JpaStructureNode, PersistentTypeContainer -{ - // ********** file name ********** - - /** - * String constant associated with changes to the file name. - */ - String FILE_NAME_PROPERTY = "fileName"; //$NON-NLS-1$ - - /** - * Return the file name of the jar file ref. - */ - String getFileName(); - - /** - * Set the file name of the jar file ref. - */ - void setFileName(String fileName); - - - // ********** JAR file ********** - - /** - * String constant associated with changes to the JAR file. - */ - String JAR_FILE_PROPERTY = "jarFile"; //$NON-NLS-1$ - - /** - * Return the JAR file ref's JAR file corresponding to the file name. - */ - JarFile getJarFile(); - - - // ********** refactoring ********** - - /** - * Create ReplaceEdits for renaming any references to the originalFolder to the newName. - * The originalFolder has not yet been renamed. - */ - Iterable<ReplaceEdit> createReplaceFolderEdits(IFolder originalFolder, String newName); - - - // ********** misc ********** - - XmlJarFileRef getXmlJarFileRef(); - - /** - * Return whether the text representation of the JAR file ref contains - * the specified text offset. - */ - boolean containsOffset(int textOffset); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java deleted file mode 100644 index 5067e72a60..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/MappingFileRef.java +++ /dev/null @@ -1,184 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.MappingFile; -import org.eclipse.jpt.jpa.core.context.MappingFilePersistenceUnitMetadata; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * Context model corresponding to the - * XML resource model {@link XmlMappingFileRef}, - * which corresponds to the <code>mapping-file</code> element - * in the <code>persistence.xml</code> file. - * <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.0 - */ -public interface MappingFileRef - extends XmlContextNode, JpaStructureNode, PersistentTypeContainer -{ - /** - * Covariant override. - */ - PersistenceUnit getParent(); - - - // ********** file name ********** - - /** - * String constant associated with changes to the file name. - */ - String FILE_NAME_PROPERTY = "fileName"; //$NON-NLS-1$ - - /** - * Return the file name of the mapping file ref. - */ - String getFileName(); - - /** - * Set the file name of the mapping file ref. - */ - void setFileName(String fileName); - - /** - * Return whether the mapping file ref is a reference to the specified file. - */ - boolean isFor(IFile file); - - - // ********** mapping file (orm.xml) ********** - - /** - * String constant associated with changes to the mapping file. - */ - String MAPPING_FILE_PROPERTY = "mappingFile"; //$NON-NLS-1$ - - /** - * Return mapping file corresponding to the mapping file ref's file name. - * This can be <code>null</code> if the file name is invalid. - */ - MappingFile getMappingFile(); - - - // ********** persistence unit metadata ********** - - /** - * Return the mapping file's persistence unit metadata. - */ - MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata(); - - /** - * Return whether the mapping file's persistence unit metadata exist. - */ - boolean persistenceUnitMetadataExists(); - - - // ********** misc ********** - - /** - * Return the mapping file ref's corresponding resource mapping file ref. - */ - XmlMappingFileRef getXmlMappingFileRef(); - - /** - * Return whether the mapping file ref is "implied" by, or explicitly - * specified in, the <code>persistence.xml</code>. - */ - boolean isImplied(); - - /** - * Return whether the specified text offset is within - * the text representation of the mapping file. - */ - boolean containsOffset(int textOffset); - - - // ********** refactoring ********** - - /** - * Create DeleteEdits for deleting any references to the given type - * that is about to be deleted. - * Return an EmptyIterable if there are not any references to the given type. - */ - Iterable<DeleteEdit> createDeleteTypeEdits(IType type); - - /** - * If this {@link #isFor(IFile)} the given IFile, create a text - * DeleteEdit for deleting the mapping file element and any text that precedes it - * from the persistence.xml. - * Otherwise return an EmptyIterable. - * Though this will contain 1 or 0 DeleteEdits, using an Iterable - * for ease of use with other createDeleteEdit API. - */ - Iterable<DeleteEdit> createDeleteMappingFileEdits(IFile file); - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - /** - * Create ReplaceEdits for renaming any references to the originalFolder to the newName. - * The originalFolder has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenameFolderEdits(IFolder originalFolder, String newName); - - /** - * If this {@link #isFor(IFile)} the given IFile, create a text - * ReplaceEdit for renaming the mapping file element to the new name. - * Otherwise return an EmptyIterable. - * Though this will contain 1 or 0 ReplaceEdits, using an Iterable - * for ease of use with other createReplaceMappingFileEdits API. - */ - Iterable<ReplaceEdit> createRenameMappingFileEdits(IFile originalFile, String newName); - - /** - * If this {@link #isFor(IFile)} the given IFile create a text - * ReplaceEdit for moving the originalFile to the destination. - * Otherwise return an EmptyIterable. - * The originalFile has not been moved yet. - */ - Iterable<ReplaceEdit> createMoveMappingFileEdits(IFile originalFile, IPath runtineDestination); - - /** - * Create ReplaceEdits for moving any references to the originalFolder to the runtimeDestination. - * The runtimeDestination already includes the original folder name. - */ - Iterable<ReplaceEdit> createMoveFolderEdits(IFolder originalFolder, IPath runtimeDestination); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java deleted file mode 100644 index 6262887092..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/Persistence.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; -import org.eclipse.jpt.jpa.core.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence; - -/** - * Context model corresponding to the XML resource model {@link XmlPersistence}, - * which corresponds to the <code>persistence</code> element in the - * <code>persistence.xml</code> file. - * <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.0 - */ -public interface Persistence - extends XmlContextNode, JpaStructureNode -{ - /** - * Return the resource model object associated with this context model object - */ - XmlPersistence getXmlPersistence(); - - /** - * Covariant override. - */ - PersistenceXml getParent(); - - - // **************** persistence units ************************************** - - /** - * String constant associated with changes to the persistence units list - */ - String PERSISTENCE_UNITS_LIST = "persistenceUnits"; //$NON-NLS-1$ - - /** - * Return the persistence element's persistence units. - */ - ListIterable<PersistenceUnit> getPersistenceUnits(); - - /** - * Return the number of persistence units. - */ - int getPersistenceUnitsSize(); - - /** - * Add a persistence unit and return it. - */ - PersistenceUnit addPersistenceUnit(); - - /** - * Add a persistence unit at the specified index and return it. - */ - PersistenceUnit addPersistenceUnit(int index); - - /** - * Remove the specified persistence unit from the persistence node. - */ - void removePersistenceUnit(PersistenceUnit persistenceUnit); - - /** - * Remove the persistence unit at the specified index from the persistence node. - */ - void removePersistenceUnit(int index); - - - // **************** text range ********************************************* - - /** - * Return whether the text representation of this persistence contains - * the specified text offset. - */ - boolean containsOffset(int textOffset); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceStructureNodes.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceStructureNodes.java deleted file mode 100644 index 2e34050432..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceStructureNodes.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.core.context.persistence; - -import org.eclipse.jpt.jpa.core.JptJpaCorePlugin; - -/** - * - * - * 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.0 - */ -public interface PersistenceStructureNodes -{ - String PREFIX = JptJpaCorePlugin.PLUGIN_ID_ + "persistence"; //$NON-NLS-1$ - String PREFIX_ = PREFIX + '.'; - - String PERSISTENCE_ID = PREFIX_ + "persistence"; //$NON-NLS-1$ - String PERSISTENCE_UNIT_ID = PREFIX_ + "persistenceUnit"; //$NON-NLS-1$ - String CLASS_REF_ID = PREFIX_ + "classRef"; //$NON-NLS-1$ - String MAPPING_FILE_REF_ID = PREFIX_ + "mappingFileRef"; //$NON-NLS-1$ - String JAR_FILE_REF_ID = PREFIX_ + "jarFileRef"; //$NON-NLS-1$ - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java deleted file mode 100644 index aae3301d8b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java +++ /dev/null @@ -1,794 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.runtime.IPath; -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.JpaStructureNode; -import org.eclipse.jpt.jpa.core.context.AccessType; -import org.eclipse.jpt.jpa.core.context.Embeddable; -import org.eclipse.jpt.jpa.core.context.Entity; -import org.eclipse.jpt.jpa.core.context.Generator; -import org.eclipse.jpt.jpa.core.context.Query; -import org.eclipse.jpt.jpa.core.context.XmlContextNode; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty; -import org.eclipse.text.edits.DeleteEdit; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * Context model corresponding to the XML resource model {@link XmlPersistenceUnit}, - * which corresponds to the <code>persistence-unit</code> element in the - * <code>persistence.xml</code> file. - * <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.0 - */ -public interface PersistenceUnit - extends XmlContextNode, JpaStructureNode, PersistentTypeContainer -{ - /** - * Covariant override. - */ - Persistence getParent(); - - - // ********** name ********** - - /** - * String constant associated with changes to the persistence unit's name. - */ - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - - /** - * Return the persistence unit's name. - */ - String getName(); - - /** - * Set the persistence unit's name. - */ - void setName(String name); - - - // ********** transaction type ********** - - /** - * Return the persistence unit's transaction type, - * whether specified or defaulted. - */ - PersistenceUnitTransactionType getTransactionType(); - - /** - * String constant associated with changes to the persistence unit's - * specified transaction type - */ - String SPECIFIED_TRANSACTION_TYPE_PROPERTY = "specifiedTransactionType"; //$NON-NLS-1$ - - /** - * Return the persistence unit's specified transaction type. - */ - PersistenceUnitTransactionType getSpecifiedTransactionType(); - - /** - * Set the persistence unit's specified transaction type. - */ - void setSpecifiedTransactionType(PersistenceUnitTransactionType transactionType); - - /** - * String constant associated with changes to the persistence unit's - * default transaction type (not typically changed). - */ - String DEFAULT_TRANSACTION_TYPE_PROPERTY = "defaultTransactionType"; //$NON-NLS-1$ - - /** - * Return the persistence unit's default transaction type. - */ - PersistenceUnitTransactionType getDefaultTransactionType(); - - - // ********** description ********** - - /** - * String constant associated with changes to the persistence unit's description. - */ - String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$ - - /** - * Return the persistence unit's description. - */ - String getDescription(); - - /** - * Set the persistence unit's description. - */ - void setDescription(String description); - - - // ********** provider ********** - - /** - * String constant associated with changes to the persistence unit's provider. - */ - String PROVIDER_PROPERTY = "provider"; //$NON-NLS-1$ - - /** - * Return the persistence unit's provider. - */ - String getProvider(); - - /** - * Set the persistence unit's provider. - */ - void setProvider(String provider); - - - // ********** JTA data source ********** - - /** - * String constant associated with changes to the persistence unit's JTA data source - */ - String JTA_DATA_SOURCE_PROPERTY = "jtaDataSource"; //$NON-NLS-1$ - - /** - * Return the persistence unit's JTA data source. - */ - String getJtaDataSource(); - - /** - * Set the persistence unit's JTA data source. - */ - void setJtaDataSource(String jtaDataSource); - - - // ********** non-JTA data source ********** - - /** - * String constant associated with changes to the persistence unit's non-JTA data source - */ - String NON_JTA_DATA_SOURCE_PROPERTY = "nonJtaDataSource"; //$NON-NLS-1$ - - /** - * Return the persistence unit's non-JTA data source. - */ - String getNonJtaDataSource(); - - /** - * Set the persistence unit's non-JTA data source. - */ - void setNonJtaDataSource(String nonJtaDataSource); - - - // ********** mapping file refs ********** - - /** - * Return the persistence unit's list of mapping file refs, - * both specified and implied. - */ - ListIterable<MappingFileRef> getMappingFileRefs(); - - /** - * Return the size of the persistence unit's list of mapping file refs, - * both specified and implied. - */ - int getMappingFileRefsSize(); - - /** - * Return all the mapping file refs, both specified and implied, - * containing the specified type. - */ - Iterable<MappingFileRef> getMappingFileRefsContaining(String typeName); - - - // ********** specified mapping file refs ********** - - /** - * String constant associated with changes to the persistence unit's - * specified mapping file refs. - */ - String SPECIFIED_MAPPING_FILE_REFS_LIST = "specifiedMappingFileRefs"; //$NON-NLS-1$ - - /** - * Return the persistence unit's list of specified mapping file refs. - */ - ListIterable<MappingFileRef> getSpecifiedMappingFileRefs(); - - /** - * Return the size of the persistence unit's list of specified mapping file refs. - */ - int getSpecifiedMappingFileRefsSize(); - - /** - * Add a new specified mapping file ref to the persistence unit; - * return the newly-created mapping file ref. - */ - MappingFileRef addSpecifiedMappingFileRef(String fileName); - - /** - * Add a new specified mapping file ref to the persistence unit at the specified index; - * return the newly-created mapping file ref. - */ - MappingFileRef addSpecifiedMappingFileRef(int index, String fileName); - - /** - * Remove the specified mapping file ref from the persistence unit. - */ - void removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef); - - /** - * Remove the specified mapping file ref at the specified index from the persistence unit. - */ - void removeSpecifiedMappingFileRef(int index); - - - // ********** implied mapping file ref ********** - - /** - * String constant associated with changes to the persistence unit's - * implied mapping file ref. - */ - String IMPLIED_MAPPING_FILE_REF_PROPERTY = "impliedMappingFileRef"; //$NON-NLS-1$ - - /** - * Return the persistence unit's implied mapping file ref. - */ - MappingFileRef getImpliedMappingFileRef(); - - - // ********** jar file refs ********** - - /** - * String constant associated with changes to the persistence unit's - * JAR file refs. - */ - String JAR_FILE_REFS_LIST = "jarFileRefs"; //$NON-NLS-1$ - - /** - * Return the persistence unit's list of JAR file refs. - */ - ListIterable<JarFileRef> getJarFileRefs(); - - /** - * Return the size of the persistence unit's list of JAR file refs. - */ - int getJarFileRefsSize(); - - /** - * Add a new JAR file ref to the persistence unit; - * return the newly-created JAR file ref. - */ - JarFileRef addJarFileRef(String fileName); - - /** - * Add a new JAR file ref to the persistence unit at the specified index; - * return the newly-created JAR file ref. - */ - JarFileRef addJarFileRef(int index, String fileName); - - /** - * Remove the specified JAR file ref from the persistence unit. - */ - void removeJarFileRef(JarFileRef jarFileRef); - - /** - * Remove the JAR file ref at the specified index from the persistence unit. - */ - void removeJarFileRef(int index); - - - // ********** class refs ********** - - /** - * Return the persistence unit's list of class refs, - * both specified and implied. - */ - Iterable<ClassRef> getClassRefs(); - - /** - * Return the size of the persistence unit's list of class refs, - * both specified and implied. - */ - int getClassRefsSize(); - - - // ********** specified class refs ********** - - /** - * String constant associated with changes to the persistence unit's - * specified class refs. - */ - String SPECIFIED_CLASS_REFS_LIST = "specifiedClassRefs"; //$NON-NLS-1$ - - /** - * Return the persistence unit's list of specified class refs. - */ - ListIterable<ClassRef> getSpecifiedClassRefs(); - - /** - * Return the size of the persistence unit's list of specified mapping file refs. - */ - int getSpecifiedClassRefsSize(); - - /** - * Add a new specified class ref to the persistence unit; - * return the newly-created class ref. - */ - ClassRef addSpecifiedClassRef(String className); - - /** - * Add a new specified class ref to the persistence unit at the specified index; - * return the newly-created class ref. - */ - ClassRef addSpecifiedClassRef(int index, String className); - - /** - * Remove the specified class ref from the persistence unit. - */ - void removeSpecifiedClassRef(ClassRef classRef); - - /** - * Remove the specified class ref at the specified index from the persistence unit. - */ - void removeSpecifiedClassRef(int index); - - - // ********** implied class refs ********** - - /** - * String constant associated with changes to the persistence unit's - * implied class refs. - */ - String IMPLIED_CLASS_REFS_COLLECTION = "impliedClassRefs"; //$NON-NLS-1$ - - /** - * Return the persistence unit's list of implied class refs. - */ - Iterable<ClassRef> getImpliedClassRefs(); - - /** - * Return the size of the persistence unit's list of implied class refs. - */ - int getImpliedClassRefsSize(); - - - // ********** exclude unlisted classes ********** - - /** - * Return whether the persistence unit excludes unlisted classes. - */ - boolean excludesUnlistedClasses(); - - /** - * String constant associated with changes to the persistence unit's - * "exclude unlisted classes" flag. - */ - String SPECIFIED_EXCLUDE_UNLISTED_CLASSES_PROPERTY = "specifiedExcludeUnlistedClasses"; //$NON-NLS-1$ - - /** - * Return the persistence unit's specified "exclude unlisted classes" flag. - */ - Boolean getSpecifiedExcludeUnlistedClasses(); - - /** - * Set the persistence unit's specified "exclude unlisted classes" flag. - */ - void setSpecifiedExcludeUnlistedClasses(Boolean excludeUnlistedClasses); - - /** - * String constant associated with changes to the persistence unit's - * default "exclude unlisted classes" flag (not typically changed). - */ - String DEFAULT_EXCLUDE_UNLISTED_CLASSES_PROPERTY = "defaultExcludeUnlistedClasses"; //$NON-NLS-1$ - - /** - * Return whether the persistence unit excludes unlisted classes by default. - */ - boolean getDefaultExcludeUnlistedClasses(); - - - // ********** properties ********** - - /** - * String constant associated with changes to the persistence unit's - * properties. - */ - String PROPERTIES_LIST = "properties"; //$NON-NLS-1$ - - /** - * Return the persistence unit's list of properties. - */ - ListIterable<Property> getProperties(); - - /** - * Return the size of the persistence unit's list of properties. - */ - int getPropertiesSize(); - - /** - * Return the *first* property in the persistence unit's property list with - * the specified name. Return null if the list does not contain a property - * with the specified name. - */ - Property getProperty(String propertyName); - - /** - * Return all the properties in the persistence unit with the specified - * name. Return an empty Iterable if the persistence unit does not contain - * a property with the specified name. - */ - Iterable<Property> getPropertiesNamed(String propertyName); - - /** - * Return the persistence unit's properties with names beginning with the - * specified prefix. - */ - Iterable<Property> getPropertiesWithNamePrefix(String propertyNamePrefix); - - /** - * Add a new property to the persistence unit; - * return the newly-created property. - */ - Property addProperty(); - - /** - * Add a new property to the persistence unit at the specified index; - * return the newly-created property. - */ - Property addProperty(int index); - - /** - * Set the value of the *first* property in the persistence unit's property - * list with the specified name to the specified value, creating a new - * property if one does not already exist. If a property exists and the - * specified value is null, the existing property is removed. - */ - void setProperty(String propertyName, String value); - - /** - * Set the value of the property with the specified name, creating a new - * property if one does not exist or if the specified flag indicates - * duplicate property names are allowed. If a property exists and duplicate - * values are not allowed and the specified value is null, the existing - * property is removed. - */ - void setProperty(String propertyName, String value, boolean duplicatePropertyNamesAllowed); - - /** - * Remove the specified property from the persistence unit. - */ - void removeProperty(Property property); - - /** - * Remove the *first* property in the persistence unit's property list - * with the specified name. - */ - void removeProperty(String propertyName); - - /** - * Remove the *first* property in the persistence unit's property list - * with the specified name and value, allowing the removal of properties - * with duplicate property names. - */ - void removeProperty(String propertyName, String value); - - /** - * Call back method for Property name changing. - */ - void propertyNameChanged(String oldPropertyName, String newPropertyName, String value); - - /** - * Call back method for Property value changing. - */ - void propertyValueChanged(String propertyName, String newValue); - - /** - * Simple property interface. - */ - interface Property - extends XmlContextNode - { - PersistenceUnit getParent(); - - @SuppressWarnings("hiding") - String NAME_PROPERTY = "name"; //$NON-NLS-1$ - String getName(); - void setName(String name); - - String VALUE_PROPERTY = "value"; //$NON-NLS-1$ - String getValue(); - void setValue(String value); - - XmlProperty getXmlProperty(); - - /** - * Create ReplaceEdits for renaming the property value to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - * If this value does not match the original type, then return an empty Iterable. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming the property value package to the newName. - * The originalPackage has not yet been renamed. - * If this value is not in the originalPackage, then return an empty Iterable. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - } - - - // ********** mapping file (orm.xml) persistence unit metadata ********** - - /** - * String constant associated with changes to the persistence unit's - * "XML mapping metadata complete" flag. - */ - String XML_MAPPING_METADATA_COMPLETE_PROPERTY = "xmlMappingMetadataComplete"; //$NON-NLS-1$ - - /** - * Return the default "XML mapping metadata complete" flag from the - * first persistence unit metadata - * found in the persistence unit's list of mapping files. - */ - boolean isXmlMappingMetadataComplete(); - - /** - * String constant associated with changes to the persistence unit's - * default access type. - */ - String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$ - - /** - * Return the default access type from the first persistence unit metadata - * found in the persistence unit's list of mapping files. - */ - AccessType getDefaultAccess(); - - /** - * String constant associated with changes to the persistence unit's - * default database catalog. - */ - String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$ - - /** - * Return the default database catalog from the first persistence unit metadata - * found in the persistence unit's list of mapping files. - */ - String getDefaultCatalog(); - - /** - * String constant associated with changes to the persistence unit's - * default database schema. - */ - String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$ - - /** - * Return the default database schema from the first persistence unit metadata - * found in the persistence unit's list of mapping files. - */ - String getDefaultSchema(); - - /** - * String constant associated with changes to the persistence unit's - * default "cascade persist" flag. - */ - String DEFAULT_CASCADE_PERSIST_PROPERTY = "defaultCascadePersist"; //$NON-NLS-1$ - - /** - * Return the default "cascade persist" flag from the first persistence unit metadata - * found in the persistence unit's list of mapping files. - */ - boolean getDefaultCascadePersist(); - - - // ********** generators ********** - - /** - * String constant associated with changes to the persistence unit's - * collection of "global" generators. - */ - String GENERATORS_COLLECTION = "generators"; //$NON-NLS-1$ - - /** - * Return the "active" generators defined within the persistence unit's scope, - * including generators with duplicate names. "Active" generators are:<ul> - * <li>any generator defined in mapping files - * <li>any generator defined via Java annotations that is not "overridden" - * by a mapping file generator with the same name - * </ul> - * <strong>NB:</strong> A Java generator defined on a class or attribute - * that is overridden in a mapping file is <em>not</em>, as a result, - * itself overridden. A Java generator can only be overridden by a mapping - * file generator with the same name. - * <p> - * <strong>NB:</strong> A Java generator defined on a class or attribute - * whose corresponding mapping file mapping (or mapping file) is marked - * "metadata complete" is ignored. - */ - Iterable<Generator> getGenerators(); - - /** - * Return the number of "active" generators defined within the persistence - * unit's scope. - * @see #getGenerators() - */ - int getGeneratorsSize(); - - /** - * Return the names of the "active" generators defined in the persistence - * unit's scope, with duplicates removed. - */ - Iterable<String> getUniqueGeneratorNames(); - - - // ********** queries ********** - - /** - * String constant associated with changes to the persistence unit's - * collection of "global" queries. - */ - String QUERIES_COLLECTION = "queries"; //$NON-NLS-1$ - - /** - * Return the "active" queries defined within the persistence unit's scope, - * including queries with duplicate names. These are very similar to - * generators. - * @see #getGenerators() - */ - Iterable<Query> getQueries(); - - /** - * Return the number of "active" queries defined within the persistence - * unit's scope. - * @see #getQueries() - */ - int getQueriesSize(); - - /** - * Add the specified query (that is defined elsewhere) to the - * list of queries defined within the persistence unit's scope. - */ - void addQuery(Query query); - - - // ********** misc ********** - - /** - * Return the XML resource model corresponding to the - * persistence unit. - */ - XmlPersistenceUnit getXmlPersistenceUnit(); - - /** - * Return whether the persistence unit specifies a persistent type with the - * specified name (i.e. the type is listed either in the persistence unit's - * list of specified classes or in one of the persistent unit's mapping files). - */ - boolean specifiesPersistentType(String typeName); - - /** - * Return the persistence unit's entities. - */ - Iterable<Entity> getEntities(); - - /** - * Return the entity specified in the persistence unit with the - * specified name. Return null if there is no persistent type - * with the specified name or if the persistent type is not mapped as an - * entity. - * @see org.eclipse.jpt.jpa.core.MappingKeys#ENTITY_TYPE_MAPPING_KEY - */ - Entity getEntity(String typeName); - - /** - * Return the embeddable specified in the persistence unit with the - * specified name. Return null if there is no persistent type - * with the specified name or if the persistent type is not mapped as an - * embeddable. - * @see org.eclipse.jpt.jpa.core.MappingKeys#EMBEDDABLE_TYPE_MAPPING_KEY - */ - Embeddable getEmbeddable(String typeName); - - /** - * Return whether the text representation of this persistence unit contains - * the given text offset - */ - boolean containsOffset(int textOffset); - - // ********** validation ********** - - /** - * Return whether the persistence unit validates agains database metadata. - * (For instance, if the connection is not active, then it should not.) - */ - boolean validatesAgainstDatabase(); - - - // ********** refactoring ********** - - /** - * Create DeleteEdits for deleting any references to the deleted type. - * Return an EmptyIterable if there are not any references. - */ - Iterable<DeleteEdit> createDeleteTypeEdits(IType type); - - /** - * Create DeleteEdits for deleting any references to the deleted file - * Return an EmptyIterable if there are not any references. - */ - Iterable<DeleteEdit> createDeleteMappingFileEdits(IFile file); - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any references to the originalPackage to the newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - - /** - * Create ReplaceEdits for renaming any references to the originalFolder to the newName. - * The originalFolder has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenameFolderEdits(IFolder originalFolder, String newName); - - /** - * Create ReplaceEdits for renaming any references to the originalFile to the newName. - * Return an EmptyIterable if there are not any references. - * The originalFile has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameMappingFileEdits(IFile originalFile, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalFile to the destination. - * Return an EmptyIterable if there are not any references. - * The originalFile has not been moved yet. - */ - Iterable<ReplaceEdit> createMoveMappingFileEdits(IFile originalFile, IPath runtineDestination); - - /** - * Create ReplaceEdits for moving any references to the originalFolder to the runtimeDestination. - * The runtimeDestination already includes the original folder name. - */ - Iterable<ReplaceEdit> createMoveFolderEdits(IFolder originalFolder, IPath runtimeDestination); - - /** - * Return a location relative to the beginning of the persistence.xml for - * inserting a new mapping-file element. If there are existing mapping files, - * the location should be after those. If no existing mapping files then make - * sure the location does not violate the persistence.xml schema. - */ - int findInsertLocationForMappingFileRef(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java deleted file mode 100644 index a50723c10b..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitProperties.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.jdt.core.IPackageFragment; -import org.eclipse.jdt.core.IType; -import org.eclipse.jpt.common.utility.model.Model; -import org.eclipse.jpt.jpa.core.JpaProject; -import org.eclipse.text.edits.ReplaceEdit; - -/** - * 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.3 - */ -public interface PersistenceUnitProperties extends Model -{ - /** - * Method used for identifying the given property. - */ - boolean itemIsProperty(PersistenceUnit.Property item); - - /** - * Returns the property name used for change notification of the given property. - */ - String propertyIdOf(PersistenceUnit.Property property); - - /** - * Return the PersistenceUnit of this Properties. - */ - PersistenceUnit getPersistenceUnit(); - - /** - * Return the JPA project the PersistenceUnit belongs to. - */ - JpaProject getJpaProject(); - - /** - * A Property with the given name had its value changed - */ - void propertyValueChanged(String propertyName, String newValue); - - /** - * A Property with the given name was removed - */ - void propertyRemoved(String propertyName); - - - // ************ refactoring ************** - - /** - * Create ReplaceEdits for renaming any references to the originalType to the newName. - * The originalType has not yet been renamed, the newName is the new short name. - */ - Iterable<ReplaceEdit> createRenameTypeEdits(IType originalType, String newName); - - /** - * Create ReplaceEdits for moving any references to the originalType to the newPackage. - * The originalType has not yet been moved. - */ - Iterable<ReplaceEdit> createMoveTypeEdits(IType originalType, IPackageFragment newPackage); - - /** - * Create ReplaceEdits for renaming any reference to the originalPackage newName. - * The originalPackage has not yet been renamed. - */ - Iterable<ReplaceEdit> createRenamePackageEdits(IPackageFragment originalPackage, String newName); - -}
\ No newline at end of file diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java deleted file mode 100644 index c9478dc229..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnitTransactionType.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnitTransactionType; - -/** - * Context model corresponding to the XML resource model - * {@link XmlPersistenceUnitTransactionType}, - * which corresponds to the <code>transaction-type</code> element in the - * <code>persistence.xml</code> file. - * <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.0 - * @since 2.0 - */ -public enum PersistenceUnitTransactionType -{ - /** Corresponds to JTA transaction type */ - JTA, - - /** Corresponds to RESOURCE_LOCAL transaction type */ - RESOURCE_LOCAL; - - public static PersistenceUnitTransactionType fromXmlResourceModel(XmlPersistenceUnitTransactionType transactionType) { - if (transactionType == null) { - return null; - } - switch (transactionType) { - case JTA: - return JTA; - case RESOURCE_LOCAL: - return RESOURCE_LOCAL; - default: - throw new IllegalArgumentException("unknown transaction type: " + transactionType); //$NON-NLS-1$ - } - } - - public static XmlPersistenceUnitTransactionType toXmlResourceModel(PersistenceUnitTransactionType transactionType) { - if (transactionType == null) { - return null; - } - switch (transactionType) { - case JTA: - return XmlPersistenceUnitTransactionType.JTA; - case RESOURCE_LOCAL: - return XmlPersistenceUnitTransactionType.RESOURCE_LOCAL; - default: - throw new IllegalArgumentException("unknown transaction type: " + transactionType); //$NON-NLS-1$ - } - } -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java deleted file mode 100644 index ff1c034335..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXml.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.jpt.jpa.core.context.XmlFile; - -/** - * JPA <code>persistence.xml</code> file. - * <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.0 - */ -public interface PersistenceXml - extends XmlFile -{ - // ********** persistence ********** - - /** - * String constant associated with changes to the persistence property - */ - public final static String PERSISTENCE_PROPERTY = "persistence"; //$NON-NLS-1$ - - /** - * Return the content represented by the root of the <code>persistence.xml</code> file. - * This may be null. - */ - Persistence getPersistence(); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java deleted file mode 100644 index 1ff70d585a..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlContextNodeFactory.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 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.core.context.persistence; - -import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot; -import org.eclipse.jpt.jpa.core.context.java.JarFile; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlJarFileRef; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistenceUnit; -import org.eclipse.jpt.jpa.core.resource.persistence.XmlProperty; - -/** - * Interface used by persistence unit to gather up persistent types. - * <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 PersistenceXmlContextNodeFactory -{ - Persistence buildPersistence(PersistenceXml parent, XmlPersistence resourcePersistence); - - PersistenceUnit buildPersistenceUnit(Persistence parent, XmlPersistenceUnit resourcePersistenceUnit); - - /** - * Build a "specified" mapping file ref. - */ - MappingFileRef buildMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef); - - /** - * Build a "implied" mapping file ref. - */ - MappingFileRef buildImpliedMappingFileRef(PersistenceUnit parent); - - /** - * Build a "specified" class ref. - */ - ClassRef buildClassRef(PersistenceUnit parent, XmlJavaClassRef xmlClassRef); - - /** - * Build an "implied" class ref. - */ - ClassRef buildClassRef(PersistenceUnit parent, String className); - - JarFileRef buildJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef); - - JarFile buildJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot); - - PersistenceUnit.Property buildProperty(PersistenceUnit parent, XmlProperty property); - - PersistenceUnitProperties buildConnection(PersistenceUnit parent); - - PersistenceUnitProperties buildOptions(PersistenceUnit parent); - -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java deleted file mode 100644 index 218b88e434..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceXmlDefinition.java +++ /dev/null @@ -1,33 +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.core.context.persistence; - -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.jpt.jpa.core.ResourceDefinition; - -/** - * <code>persistence.xml</code> definition - * <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 PersistenceXmlDefinition - extends ResourceDefinition -{ - EFactory getResourceNodeFactory(); - - PersistenceXmlContextNodeFactory getContextNodeFactory(); -} diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java deleted file mode 100644 index 31c9d9c65c..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistentTypeContainer.java +++ /dev/null @@ -1,67 +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.core.context.persistence; - -import org.eclipse.jpt.common.utility.internal.Transformer; -import org.eclipse.jpt.jpa.core.context.PersistentType; - -/** - * Interface used by persistence unit to gather up persistent types. - * <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 PersistentTypeContainer { - - /** - * Return the container's persistent types. The returned list may contain - * multiple persistent types for the same Java class; e.g.<ul> - * <li>the same type is specified in both the <code>persistence.xml</code> and - * <code>orm.xml</code> files - * <Li>the same type is specified multiple times in the same - * <code>persistence.xml</code> or <code>orm.xml</code> file - * <li>the same type is in a jar file specified in the - * <code>persistence.xml</code> file and is specified in the - * <code>persistence.xml</code> file and/or an <code>orm.xml</code> file - * </ul> - */ - Iterable<? extends PersistentType> getPersistentTypes(); - - /** - * Return the persistent type with the specified name. - * Return <code>null</code> if the persistent type is not found. - * If the persistent unit has more than one persistent type with the - * specified name, return the first one found, using the following - * search order:<ul> - * <li>mapping files - * <li>classes - * <li>jar files - * </ul> - */ - PersistentType getPersistentType(String typeName); - - - Transformer<PersistentTypeContainer, Iterable<? extends PersistentType>> TRANSFORMER = - new Transformer<PersistentTypeContainer, Iterable<? extends PersistentType>>() { - public Iterable<? extends PersistentType> transform(PersistentTypeContainer container) { - return container.getPersistentTypes(); - } - @Override - public String toString() { - return "PersistentTypeContainer.TRANSFORMER"; //$NON-NLS-1$ - } - }; -} |