Package helma.objectmodel.db

# Class Property

java.lang.Object
helma.objectmodel.db.Property

All Implemented Interfaces:
  `IProperty`, `Serializable`, `Cloneable`, `Comparable`

public final class Property extends Object implements IProperty, Serializable, Cloneable, 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

Constructors
Constructor
Description
`Property(Node node)`
Creates a new Property object.
`Property(String propname, Node node)`
Creates a new Property object.
`Property(String propname, Node node, Node valueNode)`
Creates a new Property object.

## Method Summary

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

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Property

public Property(Node node)
Creates a new Property object.

Parameters:
  `node` - ...

### Property

public Property(String propname, Node node)
Creates a new Property object.

Parameters:
  `propname` - ...
  `node` - ...

### Property

public Property(String propname, Node node, Node valueNode)
Creates a new Property object.

Parameters:
  `propname` - ...
  `node` - ...
  `valueNode` - ...

## Method Details

### getName

public String getName()
Get the name of the property

Specified by:
  `getName` in interface `IProperty`
Returns:
  this property's name

### setName

protected void setName(String name)
Set the name of the property

### getValue

public 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(Object value, int type)
Directly set the value of this property.

### setStringValue

public void setStringValue(String str)

Parameters:
  `str` - ...

### setIntegerValue

public void setIntegerValue(long l)

Parameters:
  `l` - ...

### setFloatValue

public void setFloatValue(double d)

Parameters:
  `d` - ...

### setDateValue

public void setDateValue(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(Object obj)

Parameters:
  `obj` - ...

### getStringValue

public String getStringValue()

Specified by:
  `getStringValue` in interface `IProperty`
Returns:
  ...

### toString

public String toString()

Overrides:
  `toString` in class `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 Date getDateValue()

Specified by:
  `getDateValue` in interface `IProperty`
Returns:
  ...

### getTimestampValue

public 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 Object getJavaObjectValue()

Specified by:
  `getJavaObjectValue` in interface `IProperty`
Returns:
  ...

### compareTo

public int compareTo(Object obj)

Specified by:
  `compareTo` in interface `Comparable`
See Also:
  - `The following cases throw a ClassCastException - Properties of a different type - Properties of boolean or node type`

### equals

public boolean equals(Object obj)
Return true if object o is equal to this property.

Overrides:
  `equals` in class `Object`
Parameters:
  `obj` - the object to compare to
Returns:
  true if this equals obj
See Also:
  - `Object.equals(java.lang.Object)`