Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.resource.java
Interface RelationshipMappingAnnotation

All Superinterfaces:
Annotation, JavaResourceNode, Model
All Known Subinterfaces:
ManyToMany2_0Annotation, ManyToManyAnnotation, ManyToOne2_0Annotation, ManyToOneAnnotation, OneToMany2_0Annotation, OneToManyAnnotation, OneToOne2_0Annotation, OneToOneAnnotation, OwnableRelationshipMappingAnnotation, RelationshipMapping2_0Annotation, SingleRelationshipMappingAnnotation

public interface RelationshipMappingAnnotation
extends Annotation

Common protocol among the following relationship mappings:

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.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceNode
JavaResourceNode.FileTransformer, JavaResourceNode.Root
 
Field Summary
static String CASCADE_ALL_PROPERTY
           
static String CASCADE_MERGE_PROPERTY
           
static String CASCADE_PERSIST_PROPERTY
           
static String CASCADE_REFRESH_PROPERTY
           
static String CASCADE_REMOVE_PROPERTY
           
static String FETCH_PROPERTY
           
static String TARGET_ENTITY_PROPERTY
           
 
Fields inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceNode
FILE_TRANSFORMER
 
Method Summary
 TextRange getCascadeTextRange()
          Return the TextRange for the 'cascade' element.
 FetchType getFetch()
          Corresponds to the 'fetch' element of the relationship mapping annotations.
 TextRange getFetchTextRange()
          Return the TextRange for the 'fetch' element.
 String getFullyQualifiedTargetEntityClassName()
          Return the fully-qualified target entity class name as resolved by the AST's bindings.
 String getTargetEntity()
          Corresponds to the 'targetEntity' element of the relationship mapping annotations.
 TextRange getTargetEntityTextRange()
          Return the TextRange for the 'targetEntity' element.
 boolean isCascadeAll()
          Corresponds to the 'cascade' element of the relationship annotations.
 boolean isCascadeMerge()
          Corresponds to the 'cascade' element of the relationship annotations.
 boolean isCascadePersist()
          Corresponds to the 'cascade' element of the relationship annotations.
 boolean isCascadeRefresh()
          Corresponds to the 'cascade' element of the relationship annotations.
 boolean isCascadeRemove()
          Corresponds to the 'cascade' element of the relationship annotations.
 void setCascadeAll(boolean all)
          Corresponds to the 'cascade' element of the relationship annotations.
 void setCascadeMerge(boolean merge)
          Corresponds to the 'cascade' element of the relationship annotations.
 void setCascadePersist(boolean persist)
          Corresponds to the 'cascade' element of the relationship annotations.
 void setCascadeRefresh(boolean refresh)
          Corresponds to the 'cascade' element of the relationship annotations.
 void setCascadeRemove(boolean remove)
          Corresponds to the 'cascade' element of the relationship annotations.
 void setFetch(FetchType fetch)
          Corresponds to the 'fetch' element of the relationship annotations.
 void setTargetEntity(String targetEntity)
          Corresponds to the 'targetEntity' element of the relationship mapping annotations.
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.Annotation
getAnnotationName, getAstAnnotation, initialize, initialize, isUnset, newAnnotation, removeAnnotation, synchronizeWith, synchronizeWith
 
Methods inherited from interface org.eclipse.jpt.common.core.resource.java.JavaResourceNode
getFile, getJavaResourceCompilationUnit, getParent, getRoot, getTextRange
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 

Field Detail

TARGET_ENTITY_PROPERTY

static final String TARGET_ENTITY_PROPERTY
See Also:
Constant Field Values

FETCH_PROPERTY

static final String FETCH_PROPERTY
See Also:
Constant Field Values

CASCADE_ALL_PROPERTY

static final String CASCADE_ALL_PROPERTY
See Also:
Constant Field Values

CASCADE_MERGE_PROPERTY

static final String CASCADE_MERGE_PROPERTY
See Also:
Constant Field Values

CASCADE_PERSIST_PROPERTY

static final String CASCADE_PERSIST_PROPERTY
See Also:
Constant Field Values

CASCADE_REFRESH_PROPERTY

static final String CASCADE_REFRESH_PROPERTY
See Also:
Constant Field Values

CASCADE_REMOVE_PROPERTY

static final String CASCADE_REMOVE_PROPERTY
See Also:
Constant Field Values
Method Detail

getTargetEntity

String getTargetEntity()
Corresponds to the 'targetEntity' element of the relationship mapping annotations. Return null if the element does not exist in Java. Return the portion of the value preceding ".class".
     @ManyToMany(targetEntity=Employee.class)
 
will return "Employee"


setTargetEntity

void setTargetEntity(String targetEntity)
Corresponds to the 'targetEntity' element of the relationship mapping annotations. Set to null to remove the element.


getTargetEntityTextRange

TextRange getTargetEntityTextRange()
Return the TextRange for the 'targetEntity' element. If the element does not exist return the TextRange for the relationship mapping annotation.


getFullyQualifiedTargetEntityClassName

String getFullyQualifiedTargetEntityClassName()
Return the fully-qualified target entity class name as resolved by the AST's bindings.
     @ManyToMany(targetEntity=Employee.class)
 
will return "model.Employee" if there is an import for model.Employee.


getFetch

FetchType getFetch()
Corresponds to the 'fetch' element of the relationship mapping annotations. Return null if the element does not exist in Java.


setFetch

void setFetch(FetchType fetch)
Corresponds to the 'fetch' element of the relationship annotations. Set to null to remove the element.


getFetchTextRange

TextRange getFetchTextRange()
Return the TextRange for the 'fetch' element. If the element does not exist return the TextRange for the relationship mapping annotation.


isCascadeAll

boolean isCascadeAll()
Corresponds to the 'cascade' element of the relationship annotations.


setCascadeAll

void setCascadeAll(boolean all)
Corresponds to the 'cascade' element of the relationship annotations.


isCascadeMerge

boolean isCascadeMerge()
Corresponds to the 'cascade' element of the relationship annotations.


setCascadeMerge

void setCascadeMerge(boolean merge)
Corresponds to the 'cascade' element of the relationship annotations.


isCascadePersist

boolean isCascadePersist()
Corresponds to the 'cascade' element of the relationship annotations.


setCascadePersist

void setCascadePersist(boolean persist)
Corresponds to the 'cascade' element of the relationship annotations.


isCascadeRefresh

boolean isCascadeRefresh()
Corresponds to the 'cascade' element of the relationship annotations.


setCascadeRefresh

void setCascadeRefresh(boolean refresh)
Corresponds to the 'cascade' element of the relationship annotations.


isCascadeRemove

boolean isCascadeRemove()
Corresponds to the 'cascade' element of the relationship annotations.


setCascadeRemove

void setCascadeRemove(boolean remove)
Corresponds to the 'cascade' element of the relationship annotations.


getCascadeTextRange

TextRange getCascadeTextRange()
Return the TextRange for the 'cascade' element. If the element does not exist return the TextRange for the relationship mapping annotation.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.