## helma.objectmodel.db
Class Property

    java.lang.Object
      helma.objectmodel.db.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

Field Summary

Fields inherited from interface helma.objectmodel.IProperty
`BOOLEAN, DATE, FLOAT, INTEGER, JAVAOBJECT, NODE, STRING`

Constructor Summary
`Property(Node node)` Creates a new Property object.
`Property(java.lang.String propname, Node node)` Creates a new Property object.
`Property(java.lang.String propname, Node node, Node valueNode)` Creates a new Property object.

Method Summary
`int` `compareTo(java.lang.Object obj)`
`void` `convertToNodeReference(Relation rel)`
`boolean` `equals(java.lang.Object obj)` Return true if object o is equal to this property.
`boolean` `getBooleanValue()`
`java.util.Date` `getDateValue()`
`double` `getFloatValue()`
`long` `getIntegerValue()`
`java.lang.Object` `getJavaObjectValue()`
`java.lang.String` `getName()` Get the name of the property
`NodeHandle` `getNodeHandle()`
`INode` `getNodeValue()`
`java.lang.String` `getStringValue()`
`java.sql.Timestamp` `getTimestampValue()`
`int` `getType()`
`java.lang.Object` `getValue()`
`void` `setBooleanValue(boolean bool)`
`void` `setDateValue(java.util.Date date)`
`void` `setFloatValue(double d)`
`void` `setIntegerValue(long l)`
`void` `setJavaObjectValue(java.lang.Object obj)`
`protected void` `setName(java.lang.String name)` Set the name of the property
`void` `setNodeHandle(NodeHandle handle)`
`void` `setNodeValue(Node node)`
`void` `setStringValue(java.lang.String str)`
`protected void` `setValue(java.lang.Object value, int type)` Directly set the value of this property.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

### getIntegerValue

    public long getIntegerValue()

  Specified by:
    `getIntegerValue` in interface `IProperty`
  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:
    ...

### getNodeValue

    public INode getNodeValue()

  Specified by:
    `getNodeValue` 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)`

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.