Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.gen/src/org/eclipse/jpt/gen/internal/old/ManyToOneRelation.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.gen/src/org/eclipse/jpt/gen/internal/old/ManyToOneRelation.java81
1 files changed, 0 insertions, 81 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.gen/src/org/eclipse/jpt/gen/internal/old/ManyToOneRelation.java b/jpa/plugins/org.eclipse.jpt.gen/src/org/eclipse/jpt/gen/internal/old/ManyToOneRelation.java
deleted file mode 100644
index 577fb8528b..0000000000
--- a/jpa/plugins/org.eclipse.jpt.gen/src/org/eclipse/jpt/gen/internal/old/ManyToOneRelation.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.gen.internal.old;
-
-import org.eclipse.jpt.db.ForeignKey;
-import org.eclipse.jpt.utility.internal.StringTools;
-
-/**
- * This object is held by the "base" gen table and, indirectly via a
- * one-to-many relation, the "referenced" gen table.
- * The "mapped by" attribute (field/property) name is set while the
- * "base" table is calculating its attribute names.
- */
-class ManyToOneRelation {
- private final GenTable baseGenTable; // the "many" side (e.g. Detail)
- private final ForeignKey foreignKey;
- private final GenTable referencedGenTable; // the "one" side (e.g. Master)
- private String mappedBy; // set while generating entities; used by partner one-to-many relation
-
-
- ManyToOneRelation(
- GenTable baseGenTable,
- ForeignKey foreignKey,
- GenTable referencedGenTable
- ) {
- super();
- this.baseGenTable = baseGenTable;
- this.foreignKey = foreignKey;
- this.referencedGenTable = referencedGenTable;
- referencedGenTable.addOneToManyRelation(new OneToManyRelation(this));
- }
-
- GenTable getBaseGenTable() {
- return this.baseGenTable;
- }
-
- ForeignKey getForeignKey() {
- return this.foreignKey;
- }
-
- GenTable getReferencedGenTable() {
- return this.referencedGenTable;
- }
-
- String getAttributeName() {
- return this.foreignKey.getAttributeName();
- }
-
- String getMappedBy() {
- return this.mappedBy;
- }
-
- void setMappedBy(String mappedBy) {
- this.mappedBy = mappedBy;
- }
-
- String getBaseEntityName() {
- return this.baseGenTable.getEntityName();
- }
-
- String getReferencedEntityName() {
- return this.referencedGenTable.getEntityName();
- }
-
- String getBaseGenTableCollectionAttributeName() {
- return this.baseGenTable.getCollectionAttributeName();
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.foreignKey);
- }
-
-}

Back to the top