org.eclipse.jpt.core.context
Interface RelationshipReference

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model
All Known Subinterfaces:
AssociationOverrideRelationshipReference, AssociationOverrideRelationshipReference2_0, EclipseLinkOneToManyRelationshipReference, EclipseLinkOneToManyRelationshipReference2_0, JavaAssociationOverrideRelationshipReference, JavaAssociationOverrideRelationshipReference2_0, JavaJoinColumnEnabledRelationshipReference, JavaJoinTableEnabledRelationshipReference, JavaManyToManyRelationshipReference, JavaManyToOneRelationshipReference, JavaManyToOneRelationshipReference2_0, JavaOneToManyRelationshipReference, JavaOneToManyRelationshipReference2_0, JavaOneToOneRelationshipReference, JavaOneToOneRelationshipReference2_0, JavaOwnableRelationshipReference, JavaPrimaryKeyJoinColumnEnabledRelationshipReference, JavaRelationshipReference, JoinColumnEnabledRelationshipReference, JoinTableEnabledRelationshipReference, ManyToManyRelationshipReference, ManyToOneRelationshipReference, ManyToOneRelationshipReference2_0, OneToManyRelationshipReference, OneToManyRelationshipReference2_0, OneToOneRelationshipReference, OneToOneRelationshipReference2_0, OrmAssociationOverrideRelationshipReference, OrmAssociationOverrideRelationshipReference2_0, OrmJoinColumnEnabledRelationshipReference, OrmJoinTableEnabledRelationshipReference, OrmManyToManyRelationshipReference, OrmManyToOneRelationshipReference, OrmManyToOneRelationshipReference2_0, OrmOneToManyRelationshipReference, OrmOneToManyRelationshipReference2_0, OrmOneToOneRelationshipReference, OrmOneToOneRelationshipReference2_0, OrmOwnableRelationshipReference, OrmPrimaryKeyJoinColumnEnabledRelationshipReference, OrmRelationshipReference, OwnableRelationshipReference, PrimaryKeyJoinColumnEnabledRelationshipReference

public interface RelationshipReference
extends JpaContextNode

A RelationshipReference represents the meta-information required to populate the entities involved in a RelationshipMapping. This might includes join table information, join column information, and/or "mappedBy" information, to name a few.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.2
Version:
2.3
See Also:
RelationshipMapping

Field Summary
static java.lang.String PREDOMINANT_JOINING_STRATEGY_PROPERTY
          String associated with changes to the predominant strategy property
 
Method Summary
 Entity getEntity()
          Return the entity that owns the relationship mapping.
 JoiningStrategy getPredominantJoiningStrategy()
          Return the predominant joining strategy, this should not be null
 RelationshipMapping getRelationshipMapping()
           
 TypeMapping getTypeMapping()
          Return the TypeMapping that owns this relationship reference
 boolean isOverridableAssociation()
          Return whether the mapping can be overridden with an association override
 boolean isOwnedBy(RelationshipMapping mapping)
          Returns whether the given mapping is the owning side of a relationship with this relationship reference
 boolean isParentVirtual()
          Return whether the parent of this relationship reference is virtual
 boolean isRelationshipOwner()
          Return whether this is the owning side of the relationship.
 boolean isTargetForeignKeyRelationship()
          Return whether this relationship is a target foreign key relationship.
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.IResourcePart
getResource
 

Field Detail

PREDOMINANT_JOINING_STRATEGY_PROPERTY

static final java.lang.String PREDOMINANT_JOINING_STRATEGY_PROPERTY
String associated with changes to the predominant strategy property

See Also:
Constant Field Values
Method Detail

getRelationshipMapping

RelationshipMapping getRelationshipMapping()

getTypeMapping

TypeMapping getTypeMapping()
Return the TypeMapping that owns this relationship reference


getEntity

Entity getEntity()
Return the entity that owns the relationship mapping. This is just a convenience method that calls getTypeMapping() and returns null if it is not an Entity


isRelationshipOwner

boolean isRelationshipOwner()
Return whether this is the owning side of the relationship.

See Also:
RelationshipMapping#isRelationshipOwner()}

isOwnedBy

boolean isOwnedBy(RelationshipMapping mapping)
Returns whether the given mapping is the owning side of a relationship with this relationship reference


getPredominantJoiningStrategy

JoiningStrategy getPredominantJoiningStrategy()
Return the predominant joining strategy, this should not be null


isOverridableAssociation

boolean isOverridableAssociation()
Return whether the mapping can be overridden with an association override


isParentVirtual

boolean isParentVirtual()
Return whether the parent of this relationship reference is virtual

Returns:

isTargetForeignKeyRelationship

boolean isTargetForeignKeyRelationship()
Return whether this relationship is a target foreign key relationship. A one-to-many mapping with a join column will have the foreign key in the target table.