Dali Provisional API
Release 3.2

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

All Superinterfaces:
IAdaptable, JaxbContextNode, JaxbNode, JptResourceTypeReference, Model

public interface JaxbPersistentAttribute
extends JaxbContextNode

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

Nested Class Summary
static class JaxbPersistentAttribute.MappingTransformer
           
static class JaxbPersistentAttribute.NameTransformer
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
static String DEFAULT_MAPPING_KEY_PROPERTY
           
static String MAPPING_PROPERTY
           
static org.eclipse.jpt.common.utility.transformer.Transformer<JaxbPersistentAttribute,JaxbAttributeMapping> MAPPING_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<JaxbPersistentAttribute,String> NAME_TRANSFORMER
           
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
RESOURCE_TYPE_TRANSFORMER
 
Method Summary
 JaxbClassMapping getClassMapping()
           
 JavaResourceType getDeclaringJavaResourceType()
          Return the resource type where the source of the attribute is declared.
 String getDefaultMappingKey()
          Return the key for the attribute's default mapping.
 JavaResourceAttribute getJavaResourceAttribute()
           
 String getJavaResourceAttributeBaseTypeName()
          Return the type name of the java attribute, or the item type name of a collection or array.
 JaxbAttributeMapping getMapping()
          Return the attribute's mapping.
 String getMappingKey()
          Return the attribute's mapping key.
 String getName()
          Return the name of the attribute.
 boolean isFor(JavaResourceField resourceField)
           
 boolean isFor(JavaResourceMethod resourceGetter, JavaResourceMethod resourceSetter)
           
 boolean isInherited()
          Return true if the source of the attribute is defined in a superclass
 boolean isJavaResourceAttributeCollectionType()
          (See JAXB 2.2 Spec, sect. 5.5.2) Return true if the java attribute type is an extension of java.util.Collection or a single dimensional array (except for byte[], which is treated like a non-array)
 boolean isJavaResourceAttributeTypeSubTypeOf(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(String key)
          Set the attribute's mapping.
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.context.JaxbContextNode
getCompletionProposals, getContextRoot, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.JaxbNode
getJaxbProject, getParent, 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
 

Field Detail

NAME_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<JaxbPersistentAttribute,String> NAME_TRANSFORMER

MAPPING_PROPERTY

static final String MAPPING_PROPERTY
See Also:
Constant Field Values

MAPPING_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<JaxbPersistentAttribute,JaxbAttributeMapping> MAPPING_TRANSFORMER

DEFAULT_MAPPING_KEY_PROPERTY

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

getClassMapping

JaxbClassMapping getClassMapping()

getDeclaringJavaResourceType

JavaResourceType getDeclaringJavaResourceType()
Return the resource type where the source of the attribute is declared. This may not be where the attribute is fully defined, as it may be inherited


isInherited

boolean isInherited()
Return true if the source of the attribute is defined in a superclass


getName

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


getJavaResourceAttribute

JavaResourceAttribute getJavaResourceAttribute()

getJavaResourceAttributeBaseTypeName

String getJavaResourceAttributeBaseTypeName()
Return the type name of the java attribute, or the item type name of a collection or array.


isJavaResourceAttributeCollectionType

boolean isJavaResourceAttributeCollectionType()
(See JAXB 2.2 Spec, sect. 5.5.2) Return true if the java attribute type is an extension of java.util.Collection or a single dimensional array (except for byte[], which is treated like a non-array)


isJavaResourceAttributeTypeSubTypeOf

boolean isJavaResourceAttributeTypeSubTypeOf(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).


isFor

boolean isFor(JavaResourceField resourceField)

isFor

boolean isFor(JavaResourceMethod resourceGetter,
              JavaResourceMethod resourceSetter)

getMapping

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


getMappingKey

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


setMappingKey

JaxbAttributeMapping setMappingKey(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

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()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.