1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jdo.impl.model.jdo;
18
19 import org.apache.jdo.model.java.JavaType;
20 import org.apache.jdo.model.jdo.JDOReference;
21
22 /***
23 * An instance of this class represents the JDO relationship metadata
24 * of a reference relationship field.
25 *
26 * @author Michael Bouschen
27 */
28 public class JDOReferenceImplDynamic extends JDORelationshipImpl
29 implements JDOReference
30 {
31
32 /***
33 * Determines whether this JDORelationship represents a reference
34 * relationship or not. A return of <code>true</code> means this
35 * JDORelationship is a JDOReference instance.
36 * @return <code>true</code> if this JDORelationship represents a
37 * reference relationship; <code>false</code> otherwise.
38 */
39 public boolean isJDOReference() {
40 return true;
41 }
42
43
44
45 /***
46 * Get the type representation of the relationship. This will be
47 * the JavaType for references, the element type for collections
48 * and arrays, and the value type for maps.
49 * @return the relationship type
50 */
51 public JavaType getRelatedJavaType() {
52 return getDeclaringField().getType();
53 }
54
55 }