You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Thomas Fischer <fi...@seitenbau.net> on 2010/09/26 16:43:08 UTC

column attribute inputValidator

Currently there is an attribute inputValidator on the column element. It is
only used to set the inputValidator property on the column map, which is
not further used.
Ok to remove this attribute ?

     Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: column attribute inputValidator

Posted by Thomas Vandahl <tv...@apache.org>.
On 26.09.10 16:43, Thomas Fischer wrote:
> 
> Currently there is an attribute inputValidator on the column element. It is
> only used to set the inputValidator property on the column map, which is
> not further used.
> Ok to remove this attribute ?
+1

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: column attribute inputValidator

Posted by Thomas Vandahl <tv...@apache.org>.
On 27.09.10 16:21, Greg Monroe wrote:
> Even thought we don't use it, I think this is a valuable attribute.  I 
> know I've referenced it a few times when people ask about validation.  
> E.g., in you set it to your custom validation class, then in the Table 
> class override the base set method for the column so that it lookups 
> and calls this validator class.

I beg to differ. IMO, validation should be done at the input edge and
not in the Db layer.

> Although, I suppose that we could drop this in favor to the more generic
> "option" key/value attribute.  However, the disadvantage here is that
> the options attribute was designed for use by templates and are not
> carried into the Map classes. 

The Map classes are generated from templates, too.

> Maybe the options attribute key/value pairs should be carried into
> the Map structure.  This would be a more generic method for application
> or add-on developers to define custom items that can be used by either
> templates or code.

I second this one. Having this kind of extension mechanism available in
the code could be *very* useful.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


RE: column attribute inputValidator

Posted by Greg Monroe <Gr...@dukece.com>.
Even thought we don't use it, I think this is a valuable attribute.  I 
know I've referenced it a few times when people ask about validation.  
E.g., in you set it to your custom validation class, then in the Table 
class override the base set method for the column so that it lookups 
and calls this validator class.

Bottom line is that Torque doesn't supply validation but it does allow
integration with it.

Although, I suppose that we could drop this in favor to the more generic
"option" key/value attribute.  However, the disadvantage here is that
the options attribute was designed for use by templates and are not
carried into the Map classes. 

Maybe the options attribute key/value pairs should be carried into
the Map structure.  This would be a more generic method for application
or add-on developers to define custom items that can be used by either
templates or code.

IMHO, I think the best thing might be to deprecate the inputValidator and 
make the option attribute available to coders as well as template modifiers. 

> -----Original Message-----
> From: Thomas Fischer [mailto:fischer@seitenbau.net]
> Sent: Sunday, September 26, 2010 10:43 AM
> To: Apache Torque Developers List
> Subject: column attribute inputValidator
> 
> 
> Currently there is an attribute inputValidator on the column element. It
> is
> only used to set the inputValidator property on the column map, which is
> not further used.
> Ok to remove this attribute ?
> 
>      Thomas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org

DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org