biz.hammurapi.sql.columns
Class BooleanColumn

java.lang.Object
  extended by biz.hammurapi.sql.columns.Column
      extended by biz.hammurapi.sql.columns.BooleanColumn
All Implemented Interfaces:
ContextConfigurable, DomConfigurable, Attributable, java.io.Serializable, java.lang.Cloneable

public class BooleanColumn
extends Column

Version:
$Revision: 1.12 $
Author:
Pavel Vlasov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class biz.hammurapi.sql.columns.Column
force
 
Constructor Summary
BooleanColumn(java.lang.String name, boolean isPrimaryKey)
           
BooleanColumn(java.lang.String name, boolean isPrimaryKey, boolean value)
           
BooleanColumn(java.lang.String name, boolean isPrimaryKey, java.sql.ResultSet rs)
           
 
Method Summary
 void clear()
          Sets field value to default and clears modified flag.
 void clearModified()
          Clears modified flag and sets original value to current value.
 void configure(Context context, Converter converter)
           
 boolean equals(java.lang.Object otherColumn)
           
 java.lang.Object getObjectValue(boolean ov)
          Returns column value as object
 boolean getOriginalValue()
           
protected  java.lang.String getType()
           
 boolean getValue()
           
 int hashCode()
           
 void load(java.lang.String textValue)
          Loads value from XML Element
protected  void parameterizeInternal(java.sql.PreparedStatement ps, int idx)
          Implement this method in subclasses.
 void parameterizeOriginal(java.sql.PreparedStatement ps, int idx)
          Implement this method in subclasses.
 void set(Column source)
          Copies values from source column
 void setOriginal()
           
 void setValue(boolean value)
           
 java.lang.String toString()
           
 
Methods inherited from class biz.hammurapi.sql.columns.Column
clone, columnType, configure, getAlignment, getAttribute, getLabel, getListener, getName, getXmlName, hasColumn, isModified, isPrimaryKey, listName, onChange, parameterize, removeAttribute, setAttribute, setForce, setLabel, setListener, toDom, toSax
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanColumn

public BooleanColumn(java.lang.String name,
                     boolean isPrimaryKey)

BooleanColumn

public BooleanColumn(java.lang.String name,
                     boolean isPrimaryKey,
                     java.sql.ResultSet rs)
              throws java.sql.SQLException
Throws:
java.sql.SQLException

BooleanColumn

public BooleanColumn(java.lang.String name,
                     boolean isPrimaryKey,
                     boolean value)
Method Detail

getOriginalValue

public boolean getOriginalValue()

parameterizeOriginal

public void parameterizeOriginal(java.sql.PreparedStatement ps,
                                 int idx)
                          throws java.sql.SQLException
Description copied from class: Column
Implement this method in subclasses.

Specified by:
parameterizeOriginal in class Column
Throws:
java.sql.SQLException

setOriginal

public void setOriginal()
Specified by:
setOriginal in class Column

getValue

public boolean getValue()

setValue

public void setValue(boolean value)

parameterizeInternal

protected void parameterizeInternal(java.sql.PreparedStatement ps,
                                    int idx)
                             throws java.sql.SQLException
Description copied from class: Column
Implement this method in subclasses.

Specified by:
parameterizeInternal in class Column
Throws:
java.sql.SQLException

getObjectValue

public java.lang.Object getObjectValue(boolean ov)
Description copied from class: Column
Returns column value as object

Specified by:
getObjectValue in class Column
Parameters:
ov - if true this method returns original value instead of current value.
Returns:

toString

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

equals

public boolean equals(java.lang.Object otherColumn)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

load

public void load(java.lang.String textValue)
Description copied from class: Column
Loads value from XML Element

Specified by:
load in class Column
Parameters:
textValue - "YES", "yes", "TRUE", "true" yield true. All other values yield false.

clear

public void clear()
Description copied from class: Column
Sets field value to default and clears modified flag.

Specified by:
clear in class Column

configure

public void configure(Context context,
                      Converter converter)
Parameters:
context - Context to read values from
converter - Converter to convert values to proper type.

getType

protected java.lang.String getType()
Specified by:
getType in class Column

set

public void set(Column source)
Description copied from class: Column
Copies values from source column

Specified by:
set in class Column

clearModified

public void clearModified()
Clears modified flag and sets original value to current value.

Overrides:
clearModified in class Column


Copyright © 2003 Hammurapi Group. All Rights Reserved.