Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java36
1 files changed, 35 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java
index db31260644..d35870a2f0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOneToManyRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2016 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -33,6 +33,10 @@ public class GenericOrmOneToManyRelationship
extends AbstractOrmMappingRelationship<OrmOneToManyMapping>
implements OrmOneToManyRelationship2_0
{
+ protected boolean strategyIsMappedBy;
+ protected boolean strategyIsJoinTable;
+ protected boolean strategyIsJoinColumn;
+
protected final OrmSpecifiedMappedByRelationshipStrategy mappedByStrategy;
protected final OrmSpecifiedJoinTableRelationshipStrategy joinTableStrategy;
@@ -68,6 +72,9 @@ public class GenericOrmOneToManyRelationship
@Override
public void update(IProgressMonitor monitor) {
super.update(monitor);
+ this.setStrategyIsMappedBy(this.buildStrategyIsMappedBy());
+ this.setStrategyIsJoinTable(this.buildStrategyIsJoinTable());
+ this.setStrategyIsJoinColumn(this.buildStrategyIsJoinColumn());
this.mappedByStrategy.update(monitor);
this.joinColumnStrategy.update(monitor);
this.joinTableStrategy.update(monitor);
@@ -97,6 +104,15 @@ public class GenericOrmOneToManyRelationship
}
public boolean strategyIsMappedBy() {
+ return this.strategyIsMappedBy;
+ }
+
+ protected void setStrategyIsMappedBy(boolean strategyIsMappedBy) {
+ boolean old = this.strategyIsMappedBy;
+ this.firePropertyChanged(STRATEGY_IS_MAPPED_BY_PROPERTY, old, this.strategyIsMappedBy = strategyIsMappedBy);
+ }
+
+ protected boolean buildStrategyIsMappedBy() {
return this.strategy == this.mappedByStrategy;
}
@@ -130,6 +146,15 @@ public class GenericOrmOneToManyRelationship
}
public boolean strategyIsJoinTable() {
+ return this.strategyIsJoinTable;
+ }
+
+ protected void setStrategyIsJoinTable(boolean strategyIsJoinTable) {
+ boolean old = this.strategyIsJoinTable;
+ this.firePropertyChanged(STRATEGY_IS_JOIN_TABLE_PROPERTY, old, this.strategyIsJoinTable = strategyIsJoinTable);
+ }
+
+ protected boolean buildStrategyIsJoinTable() {
return this.strategy == this.joinTableStrategy;
}
@@ -157,6 +182,15 @@ public class GenericOrmOneToManyRelationship
}
public boolean strategyIsJoinColumn() {
+ return this.strategyIsJoinColumn;
+ }
+
+ protected void setStrategyIsJoinColumn(boolean strategyIsJoinColumn) {
+ boolean old = this.strategyIsJoinColumn;
+ this.firePropertyChanged(STRATEGY_IS_JOIN_COLUMN_PROPERTY, old, this.strategyIsJoinColumn = strategyIsJoinColumn);
+ }
+
+ protected boolean buildStrategyIsJoinColumn() {
return this.strategy == this.joinColumnStrategy;
}

Back to the top