EclipseLink 2.0.0, build 'v20091127-r5931' API Reference

org.eclipse.persistence.jaxb.compiler
Class Property

java.lang.Object
  extended by org.eclipse.persistence.jaxb.compiler.Property
Direct Known Subclasses:
ChoiceProperty, ReferenceProperty

public class Property
extends java.lang.Object

INTERNAL:

Purpose:To store information about a property on a class during JAXB 2.0 Generation

Responsibilities:

This class is used to store information about a property on a JAXB 2.0 annotated class. It is created by the AnnotationsProcessor during pre-processing and stored on a TypeInfo object

See Also:
TypeInfo, AnnotationsProcessor
Author:
mmacivor

Field Summary
static java.lang.String DEFAULT_KEY_NAME
           
static java.lang.String DEFAULT_VALUE_NAME
           
 
Constructor Summary
Property()
           
Property(Helper helper)
           
 
Method Summary
 JavaClass getActualType()
          Return the generic type if it was set (collection or array item type) otherwise return the type of this property
 java.lang.String getDefaultValue()
           
 java.lang.String getDomHandlerClassName()
          Return the DomHandler class name.
 JavaHasAnnotations getElement()
           
 JavaClass getGenericType()
           
 java.lang.String getGetMethodName()
           
 JavaClass getInverseReferencePropertyContainerClass()
           
 java.lang.String getInverseReferencePropertyGetMethodName()
           
 java.lang.String getInverseReferencePropertyName()
           
 java.lang.String getInverseReferencePropertySetMethodName()
           
 JavaClass getKeyType()
           
 java.lang.String getMimeType()
           
 JavaClass getOriginalType()
          Get the original type of the property.
 java.lang.String getPropertyName()
           
 javax.xml.namespace.QName getSchemaName()
           
 javax.xml.namespace.QName getSchemaType()
           
 java.lang.String getSetMethodName()
           
 JavaClass getType()
           
 JavaClass getValueType()
           
 XmlElementWrapper getXmlElementWrapper()
          Return the XmlElementWrapper set on this property.
 XmlJavaTypeAdapter getXmlJavaTypeAdapter()
          Return the xmlJavaTypeAdapter set on this Property.
 boolean isAny()
          Returns indicator for XmlAnyElement
 boolean isAnyAttribute()
           
 boolean isAttribute()
           
 boolean isChoice()
           
 boolean isCollectionType(JavaClass type)
           
 boolean isInverseReference()
           
 boolean isLax()
          Used with XmlAnyElement.
 boolean isMap()
           
 boolean isMethodProperty()
           
 boolean isMixedContent()
           
 boolean isMtomAttachment()
           
 boolean isNillable()
           
 boolean isReference()
           
 boolean isRequired()
           
 boolean isSetDefaultValue()
           
 boolean isSetXmlElementWrapper()
          Indicates if an XmlElementWrapper has been set, i.e. the xmlElementWrapper property is non-null.
 boolean isSetXmlJavaTypeAdapter()
          Indicates if an XmlJavaTypeAdapter has been set, i.e. the xmlJavaTypeAdapter property is non-null.
 boolean isSwaAttachmentRef()
           
 boolean isTransient()
           
 boolean isXmlElementType()
           
 boolean isXmlId()
          Indicates if this property is an ID field.
 boolean isXmlIdRef()
          Indicates if this property is a reference to an ID field.
 boolean isXmlList()
          Indicates if this property is an XmlList.
 boolean isXmlValue()
          Indicates if this property is an XmlValue.
 void setAdapterClass(JavaClass adapterCls)
           
 void setDefaultValue(java.lang.String defaultValue)
           
 void setDomHandlerClassName(java.lang.String domHandlerClassName)
          Set the DomHandler class name.
 void setElement(JavaHasAnnotations element)
           
 void setGenericType(JavaClass genericType)
           
 void setGetMethodName(java.lang.String methodName)
           
 void setHasXmlElementType(boolean hasXmlElementType)
           
 void setHelper(Helper helper)
           
 void setInverseReference(boolean isInverseReference)
           
 void setInverseReferencePropertyContainerClass(JavaClass cls)
           
 void setInverseReferencePropertyGetMethodName(java.lang.String methodName)
           
 void setInverseReferencePropertyName(java.lang.String name)
           
 void setInverseReferencePropertySetMethodName(java.lang.String methodName)
           
 void setIsAny(boolean isAnyElement)
          Set indicator for XmlAnyElement.
 void setIsAnyAttribute(boolean anyAtribute)
           
 void setIsAttribute(boolean attribute)
           
 void setIsMap(boolean isMap)
           
 void setIsMtomAttachment(boolean b)
           
 void setIsRequired(boolean b)
           
 void setIsSwaAttachmentRef(boolean b)
           
 void setIsXmlId(boolean isXmlId)
          Sets the indicator that identifies this property as an ID field.
 void setIsXmlIdRef(boolean isXmlIdRef)
          Sets the indicator that identifies this property as a reference to an ID field.
 void setIsXmlList(boolean isXmlList)
          Set the isXmlList property.
 void setIsXmlValue(boolean isXmlValue)
          Set the isXmlValue property.
 void setKeyType(JavaClass keyType)
           
 void setLax(boolean b)
          Used with XmlAnyElement.
 void setMethodProperty(boolean isMethod)
           
 void setMimeType(java.lang.String mType)
           
 void setMixedContent(boolean b)
           
 void setNillable(boolean isNillable)
           
 void setOriginalType(JavaClass type)
          Set the original type of the property.
 void setPropertyName(java.lang.String propertyName)
           
 void setSchemaName(javax.xml.namespace.QName schemaName)
           
 void setSchemaType(javax.xml.namespace.QName type)
           
 void setSetMethodName(java.lang.String methodName)
           
 void setTransient(boolean isTransient)
           
 void setType(JavaClass cls)
           
 void setValueType(JavaClass valueType)
           
 void setXmlElementWrapper(XmlElementWrapper xmlElementWrapper)
          Set the XmlElementWrapper for this property.
 void setXmlJavaTypeAdapter(XmlJavaTypeAdapter xmlJavaTypeAdapter)
          Set an XmlJavaTypeAdapter on this Property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KEY_NAME

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

DEFAULT_VALUE_NAME

public static final java.lang.String DEFAULT_VALUE_NAME
See Also:
Constant Field Values
Constructor Detail

Property

public Property()

Property

public Property(Helper helper)
Method Detail

setHelper

public void setHelper(Helper helper)

setAdapterClass

public void setAdapterClass(JavaClass adapterCls)

getElement

public JavaHasAnnotations getElement()

setElement

public void setElement(JavaHasAnnotations element)

getPropertyName

public java.lang.String getPropertyName()

setPropertyName

public void setPropertyName(java.lang.String propertyName)

getSchemaName

public javax.xml.namespace.QName getSchemaName()

setSchemaName

public void setSchemaName(javax.xml.namespace.QName schemaName)

isMethodProperty

public boolean isMethodProperty()

setMethodProperty

public void setMethodProperty(boolean isMethod)

setType

public void setType(JavaClass cls)

getType

public JavaClass getType()

getGenericType

public JavaClass getGenericType()

setGenericType

public void setGenericType(JavaClass genericType)

getSchemaType

public javax.xml.namespace.QName getSchemaType()

setSchemaType

public void setSchemaType(javax.xml.namespace.QName type)

isSwaAttachmentRef

public boolean isSwaAttachmentRef()

setIsSwaAttachmentRef

public void setIsSwaAttachmentRef(boolean b)

isMtomAttachment

public boolean isMtomAttachment()

setIsMtomAttachment

public void setIsMtomAttachment(boolean b)

isRequired

public boolean isRequired()

setIsRequired

public void setIsRequired(boolean b)

getMimeType

public java.lang.String getMimeType()

setMimeType

public void setMimeType(java.lang.String mType)

isAttribute

public boolean isAttribute()

isAnyAttribute

public boolean isAnyAttribute()

setIsAttribute

public void setIsAttribute(boolean attribute)

setIsAnyAttribute

public void setIsAnyAttribute(boolean anyAtribute)

getGetMethodName

public java.lang.String getGetMethodName()

setGetMethodName

public void setGetMethodName(java.lang.String methodName)

getSetMethodName

public java.lang.String getSetMethodName()

setSetMethodName

public void setSetMethodName(java.lang.String methodName)

isChoice

public boolean isChoice()

isAny

public boolean isAny()
Returns indicator for XmlAnyElement

Returns:

setIsAny

public void setIsAny(boolean isAnyElement)
Set indicator for XmlAnyElement.

Parameters:
isAnyElement -

isReference

public boolean isReference()

isNillable

public boolean isNillable()

setNillable

public void setNillable(boolean isNillable)

isTransient

public boolean isTransient()

setTransient

public void setTransient(boolean isTransient)

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Parameters:
defaultValue - the defaultValue to set

getDefaultValue

public java.lang.String getDefaultValue()
Returns:
the defaultValue

isSetDefaultValue

public boolean isSetDefaultValue()
Returns:
the isSetDefaultValue

isMixedContent

public boolean isMixedContent()

setMixedContent

public void setMixedContent(boolean b)

setHasXmlElementType

public void setHasXmlElementType(boolean hasXmlElementType)

isXmlElementType

public boolean isXmlElementType()

isCollectionType

public boolean isCollectionType(JavaClass type)

getActualType

public JavaClass getActualType()
Return the generic type if it was set (collection or array item type) otherwise return the type of this property

Returns:

getOriginalType

public JavaClass getOriginalType()
Get the original type of the property. This is typically used when the type has been changed via @XmlElement annotation and the original type is desired.

Returns:

setOriginalType

public void setOriginalType(JavaClass type)
Set the original type of the property. This is typically used when the type will been changed via @XmlElement annotation and the original type may be needed.


isSetXmlJavaTypeAdapter

public boolean isSetXmlJavaTypeAdapter()
Indicates if an XmlJavaTypeAdapter has been set, i.e. the xmlJavaTypeAdapter property is non-null.

Returns:
true if xmlJavaTypeAdapter is non-null, false otherwise
See Also:
XmlJavaTypeAdapter

getXmlJavaTypeAdapter

public XmlJavaTypeAdapter getXmlJavaTypeAdapter()
Return the xmlJavaTypeAdapter set on this Property.

Returns:
xmlJavaTypeAdapter, or null if not set
See Also:
XmlJavaTypeAdapter

setXmlJavaTypeAdapter

public void setXmlJavaTypeAdapter(XmlJavaTypeAdapter xmlJavaTypeAdapter)
Set an XmlJavaTypeAdapter on this Property. This call sets the adapterClass property to the given adapter's value.

Parameters:
xmlJavaTypeAdapter -
See Also:
XmlJavaTypeAdapter

isSetXmlElementWrapper

public boolean isSetXmlElementWrapper()
Indicates if an XmlElementWrapper has been set, i.e. the xmlElementWrapper property is non-null.

Returns:
true if xmlElementWrapper is non-null, false otherwise

getXmlElementWrapper

public XmlElementWrapper getXmlElementWrapper()
Return the XmlElementWrapper set on this property.

Returns:
XmlElementWrapper instance if non-null, null otherwise

setXmlElementWrapper

public void setXmlElementWrapper(XmlElementWrapper xmlElementWrapper)
Set the XmlElementWrapper for this property.

Parameters:
xmlElementWrapper -

setIsXmlValue

public void setIsXmlValue(boolean isXmlValue)
Set the isXmlValue property.

Parameters:
isXmlValue -

isXmlValue

public boolean isXmlValue()
Indicates if this property is an XmlValue.

Returns:

setIsXmlList

public void setIsXmlList(boolean isXmlList)
Set the isXmlList property.

Parameters:
isXmlList -

isXmlList

public boolean isXmlList()
Indicates if this property is an XmlList.

Returns:

getInverseReferencePropertyName

public java.lang.String getInverseReferencePropertyName()

setInverseReferencePropertyName

public void setInverseReferencePropertyName(java.lang.String name)

getInverseReferencePropertyGetMethodName

public java.lang.String getInverseReferencePropertyGetMethodName()

getInverseReferencePropertySetMethodName

public java.lang.String getInverseReferencePropertySetMethodName()

setInverseReferencePropertyGetMethodName

public void setInverseReferencePropertyGetMethodName(java.lang.String methodName)

setInverseReferencePropertySetMethodName

public void setInverseReferencePropertySetMethodName(java.lang.String methodName)

getInverseReferencePropertyContainerClass

public JavaClass getInverseReferencePropertyContainerClass()

setInverseReferencePropertyContainerClass

public void setInverseReferencePropertyContainerClass(JavaClass cls)

isXmlId

public boolean isXmlId()
Indicates if this property is an ID field.

Returns:

setIsXmlId

public void setIsXmlId(boolean isXmlId)
Sets the indicator that identifies this property as an ID field.

Parameters:
isXmlIdRef -

isXmlIdRef

public boolean isXmlIdRef()
Indicates if this property is a reference to an ID field.

Returns:

setIsXmlIdRef

public void setIsXmlIdRef(boolean isXmlIdRef)
Sets the indicator that identifies this property as a reference to an ID field.

Parameters:
isXmlIdRef -

isLax

public boolean isLax()
Used with XmlAnyElement.

Returns:

setLax

public void setLax(boolean b)
Used with XmlAnyElement.

Parameters:
b -

getDomHandlerClassName

public java.lang.String getDomHandlerClassName()
Return the DomHandler class name. Used with XmlAnyElement.

Returns:

setDomHandlerClassName

public void setDomHandlerClassName(java.lang.String domHandlerClassName)
Set the DomHandler class name. Used with XmlAnyElement.

Parameters:
domHandlerClassName -

getKeyType

public JavaClass getKeyType()

setKeyType

public void setKeyType(JavaClass keyType)

getValueType

public JavaClass getValueType()

setValueType

public void setValueType(JavaClass valueType)

isMap

public boolean isMap()

setIsMap

public void setIsMap(boolean isMap)

isInverseReference

public boolean isInverseReference()

setInverseReference

public void setInverseReference(boolean isInverseReference)

EclipseLink 2.0.0, build 'v20091127-r5931' API Reference