Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2015-12-23 13:47:38 -0500
committerBrian Vosburgh2015-12-23 13:47:38 -0500
commitdb7d35dca519d8298ad632f457b0c360585ed324 (patch)
tree0cbd4931af0a11a14e04837311ab28177a6cf72a
parent3ea0495ff9b5ed893092c410f727421b9e530622 (diff)
downloadwebtools.dali-db7d35dca519d8298ad632f457b0c360585ed324.tar.gz
webtools.dali-db7d35dca519d8298ad632f457b0c360585ed324.tar.xz
webtools.dali-db7d35dca519d8298ad632f457b0c360585ed324.zip
add SpecifiedOrmPersistentType.getDefaultDefaultAccess()
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
index fc5021d0eb..5119619372 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
@@ -231,25 +231,23 @@ public abstract class SpecifiedOrmPersistentType
protected AccessType buildDefaultAccess() {
if ( ! this.mapping.isMetadataComplete()) {
- if (this.getJavaPersistentType() != null) {
- if (this.javaPersistentTypeHasSpecifiedAccess()) {
- return this.getJavaPersistentType().getAccess();
+ JavaPersistentType jpt = this.getJavaPersistentType();
+ if (jpt != null) {
+ if (((jpt.getSpecifiedAccess() != null) || jpt.hasAnyAnnotatedAttributes())) {
+ return jpt.getAccess();
}
}
- if (getSuperPersistentType() != null) {
- return getSuperPersistentType().getAccess();
+ PersistentType superPT = this.getSuperPersistentType();
+ if (superPT != null) {
+ return superPT.getAccess();
}
}
AccessType access = this.getMappingFileRoot().getAccess();
- return (access != null) ? access : AccessType.FIELD; // default to FIELD if no specified access found
+ return (access != null) ? access : this.getDefaultDefaultAccess();
}
- /**
- * pre-condition: {@link #getJavaPersistentType()} is not <code>null</code>
- */
- protected boolean javaPersistentTypeHasSpecifiedAccess() {
- return (this.getJavaPersistentType().getSpecifiedAccess() != null) ||
- this.getJavaPersistentType().hasAnyAnnotatedAttributes();
+ protected AccessType getDefaultDefaultAccess() {
+ return AccessType.FIELD; // default to FIELD if no specified access found
}

Back to the top