atg.droplet.sql
Class SimpleSQLFormHandler.FlexibleDoublePropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by atg.droplet.sql.SimpleSQLFormHandler.FlexibleDoublePropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor
Enclosing class:
SimpleSQLFormHandler

public static class SimpleSQLFormHandler.FlexibleDoublePropertyEditor
extends java.beans.PropertyEditorSupport

This class implements a property editor which does normal double parsing, but also check for 'true' treating it as 1.0 and 'false" as 0.0. This is necessary because some SQL databases (oracle) don't type numbers very strictly so they are used for booleans.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
SimpleSQLFormHandler.FlexibleDoublePropertyEditor()
           
 
Method Summary
 java.lang.String getAsText()
           
 java.lang.String getJavaInitializationString()
           
 void setAsText(java.lang.String pStr)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

SimpleSQLFormHandler.FlexibleDoublePropertyEditor

public SimpleSQLFormHandler.FlexibleDoublePropertyEditor()
Method Detail

setAsText

public void setAsText(java.lang.String pStr)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException

getJavaInitializationString

public java.lang.String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Overrides:
getJavaInitializationString in class java.beans.PropertyEditorSupport

getAsText

public java.lang.String getAsText()
Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport