Dali Provisional API
Release 3.2

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

All Superinterfaces:
DeleteTypeRefactoringParticipant, IAdaptable, JpaContextModel, JpaModel, JpaStructureNode, JptResourceTypeReference, Model, TypeRefactoringParticipant

public interface ClassRef
extends JpaStructureNode, 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.jpa.core.JpaModel
JpaModel.JpaVersionIsCompatibleWith
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeIsKindOf, 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
STRUCTURE_CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
TRANSFORMER
 
Method Summary
 String getClassName()
          Return the class name of the class ref.
 JavaManagedType getJavaManagedType()
          Return the ref's Java managed type.
 JavaPersistentType getJavaPersistentType()
          Convenience method for returning the Java managed type if it is a Java persistent type.
 JavaResourceAbstractType getJavaResourceType()
          Return the corresponding JavaResourceAbstractType, null if the name does not resolve to a class.
 Class<ClassRef> getStructureType()
          Return the structure node's type.
 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
addRootStructureNodesTo, containsOffset, getContextType, getFullTextRange, getSelectionTextRange, getStructureChildren, getStructureChildrenSize, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextModel
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel
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

getStructureType

Class<ClassRef> getStructureType()
Description copied from interface: JpaStructureNode
Return the structure node's type. This is used to find the appropriate UI provider for building the structure node's JPA Details page.

Specified by:
getStructureType in interface JpaStructureNode

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 ref's Java managed type. This can be null. This is not settable by clients of this API.


getJavaPersistentType

JavaPersistentType getJavaPersistentType()
Convenience method for returning the Java managed type if it is a Java persistent type. Return null if the Java managed type is null or is not a Java persistent type.

See Also:
ManagedType.getManagedTypeType()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.