com.finalist.jaggenerator.validation
Class StrutsValidation

java.lang.Object
  extended bycom.finalist.jaggenerator.validation.StrutsValidation

public class StrutsValidation
extends java.lang.Object

Represents Struts 1.1 validations for a particular database column, ultimately destined to be included in the 'validation.xml' declarative validations configuration file.

This class represents a Struts validation as two parts: a 'depends' list and an XML fragment: the 'depends list' is a comma-seperated list of validation methods (e.g. 'integer', 'date', 'mask'), and the XML fragment contains any parameters needed by those validation methods.

Author:
Michael O'Connor - Finalist IT Group

Constructor Summary
StrutsValidation()
          Creates a StrutsValidation without generating the validations.
StrutsValidation(java.lang.String sqlType, java.lang.String jdbcType, boolean required)
           
 
Method Summary
 java.lang.String getDependsList()
          Gets the comma-seperated list of Struts validators to be applied to this field.
static java.util.List getParams(java.lang.String sqlType)
           
 java.lang.String getXml()
          Gets the corresponding XML fragment that complements the dependsList.
 void setDependsList(java.lang.String dependsList)
           
 void setXml(java.lang.String xml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrutsValidation

public StrutsValidation()
Creates a StrutsValidation without generating the validations.


StrutsValidation

public StrutsValidation(java.lang.String sqlType,
                        java.lang.String jdbcType,
                        boolean required)
Parameters:
sqlType - the column type (SQL data type, e.g. NUMBER(12)).
jdbcType - the JDBC data type.
required - whether or not the field is mandatory.
Method Detail

setDependsList

public void setDependsList(java.lang.String dependsList)
See Also:
{@link #getDependsList()}.

setXml

public void setXml(java.lang.String xml)
See Also:
{@link #getXml()}.

getDependsList

public java.lang.String getDependsList()
Gets the comma-seperated list of Struts validators to be applied to this field.

Returns:
the dependsList.

getXml

public java.lang.String getXml()
Gets the corresponding XML fragment that complements the dependsList.

Returns:
the xml fragment.

getParams

public static java.util.List getParams(java.lang.String sqlType)


Copyright © 2003-2005 SourceForge. All Rights Reserved.