Dali Provisional API
Release 3.2

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

All Superinterfaces:
IAdaptable, JaxbContextNode, JaxbNode, JptResourceTypeReference, Model
All Known Subinterfaces:
JavaPersistentAttribute, OxmJavaAttribute

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.ResourceTypeIsKindOf, JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
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
TRANSFORMER
 
Method Summary
 JaxbClassMapping getClassMapping()
           
 TypeName getDeclaringTypeName()
          Return the name of the type where the source of the attribute is declared.
 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 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
Method Detail

getClassMapping

JaxbClassMapping getClassMapping()

isInherited

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


getDeclaringTypeName

TypeName getDeclaringTypeName()
Return the name of the type where the source of the attribute is declared. This may not be where the attribute is fully defined, as it may be inherited


getName

String getName()
Return the name of the attribute.


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


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


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.