Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.context.persistence
Interface ClassRef

All Superinterfaces:
DeleteTypeRefactoringParticipant, IAdaptable, JpaContextNode, JpaNode, JpaStructureNode, JptResourceTypeReference, Model, PersistentType.Owner, TypeRefactoringParticipant

public interface ClassRef
extends JpaStructureNode, PersistentType.Owner, DeleteTypeRefactoringParticipant, TypeRefactoringParticipant

Context model corresponding to the XML resource model XmlJavaClassRef, which corresponds to the class element in the persistence.xml file. This is also used for "implied" class refs; i.e. class refs that are not explicitly listed in the persistence.xml file.

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
static class ClassRef.JavaManagedTypeTransformer
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
JpaStructureNode.ContextType
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.DeleteTypeRefactoringParticipant
DeleteTypeRefactoringParticipant.DeleteTypeEditsTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.TypeRefactoringParticipant
TypeRefactoringParticipant.MoveTypeEditsTransformer, TypeRefactoringParticipant.RenamePackageEditsTransformer, TypeRefactoringParticipant.RenameTypeEditsTransformer
 
Field Summary
static String CLASS_NAME_PROPERTY
          String constant associated with changes to the class name
static String JAVA_MANAGED_TYPE_PROPERTY
          String constant associated with changes to the java managed type
static org.eclipse.jpt.common.utility.transformer.Transformer<ClassRef,JavaManagedType> JAVA_MANAGED_TYPE_TRANSFORMER
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
RESOURCE_TYPE_TRANSFORMER
 
Method Summary
 String getClassName()
          Return the class name of the class ref.
 JavaManagedType getJavaManagedType()
          Return the JavaManagedType that corresponds to this ClassRef.
 JavaPersistentType getJavaPersistentType()
          Convenience method for returning the JavaManagedType if it is a JavaPersistentType.
 JavaResourceAbstractType getJavaResourceType()
          Return the corresponding JavaResourceAbstractType, null if the name does not resolve to a class.
 org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef getXmlClassRef()
          Return the class ref's corresponding resource class ref.
 boolean isFor(String typeName)
          Return whether the class ref is a reference to the specified type.
 boolean isVirtual()
          Return true if the mapping file ref is virtual; return false if the mapping file ref is represented by an entry in the persistence.xml file.
 void setClassName(String className)
          Set the class name of the class ref.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
containsOffset, gatherRootStructureNodes, getChildren, getChildrenSize, getContextType, getFullTextRange, getSelectionTextRange, getStructureNode, getType
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.PersistentType.Owner
getDefaultPersistentTypeAccess, getOverridePersistentTypeAccess
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
getJpaPlatform, getJpaProject, getJpaProjectManager, getResource, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
getResourceType
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.DeleteTypeRefactoringParticipant
createDeleteTypeEdits
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.TypeRefactoringParticipant
createMoveTypeEdits, createRenamePackageEdits, createRenameTypeEdits
 

Field Detail

CLASS_NAME_PROPERTY

static final String CLASS_NAME_PROPERTY
String constant associated with changes to the class name

See Also:
Constant Field Values

JAVA_MANAGED_TYPE_PROPERTY

static final String JAVA_MANAGED_TYPE_PROPERTY
String constant associated with changes to the java managed type

See Also:
Constant Field Values

JAVA_MANAGED_TYPE_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<ClassRef,JavaManagedType> JAVA_MANAGED_TYPE_TRANSFORMER
Method Detail

isFor

boolean isFor(String typeName)
Return whether the class ref is a reference to the specified type.


isVirtual

boolean isVirtual()
Return true if the mapping file ref is virtual; return false if the mapping file ref is represented by an entry in the persistence.xml file.


getXmlClassRef

org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef getXmlClassRef()
Return the class ref's corresponding resource class ref. This is null for implied class refs.


getClassName

String getClassName()
Return the class name of the class ref.


setClassName

void setClassName(String className)
Set the class name of the class ref.


getJavaResourceType

JavaResourceAbstractType getJavaResourceType()
Return the corresponding JavaResourceAbstractType, null if the name does not resolve to a class.


getJavaManagedType

JavaManagedType getJavaManagedType()
Return the JavaManagedType that corresponds to this ClassRef. This can be null. This is not settable by users of this API.


getJavaPersistentType

JavaPersistentType getJavaPersistentType()
Convenience method for returning the JavaManagedType if it is a JavaPersistentType. It will return null if the JavaManagedType is null or is not a JavaPersistentType.

See Also:
getJavaManagedType(), ManagedType#getContextType()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.