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

All Superinterfaces:
JavaResourceAnnotatedElement, JavaResourceNode, JavaResourcePersistentMember, Model
All Known Subinterfaces:
JavaResourcePersistentType2_0

public interface JavaResourcePersistentType
extends JavaResourcePersistentMember

Java source code or binary persistent type.

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
Version:
3.0

Nested Class Summary
static class JavaResourcePersistentType.Tools
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourceNode
JavaResourceNode.Root
 
Field Summary
static java.lang.String ABSTRACT_PROPERTY
           
static java.lang.String DECLARING_TYPE_NAME_PROPERTY
           
static java.lang.String FIELDS_COLLECTION
           
static java.lang.String MEMBER_TYPE_PROPERTY
           
static java.lang.String METHODS_COLLECTION
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String NO_ARG_CONSTRUCTOR_PROPERTY
           
static java.lang.String PACKAGE_NAME_PROPERTY
           
static java.lang.String PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY
           
static java.lang.String QUALIFIED_NAME_PROPERTY
           
static java.lang.String STATIC_PROPERTY
           
static java.lang.String SUPERCLASS_QUALIFIED_NAME_PROPERTY
           
static java.lang.String TYPES_COLLECTION
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentMember
FINAL_PROPERTY, PERSISTABLE_MEMBER_FILTER, PERSISTABLE_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourceAnnotatedElement
ANNOTATIONS_COLLECTION
 
Method Summary
 java.util.Iterator<JavaResourcePersistentType> allTypes()
          Return all the types; the type itself, its children, its grandchildren, etc.
 java.util.Iterator<JavaResourcePersistentAttribute> fields()
          Return the type's fields.
 java.lang.String getDeclaringTypeName()
          Return the name of the type's "declaring type".
 java.lang.String getName()
          Return the unqualified (short) type name.
 java.lang.String getPackageName()
          Return the package name.
 java.lang.String getQualifiedName()
          Return the fully qualified type name.
 java.lang.String getSuperclassQualifiedName()
          Return the fully qualified name of the type's superclass.
 boolean hasAnyAnnotatedAttributes()
          Return whether the type has any attributes that have JPA annotations on them (which can be used to infer the type's access type).
 boolean hasNoArgConstructor()
          Return whether the type has a no-arg constructor (private, protected, or public)
 boolean hasPrivateNoArgConstructor()
          Return whether the type has a private no-arg constructor
 boolean isAbstract()
          Return whether the type is abstract.
 boolean isIn(org.eclipse.jdt.core.IPackageFragment packageFragment)
           
 boolean isMapped()
          Return whether the type is annotated with any annotations that determine whether and how the type is persisted
 boolean isMemberType()
          Return whether the type is a member type.
 boolean isStatic()
          Return whether the type is static.
 java.util.Iterator<JavaResourcePersistentAttribute> methods()
          Return the type's methods.
 java.util.Iterator<JavaResourcePersistentAttribute> persistableAttributes()
          Return the type's persistable fields and properties.
 java.util.Iterator<JavaResourcePersistentAttribute> persistableAttributes(AccessType specifiedAccess)
          Return the persistable properties and/or fields given the non-null specified access type
 java.util.Iterator<JavaResourcePersistentAttribute> persistableFields()
          Return the type's persistable fields.
 java.util.Iterator<JavaResourcePersistentAttribute> persistableFieldsWithSpecifiedFieldAccess()
          A convenience method that returns the persistableFields that also have the Access annotation with a value of FIELD
 java.util.Iterator<JavaResourcePersistentAttribute> persistableProperties()
          Return the type's persistable properties.
 java.util.Iterator<JavaResourcePersistentAttribute> persistablePropertiesWithSpecifiedPropertyAccess()
          A convenience method that returns the persistableProperties that also have the Access annotation with a value of PROPERTY
 java.util.Iterator<JavaResourcePersistentType> persistableTypes()
          Return the immediately nested persistable types.
 java.util.Iterator<JavaResourcePersistentType> types()
          Return the immediately nested types (children).
 
Methods inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentMember
isFinal, isFor, isPersistable, resolveTypes, setPrimaryAnnotation
 
Methods inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourceAnnotatedElement
addAnnotation, addAnnotation, addStandAloneAnnotation, annotations, annotations, annotationsSize, getAnnotation, getNameTextRange, getNonNullAnnotation, isAnnotated, moveAnnotation, removeAnnotation, removeAnnotation
 
Methods inherited from interface org.eclipse.jpt.jpa.core.resource.java.JavaResourceNode
getFile, getJavaResourceCompilationUnit, getParent, getRoot, getTextRange, initialize, synchronizeWith
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 

Field Detail

NAME_PROPERTY

static final java.lang.String NAME_PROPERTY
See Also:
Constant Field Values

QUALIFIED_NAME_PROPERTY

static final java.lang.String QUALIFIED_NAME_PROPERTY
See Also:
Constant Field Values

PACKAGE_NAME_PROPERTY

static final java.lang.String PACKAGE_NAME_PROPERTY
See Also:
Constant Field Values

SUPERCLASS_QUALIFIED_NAME_PROPERTY

static final java.lang.String SUPERCLASS_QUALIFIED_NAME_PROPERTY
See Also:
Constant Field Values

DECLARING_TYPE_NAME_PROPERTY

static final java.lang.String DECLARING_TYPE_NAME_PROPERTY
See Also:
Constant Field Values

ABSTRACT_PROPERTY

static final java.lang.String ABSTRACT_PROPERTY
See Also:
Constant Field Values

MEMBER_TYPE_PROPERTY

static final java.lang.String MEMBER_TYPE_PROPERTY
See Also:
Constant Field Values

STATIC_PROPERTY

static final java.lang.String STATIC_PROPERTY
See Also:
Constant Field Values

NO_ARG_CONSTRUCTOR_PROPERTY

static final java.lang.String NO_ARG_CONSTRUCTOR_PROPERTY
See Also:
Constant Field Values

PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY

static final java.lang.String PRIVATE_NO_ARG_CONSTRUCTOR_PROPERTY
See Also:
Constant Field Values

TYPES_COLLECTION

static final java.lang.String TYPES_COLLECTION
See Also:
Constant Field Values

FIELDS_COLLECTION

static final java.lang.String FIELDS_COLLECTION
See Also:
Constant Field Values

METHODS_COLLECTION

static final java.lang.String METHODS_COLLECTION
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Return the unqualified (short) type name.


getQualifiedName

java.lang.String getQualifiedName()
Return the fully qualified type name.


getPackageName

java.lang.String getPackageName()
Return the package name.


getSuperclassQualifiedName

java.lang.String getSuperclassQualifiedName()
Return the fully qualified name of the type's superclass.


getDeclaringTypeName

java.lang.String getDeclaringTypeName()
Return the name of the type's "declaring type". Return null if the type is a top-level type.


isAbstract

boolean isAbstract()
Return whether the type is abstract.


isMemberType

boolean isMemberType()
Return whether the type is a member type.


isStatic

boolean isStatic()
Return whether the type is static.


hasNoArgConstructor

boolean hasNoArgConstructor()
Return whether the type has a no-arg constructor (private, protected, or public)


hasPrivateNoArgConstructor

boolean hasPrivateNoArgConstructor()
Return whether the type has a private no-arg constructor


isMapped

boolean isMapped()
Return whether the type is annotated with any annotations that determine whether and how the type is persisted


hasAnyAnnotatedAttributes

boolean hasAnyAnnotatedAttributes()
Return whether the type has any attributes that have JPA annotations on them (which can be used to infer the type's access type).


isIn

boolean isIn(org.eclipse.jdt.core.IPackageFragment packageFragment)

types

java.util.Iterator<JavaResourcePersistentType> types()
Return the immediately nested types (children).


allTypes

java.util.Iterator<JavaResourcePersistentType> allTypes()
Return all the types; the type itself, its children, its grandchildren, etc.


persistableTypes

java.util.Iterator<JavaResourcePersistentType> persistableTypes()
Return the immediately nested persistable types.


fields

java.util.Iterator<JavaResourcePersistentAttribute> fields()
Return the type's fields.


persistableFields

java.util.Iterator<JavaResourcePersistentAttribute> persistableFields()
Return the type's persistable fields.


persistableFieldsWithSpecifiedFieldAccess

java.util.Iterator<JavaResourcePersistentAttribute> persistableFieldsWithSpecifiedFieldAccess()
A convenience method that returns the persistableFields that also have the Access annotation with a value of FIELD


methods

java.util.Iterator<JavaResourcePersistentAttribute> methods()
Return the type's methods. This returns *all* methods from the JDT Type


persistableProperties

java.util.Iterator<JavaResourcePersistentAttribute> persistableProperties()
Return the type's persistable properties. This returns only the getter methods that match the JavaBeans criteria for JPA, hence the name properties instead of methods


persistablePropertiesWithSpecifiedPropertyAccess

java.util.Iterator<JavaResourcePersistentAttribute> persistablePropertiesWithSpecifiedPropertyAccess()
A convenience method that returns the persistableProperties that also have the Access annotation with a value of PROPERTY


persistableAttributes

java.util.Iterator<JavaResourcePersistentAttribute> persistableAttributes()
Return the type's persistable fields and properties.


persistableAttributes

java.util.Iterator<JavaResourcePersistentAttribute> persistableAttributes(AccessType specifiedAccess)
Return the persistable properties and/or fields given the non-null specified access type