net.sourceforge.sqlunit.beans
Class Col

java.lang.Object
  extended by net.sourceforge.sqlunit.beans.Col
All Implemented Interfaces:
java.lang.Comparable

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

Models a col element, representing a column in a database row.

Version:
$Revision: 1.11 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
Col()
           
 
Method Summary
 int compareTo(java.lang.Object obj)
          Returns a negative, zero or positive value depending on whether the contents of this column is less than, equal to or greater than the contents of the passed in Col object.
 boolean equals(java.lang.Object obj)
          Returns a true or false based on whether the objects are equal.
 java.lang.String getClassName()
          Returns the class name (for IJavaObject objects) for this column,
 java.lang.String getId()
          Returns the Id for this column.
 java.lang.String getName()
          Return the name for this column.
 java.lang.String getType()
          Return the XML type for this column.
 java.lang.String getValue()
          Returns the value of this column as a String.
 int hashCode()
          Returns a hashcode for the Col object.
 void setClassName(java.lang.String className)
          Set the class name (for IJavaObject objects) for this column,
 void setId(java.lang.String id)
          Set the id for this column.
 void setName(java.lang.String name)
          Set the name for this column,
 void setType(java.lang.String type)
          Set the XML type for this column,
 void setValue(java.lang.String value)
          Set the value of this column from a String.
 org.jdom.Element toElement()
          Returns a JDOM element that represents this Col object.
 java.lang.String toString()
          Returns a compact String representation of the Col object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Col

public Col()
Method Detail

getId

public final java.lang.String getId()
Returns the Id for this column.

Returns:
the id for this column.

setId

public final void setId(java.lang.String id)
Set the id for this column.

Parameters:
id - the id for this column.

getName

public final java.lang.String getName()
Return the name for this column.

Returns:
the name for this column.

setName

public final void setName(java.lang.String name)
Set the name for this column,

Parameters:
name - the name for this column.

getType

public final java.lang.String getType()
Return the XML type for this column.

Returns:
the XML type for this column,

setType

public final void setType(java.lang.String type)
Set the XML type for this column,

Parameters:
type - the XML type for this column.

getClassName

public final java.lang.String getClassName()
Returns the class name (for IJavaObject objects) for this column,

Returns:
the class name for this column.

setClassName

public final void setClassName(java.lang.String className)
Set the class name (for IJavaObject objects) for this column,

Parameters:
className - the class name for this column.

getValue

public final java.lang.String getValue()
Returns the value of this column as a String.

Returns:
the value of this column as a String.

setValue

public final void setValue(java.lang.String value)
Set the value of this column from a String.

Parameters:
value - the value to set.

compareTo

public final int compareTo(java.lang.Object obj)
Returns a negative, zero or positive value depending on whether the contents of this column is less than, equal to or greater than the contents of the passed in Col object.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - an instance of a Col object.
Returns:
a negative, zero or positive number.

equals

public final boolean equals(java.lang.Object obj)
Returns a true or false based on whether the objects are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare against.
Returns:
true or false.

hashCode

public final int hashCode()
Returns a hashcode for the Col object. This is the sum of the hashcodes for the type and the value.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for the Col object.

toElement

public final org.jdom.Element toElement()
Returns a JDOM element that represents this Col object.

Returns:
a JDOM element representing this object.

toString

public final java.lang.String toString()
Returns a compact String representation of the Col object.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the Col object.