Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.marshal.xml
Class PropertyInfo

java.lang.Object
  extended by oracle.javatools.marshal.xml.PropertyInfo
All Implemented Interfaces:
java.lang.Comparable

public final class PropertyInfo
extends java.lang.Object
implements java.lang.Comparable

This is an internal data structure used by Object2Dom to hold metadata about a persistent property. Classes outside of the oracle.ide.marshal.xml package should create new instances of this class using the PropertyInfoFactory.


Method Summary
 int compareTo(java.lang.Object o)
          The implementation of this method allows a collection of PropertyInfo objects to be sorted lexicographically by the XML name.
 boolean equals(java.lang.Object o)
           
 java.lang.Class getPropertyClass()
          Returns the type of the property as a Class object.
 java.lang.Object getPropertyValue(java.lang.Object owningObject)
          Invokes the getter method using owningObject as the object on which the getter is called.
 java.lang.String getXMLName()
          Returns the XML name of the property.
 boolean isAttribute()
          Returns true if this property is to be saved as an attribute rather than a separate XML element.
 boolean isOmittedWhenNull()
          Returns true if this property should be omitted from the XML when the value is null.
 void setPropertyValue(java.lang.Object owningObject, java.lang.Object value)
          Invokes the setter method using owningObject as the object on which the setter is called, and value as the value passed to the setter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getXMLName

public java.lang.String getXMLName()
Returns the XML name of the property. This ends up being the element tag or attribute name, depending on whether or not the property is being saved as an attribute.


getPropertyClass

public java.lang.Class getPropertyClass()
Returns the type of the property as a Class object.


getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object owningObject)
Invokes the getter method using owningObject as the object on which the getter is called. This method will return null if any exception occurs while invoking the getter method.


setPropertyValue

public void setPropertyValue(java.lang.Object owningObject,
                             java.lang.Object value)
                      throws java.lang.Exception
Invokes the setter method using owningObject as the object on which the setter is called, and value as the value passed to the setter. This method will return without doing anything if any exception occurs while invoking the setter method.

Throws:
java.lang.Exception

isAttribute

public boolean isAttribute()
Returns true if this property is to be saved as an attribute rather than a separate XML element.


isOmittedWhenNull

public boolean isOmittedWhenNull()
Returns true if this property should be omitted from the XML when the value is null.


compareTo

public int compareTo(java.lang.Object o)
The implementation of this method allows a collection of PropertyInfo objects to be sorted lexicographically by the XML name.

Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.