Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.context.java
Interface JavaPersistentAttribute

All Superinterfaces:
AccessHolder, IAdaptable, JavaElementReference, JpaContextNode, JpaNode, JpaStructureNode, JptResourceTypeReference, Model, PersistentAttribute, ReadOnlyAccessHolder, ReadOnlyPersistentAttribute

public interface JavaPersistentAttribute
extends PersistentAttribute, JavaElementReference

Context Java persistent attribute (field or property).

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 interface JavaPersistentAttribute.JpaContainerDefinition
          JPA container definition interface (and null implementation)
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute
ReadOnlyPersistentAttribute.MappingTransformer, ReadOnlyPersistentAttribute.NameEquals, ReadOnlyPersistentAttribute.NameTransformer
 
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
 
Field Summary
static String JPA_CONTAINER_DEFINITION
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute
DEFAULT_MAPPING_KEY_PROPERTY, MAPPING_PROPERTY, MAPPING_TRANSFORMER, NAME_PROPERTY, NAME_TRANSFORMER
 
Fields inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.AccessHolder
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
RESOURCE_TYPE_TRANSFORMER
 
Method Summary
 Accessor getAccessor()
          Return the accessor(field/property) for the attribute
 JavaPersistentAttribute.JpaContainerDefinition getJpaContainerDefinition()
          Return the JpaContainer that corresponds to this attribute's type.
 JavaAttributeMapping getMapping()
          Return the attribute's mapping.
 String getMultiReferenceMapKeyTypeName()
          If the attribute's type is a map type, return the type parameter that can be used as a key type.
 String getMultiReferenceTargetTypeName()
          If the attribute's type is an appropriate "container" type, return the type parameter that can be used as a target type.
 JavaResourceAttribute getResourceAttribute()
          Return the corresponding resource attribute.
 String getSingleReferenceTargetTypeName()
          Return the attribute's type name if it is valid as a target type (i.e. the type is neither an array nor a "container").
 boolean isFor(JavaResourceField resourceField)
           
 boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter)
           
 JavaAttributeMapping setMappingKey(String key)
          Set the attribute's mapping.
 boolean typeIsBasic()
          Return whether the attribute's type is valid for a default basic mapping.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute
getDefaultMappingKey, getJavaPersistentAttribute, getMappingKey, getName, getOwningPersistentType, getOwningTypeMapping, getPrimaryKeyColumnName, getTypeName, getTypeName, isVirtual
 
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.AccessHolder
getDefaultAccess, getSpecifiedAccess, setSpecifiedAccess
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyAccessHolder
getAccess
 
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.java.JavaElementReference
getJavaElement
 

Field Detail

JPA_CONTAINER_DEFINITION

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

getMapping

JavaAttributeMapping getMapping()
Description copied from interface: ReadOnlyPersistentAttribute
Return the attribute's mapping. This is never null (although, it may be a null mapping). Set the mapping via PersistentAttribute.setMappingKey(String).

Specified by:
getMapping in interface ReadOnlyPersistentAttribute

setMappingKey

JavaAttributeMapping setMappingKey(String key)
Description copied from interface: PersistentAttribute
Set the attribute's mapping. If the specified key is null, clear the specified mapping, allowing the attribute's mapping to default (if appropriate). Return the new mapping (which may be a null mapping).

Specified by:
setMappingKey in interface PersistentAttribute

getAccessor

Accessor getAccessor()
Return the accessor(field/property) for the attribute


getResourceAttribute

JavaResourceAttribute getResourceAttribute()
Return the corresponding resource attribute. This is the attribute (field/method) that is annotated.

See Also:
Accessor.getResourceAttribute()

isFor

boolean isFor(JavaResourceField resourceField)
See Also:
Accessor.isFor(JavaResourceField)

isFor

boolean isFor(JavaResourceMethod resourceGetter,
              JavaResourceMethod resourceSetter)
See Also:
Accessor.isFor(JavaResourceMethod, JavaResourceMethod)

typeIsBasic

boolean typeIsBasic()
Return whether the attribute's type is valid for a default basic mapping.


getSingleReferenceTargetTypeName

String getSingleReferenceTargetTypeName()
Return the attribute's type name if it is valid as a target type (i.e. the type is neither an array nor a "container").


getMultiReferenceTargetTypeName

String getMultiReferenceTargetTypeName()
If the attribute's type is an appropriate "container" type, return the type parameter that can be used as a target type. Return null if the attribute is not a container or if the type parameter is not valid as a target type (i.e. it is either an array or a "container").


getMultiReferenceMapKeyTypeName

String getMultiReferenceMapKeyTypeName()
If the attribute's type is a map type, return the type parameter that can be used as a key type. Return null if the attribute is not a map or if the type parameter is not valid as a key type (i.e. it is either an array or a "container").


getJpaContainerDefinition

JavaPersistentAttribute.JpaContainerDefinition getJpaContainerDefinition()
Return the JpaContainer that corresponds to this attribute's type. Return a null implementation if the type is not a container (map or collection)


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.