Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 96833ee6cc87b871a37c1eade0ab7b1e40befaf7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*******************************************************************************
 * 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.core.internal.jpa1.context.orm;

import java.util.ListIterator;
import org.eclipse.jpt.core.context.JoinColumn;
import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
import org.eclipse.jpt.core.context.RelationshipMapping;
import org.eclipse.jpt.core.context.TypeMapping;
import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.jpt.db.Table;

public class NullOrmJoinColumnJoiningStrategy 
	extends AbstractOrmXmlContextNode
	implements OrmJoinColumnJoiningStrategy
{
	
	protected NullOrmJoinColumnJoiningStrategy(JoinColumnEnabledRelationshipReference parent) {
		super(parent);
	}
	
	public void initializeFrom(JoinColumnJoiningStrategy oldStrategy) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public JoinColumnEnabledRelationshipReference getParent() {
		return (JoinColumnEnabledRelationshipReference) super.getParent();
	}
	
	public JoinColumnEnabledRelationshipReference getRelationshipReference() {
		return this.getParent();
	}
	
	public RelationshipMapping getRelationshipMapping() {
		return this.getRelationshipReference().getRelationshipMapping();
	}
	
	public void addStrategy() {
		throw new UnsupportedOperationException();
	}
	
	public void removeStrategy() {
		//do nothing, no join column to remove
	}
	
	public boolean isTargetForeignKeyRelationship() {
		return false;
	}

	public TypeMapping getRelationshipTarget() {
		return null;
	}

	// **************** join columns *******************************************
	
	public ListIterator<OrmJoinColumn> joinColumns() {
		throw new UnsupportedOperationException();
	}
	
	public int joinColumnsSize() {
		throw new UnsupportedOperationException();
	}
	
	
	// **************** default join column ************************************
	
	public OrmJoinColumn getDefaultJoinColumn() {
		throw new UnsupportedOperationException();
	}

	// **************** specified join columns *********************************
	
	public ListIterator<OrmJoinColumn> specifiedJoinColumns() {
		throw new UnsupportedOperationException();
	}

	public int specifiedJoinColumnsSize() {
		throw new UnsupportedOperationException();
	}

	public boolean hasSpecifiedJoinColumns() {
		return false;
	}

	public OrmJoinColumn addSpecifiedJoinColumn(int index) {
		throw new UnsupportedOperationException();
	}

	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
		throw new UnsupportedOperationException();
	}
	
	public void removeSpecifiedJoinColumn(int index) {
		throw new UnsupportedOperationException();
	}
	
	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
		throw new UnsupportedOperationException();
	}
	
	// **************** resource => context ************************************
	
	public void update() {
		//no-op
	}

	public TextRange getValidationTextRange() {
		throw new UnsupportedOperationException();
	}

	public String getColumnTableNotValidDescription() {
		throw new UnsupportedOperationException();
	}

	public Table getDbTable(String tableName) {
		throw new UnsupportedOperationException();
	}

	public Table getReferencedColumnDbTable() {
		throw new UnsupportedOperationException();
	}

	public String getTableName() {
		return null;
	}

	public boolean isOverridableAssociation() {
		return false;
	}

	public boolean tableNameIsInvalid(String tableName) {
		throw new UnsupportedOperationException();
	}

	public TypeMapping getRelationshipSource() {
		return getRelationshipMapping().getTypeMapping();
	}
}

Back to the top