org.eclipse.jpt.jpa.core.context
Interface ReadOnlyJoinColumnRelationshipStrategy

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model, ReadOnlyRelationshipStrategy
All Known Subinterfaces:
JavaJoinColumnRelationshipStrategy, JavaVirtualJoinColumnRelationshipStrategy, JoinColumnRelationshipStrategy, OrmJoinColumnRelationshipStrategy, OrmVirtualJoinColumnRelationshipStrategy, VirtualJoinColumnRelationshipStrategy

public interface ReadOnlyJoinColumnRelationshipStrategy
extends ReadOnlyRelationshipStrategy

Read-only join column relationship strategy.

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.

See Also:
ReadOnlyAssociationOverride, JoinColumnRelationship

Field Summary
static java.lang.String DEFAULT_JOIN_COLUMN_PROPERTY
          Change notification identifier for "defaultJoinColumn" property
static java.lang.String SPECIFIED_JOIN_COLUMNS_LIST
          Change notification identifier for "specifiedJoinColumns" list
 
Method Summary
 ReadOnlyJoinColumn getDefaultJoinColumn()
          Return the default join column.
 TypeMapping getRelationshipSource()
          The source of the relationship is usually the owning type mapping.
 TypeMapping getRelationshipTarget()
          The target of the relationship usually is the target entity.
 ReadOnlyJoinColumn getSpecifiedJoinColumn(int index)
          Return the specified join column at the specified index.
 boolean hasSpecifiedJoinColumns()
          Return whether the strategy has any specified join columns.
 boolean isTargetForeignKey()
          Return whether this relationship is a target foreign key relationship.
 java.util.ListIterator<? extends ReadOnlyJoinColumn> joinColumns()
          Return the join columns whether specified or default.
 int joinColumnsSize()
          Return the number of join columns, whether specified and default.
 java.util.ListIterator<? extends ReadOnlyJoinColumn> specifiedJoinColumns()
          Return the specified join columns.
 int specifiedJoinColumnsSize()
          Return the number of specified join columns.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy
getRelationship, getTableName
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, synchronizeWithResourceModel, update
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
getJpaProject, getParent, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.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.common.core.IResourcePart
getResource
 

Field Detail

SPECIFIED_JOIN_COLUMNS_LIST

static final java.lang.String SPECIFIED_JOIN_COLUMNS_LIST
Change notification identifier for "specifiedJoinColumns" list

See Also:
Constant Field Values

DEFAULT_JOIN_COLUMN_PROPERTY

static final java.lang.String DEFAULT_JOIN_COLUMN_PROPERTY
Change notification identifier for "defaultJoinColumn" property

See Also:
Constant Field Values
Method Detail

getRelationshipSource

TypeMapping getRelationshipSource()
The source of the relationship is usually the owning type mapping. In the case of a target foreign key relationship the source and target are swapped.

See Also:
isTargetForeignKey()

getRelationshipTarget

TypeMapping getRelationshipTarget()
The target of the relationship usually is the target entity. In the case of a target foreign key relationship the source and target are swapped.

See Also:
isTargetForeignKey()

isTargetForeignKey

boolean isTargetForeignKey()
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.


joinColumns

java.util.ListIterator<? extends ReadOnlyJoinColumn> joinColumns()
Return the join columns whether specified or default.


joinColumnsSize

int joinColumnsSize()
Return the number of join columns, whether specified and default.


specifiedJoinColumns

java.util.ListIterator<? extends ReadOnlyJoinColumn> specifiedJoinColumns()
Return the specified join columns.


specifiedJoinColumnsSize

int specifiedJoinColumnsSize()
Return the number of specified join columns.


hasSpecifiedJoinColumns

boolean hasSpecifiedJoinColumns()
Return whether the strategy has any specified join columns. (Equivalent to specifiedJoinColumnsSize() != 0.)


getSpecifiedJoinColumn

ReadOnlyJoinColumn getSpecifiedJoinColumn(int index)
Return the specified join column at the specified index.


getDefaultJoinColumn

ReadOnlyJoinColumn getDefaultJoinColumn()
Return the default join column. If there are specified join columns, there is no default join column. There are also times that there may be no default join column even if there are no specified join columns.