[hibernate-issues] [Hibernate-JIRA] Moved: (HV-143) Implemented BigDecimalRange Validator for BigDecimals with precision range and scale

Hardy Ferentschik (JIRA) noreply at atlassian.com
Thu Apr 16 09:11:17 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik moved ANN-746 to HV-143:
------------------------------------------

        Key: HV-143  (was: ANN-746)
    Project: Hibernate Validator  (was: Hibernate Annotations)

> Implemented BigDecimalRange Validator for BigDecimals with precision range and scale
> ------------------------------------------------------------------------------------
>
>                 Key: HV-143
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-143
>             Project: Hibernate Validator
>          Issue Type: New Feature
>            Reporter: Priya M
>         Attachments: BigDecimalRange.java, BigDecimalRangeValidator.java
>
>
> Currently, hibernate validator's do not have @Range or @Length for decimal numbers (like float, double and BigDecimal) for validating precision and scale simultaneously. Also, Hibernate doesn't generate correct db column types as Number(x,y) if Java Type is Float or Double. However it works only for BigDecimal. 
> I've added the annotation for BigDecimalRange and BigDecimalRangeValidator for the same
> Usage
> @BigDecimalRange(minPrecision=0, maxPrecision=13, scale=2)
>  public BigDecimal getFoo() {
>       return this.foo;
>  }
> It works for my app.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list