incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Min Chen <min.c...@citrix.com>
Subject Re: [DISCUSS] Api refactoring -- validation
Date Thu, 13 Dec 2012 19:29:34 GMT
Thanks for the clarification, Animesh.

On 12/13/12 10:46 AM, "Animesh Chaturvedi" <animesh.chaturvedi@citrix.com>
wrote:

>Hibernate allows writing custom validators. I think in this specific use
>case, database lookup for index will be expensive and  it is better to
>throw UncheckedException  in API Implementation when the index is not
>found.
>
>Here is the link to API documentation
>
>http://docs.jboss.org/hibernate/validator/4.3/reference/en-US/html_single/
>
>
>Animesh
>
>
>
>> -----Original Message-----
>> From: Min Chen [mailto:min.chen@citrix.com]
>> Sent: Thursday, December 13, 2012 10:12 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: Re: [DISCUSS] Api refactoring -- validation
>> 
>> One question regarding Hibernate Validator: does it support validation
>>of
>> existence of a DB entity with a given ID? The reason I am raising this
>>question
>> is that we have such a validation case in API refactoring. For example,
>> deployVMCmd has an input parameter "templateId", for this parameter, we
>> need to validate the template with the given id exists in the Template
>>table.
>> Not sure if Hibernate validator supports this scenario? By glancing
>>through
>> Hibernate validator doc, didn't find exact details on this, maybe I
>>overlooked
>> something.
>> 
>> Thanks
>> -min
>> 
>> On 12/13/12 10:04 AM, "Fang Wang" <fang.wang@citrix.com> wrote:
>> 
>> >Hibernate Validator
>


Mime
View raw message