|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JavaResourcePersistentMember
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.
Field Summary | |
---|---|
static java.lang.String |
ANNOTATIONS_COLLECTION
|
static java.lang.String |
MAPPING_ANNOTATIONS_COLLECTION
|
static java.lang.String |
PERSISTABLE_PROPERTY
|
Method Summary | ||
---|---|---|
JavaResourceNode |
addAnnotation(int index,
java.lang.String nestableAnnotationName,
java.lang.String containerAnnotationName)
Add a new NestableAnnotation named nestableAnnotationName. |
|
JavaResourceNode |
addAnnotation(java.lang.String annotationName)
Add an annotation for the given fully qualified annotation name |
|
|
annotations()
Return all JavaResource s that correspond to annotations in the source code. |
|
|
annotations(java.lang.String nestableAnnotationName,
java.lang.String containerAnnotationName)
Given a nestable and container annotation name return the specified JavaResource s. |
|
int |
annotationsSize()
|
|
JavaResourceNode |
getAnnotation(java.lang.String annotationName)
Returns the JavaResource with this fully qualifed annotation name. |
|
JavaResourceNode |
getMappingAnnotation()
Return the JavaResource specified on this JavaPersistentResource
In the case of multiples the first one will be returned as defined by the order of
org.eclipse.jpt.core.internal.platform.GenericJpaPlatform#typeMappingAnnotationDefinitions() or
org.eclipse.jpt.core.internal.platform.GenericJpaPlatform#attributeMappingAnnotationDefinitions() |
|
JavaResourceNode |
getMappingAnnotation(java.lang.String annotationName)
Returns the JavaResource with this fully qualifed annotation name. |
|
TextRange |
getNameTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
return the text range for the name of the persistent resource |
|
JavaResourceNode |
getNonNullAnnotation(java.lang.String annotationName)
Returns the JavaResource with this fully qualifed annotation name. |
|
JavaResourceNode |
getNullMappingAnnotation(java.lang.String annotationName)
Return a null implementation of JavaResourceNode with this fully qualifed annotation name. |
|
boolean |
isFor(MethodSignature methodSignature,
int occurrence)
Return whether the Java resource persistent member is for the specified method. |
|
boolean |
isFor(java.lang.String memberName,
int occurrence)
Return whether the Java resource persistent member is for the specified member. |
|
boolean |
isPersistable()
Return whether the underlying JDT member is persistable according to the JPA spec |
|
boolean |
isPersisted()
Return whether the underlying JDT member is currently annotated as being persistent (equivalent to "is mapped") |
|
|
mappingAnnotations()
Return all JavaResource s that correspond to type
mapping annotations specified in the source code. |
|
int |
mappingAnnotationsSize()
|
|
void |
move(int targetIndex,
int sourceIndex,
java.lang.String containerAnnotationName)
Move nestableAnnotation found in the containerAnnotation from the specified source index to the specified target index. |
|
void |
removeAnnotation(int index,
java.lang.String nestableAnnotationName,
java.lang.String containerAnnotationName)
|
|
void |
removeAnnotation(java.lang.String annotationName)
|
|
void |
resolveTypes(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Resolve type information that could be dependent on other files being added/removed |
|
void |
setMappingAnnotation(java.lang.String annotationName)
Use this to change the type mapping annotation. |
Methods inherited from interface org.eclipse.jpt.core.resource.java.JavaResourceNode |
---|
getJpaCompilationUnit, getResourceModel, getTextRange, initialize, updateFromJava |
Field Detail |
---|
static final java.lang.String MAPPING_ANNOTATIONS_COLLECTION
static final java.lang.String ANNOTATIONS_COLLECTION
static final java.lang.String PERSISTABLE_PROPERTY
Method Detail |
---|
<T extends JavaResourceNode> java.util.Iterator<T> mappingAnnotations()
JavaResource
s that correspond to type
mapping annotations specified in the source code. In JPA these could be
Entity, MappedSuperclass, Embeddable.
Does not return duplicate annotations as this error is handled by the java compiler.
int mappingAnnotationsSize()
JavaResourceNode getMappingAnnotation()
JavaResource
specified on this JavaPersistentResource
In the case of multiples the first one will be returned as defined by the order of
org.eclipse.jpt.core.internal.platform.GenericJpaPlatform#typeMappingAnnotationDefinitions()
or
org.eclipse.jpt.core.internal.platform.GenericJpaPlatform#attributeMappingAnnotationDefinitions()
JavaResourceNode getMappingAnnotation(java.lang.String annotationName)
JavaResource
with this fully qualifed annotation name.
In JPA the valid annotations are "javax.persistence.Embedddable", "javax.persistence.Entity",
and "javax.persistence.MappedSuperclass"
Return the first if there are duplicates in the source code
annotationName
- - fully qualified annotation namevoid setMappingAnnotation(java.lang.String annotationName)
annotationName
- - fully qualified annotation name<T extends JavaResourceNode> java.util.Iterator<T> annotations()
JavaResource
s that correspond to annotations in the source code.
Does not return duplicate annotations as this error is handled by the java compiler.
No MappingAnnotation
s should be included.
mappingAnnotations()
int annotationsSize()
<T extends JavaResourceNode> java.util.ListIterator<T> annotations(java.lang.String nestableAnnotationName, java.lang.String containerAnnotationName)
JavaResource
s.
If both the nestable and container annotations are specified on the Type, then only
return the nestable annotations specified within the container annotation. This is
only going to return JavaResources that match the nestableAnnotationName
JavaResourceNode getAnnotation(java.lang.String annotationName)
JavaResource
with this fully qualifed annotation name.
Return the first if there are duplicates in the source code.
JavaResourceNode getNonNullAnnotation(java.lang.String annotationName)
JavaResource
with this fully qualifed annotation name.
Return the first if there are duplicates in the source code. Will not return null,
but a null Object instead if no annotation with this name exists in the java source.
JavaResourceNode getNullMappingAnnotation(java.lang.String annotationName)
JavaResourceNode
with this fully qualifed annotation name.
The corresponding AnnotationDefinition needs to implement buildNullAnnotation()
AnnotationDefinition#buildNullAnnotation(JavaResourcePersistentMember, org.eclipse.jpt.core.internal.jdtutility.Member)
JavaResourceNode addAnnotation(java.lang.String annotationName)
void removeAnnotation(java.lang.String annotationName)
JavaResourceNode addAnnotation(int index, java.lang.String nestableAnnotationName, java.lang.String containerAnnotationName)
void removeAnnotation(int index, java.lang.String nestableAnnotationName, java.lang.String containerAnnotationName)
void move(int targetIndex, int sourceIndex, java.lang.String containerAnnotationName)
boolean isPersistable()
boolean isPersisted()
boolean isFor(java.lang.String memberName, int occurrence)
boolean isFor(MethodSignature methodSignature, int occurrence)
TextRange getNameTextRange(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
void resolveTypes(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |