Class Property

  • All Implemented Interfaces:
    IProperty, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

    public final class Property
    extends java.lang.Object
    implements IProperty, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
    A property implementation for Nodes stored inside a database. Basically the same as for transient nodes, with a few hooks added.
    See Also:
    Serialized Form
    • Constructor Detail

      • Property

        public Property​(Node node)
        Creates a new Property object.
        Parameters:
        node - ...
      • Property

        public Property​(java.lang.String propname,
                        Node node)
        Creates a new Property object.
        Parameters:
        propname - ...
        node - ...
      • Property

        public Property​(java.lang.String propname,
                        Node node,
                        Node valueNode)
        Creates a new Property object.
        Parameters:
        propname - ...
        node - ...
        valueNode - ...
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of the property
        Specified by:
        getName in interface IProperty
        Returns:
        this property's name
      • setName

        protected void setName​(java.lang.String name)
        Set the name of the property
      • getValue

        public java.lang.Object getValue()
        Specified by:
        getValue in interface IProperty
        Returns:
        the property's value in its native class
      • getType

        public int getType()
        Specified by:
        getType in interface IProperty
        Returns:
        the property's type as defined in helma.objectmodel.IProperty.java
      • setValue

        protected void setValue​(java.lang.Object value,
                                int type)
        Directly set the value of this property.
      • setStringValue

        public void setStringValue​(java.lang.String str)
        Parameters:
        str - ...
      • setIntegerValue

        public void setIntegerValue​(long l)
        Parameters:
        l - ...
      • setFloatValue

        public void setFloatValue​(double d)
        Parameters:
        d - ...
      • setDateValue

        public void setDateValue​(java.util.Date date)
        Parameters:
        date - ...
      • setBooleanValue

        public void setBooleanValue​(boolean bool)
        Parameters:
        bool - ...
      • setNodeValue

        public void setNodeValue​(Node node)
        Parameters:
        node - ...
      • setNodeHandle

        public void setNodeHandle​(NodeHandle handle)
        Parameters:
        handle - ...
      • getNodeHandle

        public NodeHandle getNodeHandle()
        Returns:
        ...
      • convertToNodeReference

        public void convertToNodeReference​(Relation rel)
        Parameters:
        rel - the Relation
      • setJavaObjectValue

        public void setJavaObjectValue​(java.lang.Object obj)
        Parameters:
        obj - ...
      • getStringValue

        public java.lang.String getStringValue()
        Specified by:
        getStringValue in interface IProperty
        Returns:
        ...
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        ...
      • getFloatValue

        public double getFloatValue()
        Specified by:
        getFloatValue in interface IProperty
        Returns:
        ...
      • getDateValue

        public java.util.Date getDateValue()
        Specified by:
        getDateValue in interface IProperty
        Returns:
        ...
      • getTimestampValue

        public java.sql.Timestamp getTimestampValue()
        Returns:
        ...
      • getBooleanValue

        public boolean getBooleanValue()
        Specified by:
        getBooleanValue in interface IProperty
        Returns:
        ...
      • getJavaObjectValue

        public java.lang.Object getJavaObjectValue()
        Specified by:
        getJavaObjectValue in interface IProperty
        Returns:
        ...
      • compareTo

        public int compareTo​(java.lang.Object obj)
        Specified by:
        compareTo in interface java.lang.Comparable
        See Also:
        The following cases throw a ClassCastException - Properties of a different type - Properties of boolean or node type
      • equals

        public boolean equals​(java.lang.Object obj)
        Return true if object o is equal to this property.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object to compare to
        Returns:
        true if this equals obj
        See Also:
        Object.equals(java.lang.Object)