org.eclipse.jpt.core.context
Interface JoinColumnJoiningStrategy

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JoiningStrategy, JpaContextNode, JpaNode, Model
All Known Subinterfaces:
JavaJoinColumnInAssociationOverrideJoiningStrategy, JavaJoinColumnJoiningStrategy, OrmJoinColumnInAssociationOverrideJoiningStrategy, OrmJoinColumnJoiningStrategy

public interface JoinColumnJoiningStrategy
extends JoiningStrategy

Joining strategy that uses join columns

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}, JoinColumnEnabledRelationshipReference}

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
 JoinColumn addSpecifiedJoinColumn(int index)
          Add a specified join column to the join table return the object representing it.
 JoinColumn getDefaultJoinColumn()
          Return the default join column or null.
 TypeMapping getRelationshipSource()
          The source of the relationship will usually be the owning type mapping.
 TypeMapping getRelationshipTarget()
          The target of the relationship will usually be the target entity.
 boolean hasSpecifiedJoinColumns()
          Return whether this has any specified join columns.
 void initializeFrom(JoinColumnJoiningStrategy oldStrategy)
           
 boolean isTargetForeignKeyRelationship()
          Return whether this relationship is a target foreign key relationship.
<T extends JoinColumn>
java.util.ListIterator<T>
joinColumns()
          Return a list iterator of the join columns whether specified or default.
 int joinColumnsSize()
          Return the number of join columns, both specified and default.
 void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex)
          Move the specified join column from the source index to the target index.
 void removeSpecifiedJoinColumn(int index)
          Remove the specified join column from the join table.
 void removeSpecifiedJoinColumn(JoinColumn joinColumn)
          Remove the specified join column at the index from the join table.
<T extends JoinColumn>
java.util.ListIterator<T>
specifiedJoinColumns()
          Return a list iterator of the specified join columns.
 int specifiedJoinColumnsSize()
          Return the number of specified join columns.
 
Methods inherited from interface org.eclipse.jpt.core.context.JoiningStrategy
addStrategy, getColumnTableNotValidDescription, getDbTable, getRelationshipReference, getTableName, isOverridableAssociation, removeStrategy, tableNameIsInvalid
 
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

DEFAULT_JOIN_COLUMN_PROPERTY

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

See Also:
Constant Field Values

SPECIFIED_JOIN_COLUMNS_LIST

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

See Also:
Constant Field Values
Method Detail

initializeFrom

void initializeFrom(JoinColumnJoiningStrategy oldStrategy)

getRelationshipSource

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

See Also:
isTargetForeignKeyRelationship()

getRelationshipTarget

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

See Also:
isTargetForeignKeyRelationship()

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.


joinColumns

<T extends JoinColumn> java.util.ListIterator<T> joinColumns()
Return a list iterator of the join columns whether specified or default. This will not be null.


joinColumnsSize

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


getDefaultJoinColumn

JoinColumn getDefaultJoinColumn()
Return the default join column or null. If there are specified join columns, then there will be no default join column (though there are times that there may be no default join column even if there are no specified join columns.)


specifiedJoinColumns

<T extends JoinColumn> java.util.ListIterator<T> specifiedJoinColumns()
Return a list iterator of the specified join columns. This will not be null.


specifiedJoinColumnsSize

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


hasSpecifiedJoinColumns

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


addSpecifiedJoinColumn

JoinColumn addSpecifiedJoinColumn(int index)
Add a specified join column to the join table return the object representing it.


removeSpecifiedJoinColumn

void removeSpecifiedJoinColumn(int index)
Remove the specified join column from the join table.


removeSpecifiedJoinColumn

void removeSpecifiedJoinColumn(JoinColumn joinColumn)
Remove the specified join column at the index from the join table.


moveSpecifiedJoinColumn

void moveSpecifiedJoinColumn(int targetIndex,
                             int sourceIndex)
Move the specified join column from the source index to the target index.