org.rimudb
Class PropertyNode

java.lang.Object
  extended by org.rimudb.PropertyNode
All Implemented Interfaces:
java.lang.Comparable

public class PropertyNode
extends java.lang.Object
implements java.lang.Comparable

This object represents a single property associated with a DataObjectNode. This is created and used internally by the DBStructure object, and should not be used directly by any other class.


Constructor Summary
PropertyNode(DataObjectNode parent, org.w3c.dom.Element element, int keySeqeunce)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
           
 java.lang.String getSourceName()
           
 java.lang.String getSourceParent()
           
 java.lang.Object getValue()
           
 boolean isConstant()
           
 boolean isFromParent()
           
 void setValue(java.lang.String newValue)
          Set the value in the associated DataObject via Reflection
 boolean sourceIsIdentity()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyNode

public PropertyNode(DataObjectNode parent,
                    org.w3c.dom.Element element,
                    int keySeqeunce)
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y)>0 && y.compareTo(z)>0) implies x.compareTo(z)>0.

Finally, the implementer must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this Object.

equals

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

getName

public java.lang.String getName()

getSourceName

public java.lang.String getSourceName()

getValue

public java.lang.Object getValue()

isConstant

public boolean isConstant()

isFromParent

public boolean isFromParent()

getSourceParent

public java.lang.String getSourceParent()

sourceIsIdentity

public boolean sourceIsIdentity()

setValue

public void setValue(java.lang.String newValue)
              throws java.lang.IllegalArgumentException
Set the value in the associated DataObject via Reflection

Throws:
java.lang.IllegalArgumentException


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.