diff options
author | nhauge | 2011-01-24 04:30:24 +0000 |
---|---|---|
committer | nhauge | 2011-01-24 04:30:24 +0000 |
commit | 4dbcfb8dd419f7403527217e736dfde7aad98242 (patch) | |
tree | 84143b887068fa2571aa2c0d21fab5dccc0e2942 /jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence | |
parent | e317361c4dff07d6371b3bf35c07d2b636cc9544 (diff) | |
download | webtools.dali-4dbcfb8dd419f7403527217e736dfde7aad98242.tar.gz webtools.dali-4dbcfb8dd419f7403527217e736dfde7aad98242.tar.xz webtools.dali-4dbcfb8dd419f7403527217e736dfde7aad98242.zip |
[332673] Added validation for duplicate entities. Patch from Nan.
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java index 68d2a805a5..72a2e32148 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java @@ -11,6 +11,7 @@ package org.eclipse.jpt.core.context.persistence; import java.util.Iterator; import java.util.ListIterator; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.runtime.IPath; @@ -729,6 +730,36 @@ public interface PersistenceUnit */ boolean containsOffset(int textOffset); + /** + * Return all the entities defined in both the implied and specified mapping files + * of a persistence unit + */ + Iterable<Entity> getOrmEntities(); + + /** + * Return the entity names of all the entities defined in both the implied and specified mapping files + * of a persistence unit + */ + Iterator<String> ormEntityNames(); + + /** + * Return all the entities defined with both the implied and specified Java classes + * of a persistence unit + */ + Iterable<Entity> getJavaEntities(); + + /** + * Return the entity names of all the entities defined with both the implied and specified Java classes + * of a persistence unit + */ + Iterator<String> javaEntityNames(); + + /** + * Return the entity names of entities only defined with mapped Java classes of a persistence unit. + * The names of Java entities overridden by entities defined in the mapping files are excluded. + */ + Iterator<String> javaEntityNamesExclOverridden(); + // ********** validation ********** @@ -738,7 +769,7 @@ public interface PersistenceUnit */ boolean validatesAgainstDatabase(); - + // ********** refactoring ********** /** @@ -804,4 +835,5 @@ public interface PersistenceUnit * sure the location does not violate the persistence.xml schema. */ int findInsertLocationForMappingFileRef(); + } |