com.neoworks.jukex.sqlimpl
Class JukeXAttributeValue

java.lang.Object
  |
  +--com.neoworks.jukex.sqlimpl.JukeXAttributeValue
All Implemented Interfaces:
AttributeValue, DatabaseObject, java.io.Serializable

public class JukeXAttributeValue
extends java.lang.Object
implements AttributeValue, DatabaseObject

A JukeX AttributeValue, holding the value of an Attribute.

Author:
Nick Vincent nick@neoworks.com
See Also:
Serialized Form

Constructor Summary
JukeXAttributeValue(Attribute attr, int value)
          Do NOT use this method if you wish an AttributeValue to be stored in the database.
JukeXAttributeValue(long id, Attribute attr, java.lang.String s)
          Do NOT use this method if you wish an AttributeValue to be stored in the database.
 
Method Summary
 long getId()
          Return the database ID of this object
 int getInt()
          Get the int value
 java.lang.String getString()
          Get the String value
 int getType()
          Get the type of the attribute that this value corresponds to
 void setString(java.lang.String newval)
          Changes the value of the current AttributeValue.
 java.lang.String toString()
          Get a String representation of this AttributeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JukeXAttributeValue

public JukeXAttributeValue(long id,
                           Attribute attr,
                           java.lang.String s)
Do NOT use this method if you wish an AttributeValue to be stored in the database. This call will not store an attribute in the database.


JukeXAttributeValue

public JukeXAttributeValue(Attribute attr,
                           int value)
Do NOT use this method if you wish an AttributeValue to be stored in the database. This call will not store an attribute in the database.

Method Detail

getId

public long getId()
Description copied from interface: DatabaseObject
Return the database ID of this object

Specified by:
getId in interface DatabaseObject
Returns:
The database ID of this object

getInt

public int getInt()
Description copied from interface: AttributeValue
Get the int value

Specified by:
getInt in interface AttributeValue
Returns:
The value

getString

public java.lang.String getString()
Description copied from interface: AttributeValue
Get the String value

Specified by:
getString in interface AttributeValue
Returns:
The value

getType

public int getType()
Description copied from interface: AttributeValue
Get the type of the attribute that this value corresponds to

Specified by:
getType in interface AttributeValue
Returns:
An int representing the attribute type (see Attribute)

setString

public void setString(java.lang.String newval)
Changes the value of the current AttributeValue. Every other object which uses this attribute value will reflect this change. If the required behaviour is to change the value *without* affecting other Tracks using this attribute then create a new value, and use this instead.

Specified by:
setString in interface AttributeValue
Parameters:
newval - The String to set as the new value

toString

public java.lang.String toString()
Description copied from interface: AttributeValue
Get a String representation of this AttributeValue

Specified by:
toString in interface AttributeValue
Overrides:
toString in class java.lang.Object
Returns:
A String