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

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model, ReadOnlyRelationshipStrategy
All Known Subinterfaces:
JavaJoinColumnRelationshipStrategy, JavaJoinTableRelationshipStrategy, JavaMappedByRelationshipStrategy, JavaPrimaryKeyJoinColumnRelationshipStrategy, JavaRelationshipStrategy, JoinColumnRelationshipStrategy, JoinTableRelationshipStrategy, MappedByRelationshipStrategy, OrmJoinColumnRelationshipStrategy, OrmJoinTableRelationshipStrategy, OrmMappedByRelationshipStrategy, OrmPrimaryKeyJoinColumnRelationshipStrategy, OrmRelationshipStrategy, PrimaryKeyJoinColumnRelationshipStrategy

public interface RelationshipStrategy
extends ReadOnlyRelationshipStrategy

Strategy describing how two entities are joined, either for a RelationshipMapping or an AssociationOverride:

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, AssociationOverride, Relationship

Method Summary
 void addStrategy()
          Add this strategy to the relationship.
 java.lang.String getColumnTableNotValidDescription()
          Return a message description used when the column's table is not valid in this context.
 Relationship getRelationship()
          Return the strategy's relationship.
 boolean isOverridable()
          Return whether the relationship's mapping can be overridden with an association override.
 void removeStrategy()
          Remove this strategy from the relationship.
 Table resolveDbTable(java.lang.String tableName)
          Return the database table for the specified table name.
 boolean tableNameIsInvalid(java.lang.String tableName)
          Return whether the specified table cannot be explicitly specified in the column's table element.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy
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
 

Method Detail

getRelationship

Relationship getRelationship()
Description copied from interface: ReadOnlyRelationshipStrategy
Return the strategy's relationship.

Specified by:
getRelationship in interface ReadOnlyRelationshipStrategy

addStrategy

void addStrategy()
Add this strategy to the relationship.


removeStrategy

void removeStrategy()
Remove this strategy from the relationship.


isOverridable

boolean isOverridable()
Return whether the relationship's mapping can be overridden with an association override.


resolveDbTable

Table resolveDbTable(java.lang.String tableName)
Return the database table for the specified table name.


tableNameIsInvalid

boolean tableNameIsInvalid(java.lang.String tableName)
Return whether the specified table cannot be explicitly specified in the column's table element.


getColumnTableNotValidDescription

java.lang.String getColumnTableNotValidDescription()
Return a message description used when the column's table is not valid in this context. This will be passed in as a parameter to a validation message. Here is an example where the description is what is returned by the implementation:

location: Table "table name" for map key column "column name"

description: does not match join table