org.eclipse.jpt.jaxb.core.context
Interface JaxbPersistentAttribute

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JavaContextNode, JaxbContextNode, JaxbNode, Model
All Known Subinterfaces:
JaxbPersistentField, JaxbPersistentProperty

public interface JaxbPersistentAttribute
extends JavaContextNode

Represents a JAXB attribute (field/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:
3.0
Version:
3.0

Field Summary
static java.lang.String DEFAULT_MAPPING_KEY_PROPERTY
           
static java.lang.String MAPPING_PROPERTY
           
 
Method Summary
 java.lang.String getDefaultMappingKey()
          Return the key for the attribute's default mapping.
 java.lang.String getInheritedJavaResourceAttributeOwningTypeName()
          Only ask this of inherited persistent attributes.
 JavaResourceAttribute getJavaResourceAttribute()
           
 java.lang.String getJavaResourceAttributeTypeName()
          Return the type name of the java resource attribute This might not return the same thing as getJavaResourceAttribute().getTypeName().
 JaxbAttributeMapping getMapping()
          Return the attribute's mapping.
 java.lang.String getMappingKey()
          Return the attribute's mapping key.
 java.lang.String getName()
          Return the name of the attribute.
 JaxbPersistentClass getParent()
          Return the JAXB node's parent.
 boolean isFor(JavaResourceField resourceField)
           
 boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter)
           
 boolean isInherited()
          Return true if this JaxbPersistentAttribute is inherited from one of the superclasses of the parent JaxbPersistentClass.
 boolean isJavaResourceAttributeTypeArray()
          Return whether the java resource attribute type is an array This might not return the same thing as getJavaResourceAttribute().typeIsArray().
 boolean isJavaResourceAttributeTypeSubTypeOf(java.lang.String typeName)
          Return whether the java resource attribute type is a subtype of the given type This might not return the same thing as getJavaResourceAttribute().typeIsSubTypeOf(String).
 JaxbAttributeMapping setMappingKey(java.lang.String key)
          Set the attribute's mapping.
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.context.java.JavaContextNode
getJavaCompletionProposals, getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.context.JaxbContextNode
getContextRoot, getResourceType, synchronizeWithResourceModel, update
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.JaxbNode
getJaxbProject, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.IResourcePart
getResource
 

Field Detail

MAPPING_PROPERTY

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

DEFAULT_MAPPING_KEY_PROPERTY

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

getParent

JaxbPersistentClass getParent()
Description copied from interface: JaxbNode
Return the JAXB node's parent. The JAXB project will not have a parent.

Specified by:
getParent in interface JaxbNode

isInherited

boolean isInherited()
Return true if this JaxbPersistentAttribute is inherited from one of the superclasses of the parent JaxbPersistentClass.


getInheritedJavaResourceAttributeOwningTypeName

java.lang.String getInheritedJavaResourceAttributeOwningTypeName()
Only ask this of inherited persistent attributes. Returns the simple type name of the attribute's resource type.

See Also:
isInherited()

getName

java.lang.String getName()
Return the name of the attribute. This will not change, a new JaxbPersistentAttribute will be built if the name changes.


isFor

boolean isFor(JavaResourceField resourceField)

isFor

boolean isFor(JavaResourceMethod resourceGetter,
              JavaResourceMethod resourceSetter)

getJavaResourceAttribute

JavaResourceAttribute getJavaResourceAttribute()

getJavaResourceAttributeTypeName

java.lang.String getJavaResourceAttributeTypeName()
Return the type name of the java resource attribute This might not return the same thing as getJavaResourceAttribute().getTypeName().


isJavaResourceAttributeTypeArray

boolean isJavaResourceAttributeTypeArray()
Return whether the java resource attribute type is an array This might not return the same thing as getJavaResourceAttribute().typeIsArray().


isJavaResourceAttributeTypeSubTypeOf

boolean isJavaResourceAttributeTypeSubTypeOf(java.lang.String typeName)
Return whether the java resource attribute type is a subtype of the given type This might not return the same thing as getJavaResourceAttribute().typeIsSubTypeOf(String).


getMapping

JaxbAttributeMapping getMapping()
Return the attribute's mapping. This is never null (although, it may be a null mapping). Set the mapping via PersistentAttribute#setMappingKey(String).


getMappingKey

java.lang.String getMappingKey()
Return the attribute's mapping key.


setMappingKey

JaxbAttributeMapping setMappingKey(java.lang.String key)
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).


getDefaultMappingKey

java.lang.String getDefaultMappingKey()
Return the key for the attribute's default mapping. This can be null (e.g. for specified orm.xml attributes).

See Also:
JaxbAttributeMapping.isDefault()