db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: inputValidator usage
Date Mon, 16 Oct 2006 19:37:33 GMT
This dates back to the V1.0 DTD in CVS.  The only place
that this is used is to set the String InputValidator 
property of the ColumnMap class in the 3.2.1-dev version.

So, if you want to use it, you could probably set it 
to your own validation /text to object type conversion
class, then when processing input do something like:

setColumnWithValidation( BaseObject record, 
                         String colName, 
                         String value) 
                            throws Exception {

    validatorClassName  = record.getTableMap()
            .getColumn(PeerName).getInputValidator());
    Class vClass = Class.forName(validatorClassName);
    Validate v = (Validate) vClass.newInstance();
    setByName(colName, v.convert(value) );
}



> -----Original Message-----
> From: Alvaro Coronel [mailto:alvarocoronel67@yahoo.com] 
> Sent: Monday, October 16, 2006 12:50 PM
> To: Apache Torque Users List
> Subject: inputValidator usage
> 
> Hello everybody.
> 
> Can anyone please provide a useful pointer or hint about the 
> usage of the inputValidator tag? 
> 
> Advice not only about schema definition but also at code 
> level would be appreciated.
> 
> TIA
> Álvaro Coronel.
> 
>  			
> ---------------------------------
> Get your own web address for just $1.99/1st yr. We'll help. 
> Yahoo! Small Business.
> 

Duke CE 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-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message