Package au.csiro.ontology.snomed.refset.rf2

Examples of au.csiro.ontology.snomed.refset.rf2.ValidationException


    public void validate(Field field, Long constraintValue, MessageFormatter formatter, Number value)
            throws ValidationException
    {
        if (value.longValue() < constraintValue)
            throw new ValidationException(buildMessage(formatter, field, constraintValue));
    }
View Full Code Here


        {
            return new Float(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("number-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Long(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("integer-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Integer(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("integer-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Double(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("number-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Byte(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("integer-format-exception", clientValue));
        }
    }
View Full Code Here

                                String message)
            throws ValidationException {
        try {
            return Currency.getInstance(clientValue);
        } catch (final IllegalArgumentException e) {
            throw new ValidationException(message);
        }
    }
View Full Code Here

    public URL parseClient(Field field, String clientValue, String message) throws ValidationException {
        try {
            return new URL(clientValue);
        } catch (MalformedURLException e) {
            throw new ValidationException(message);
        }
    }
View Full Code Here

    @Persist
    private String event;

    void onValidateFormFromForm() throws ValidationException
    {
        throw new ValidationException("From event handler method.");
    }
View Full Code Here

        // And it gets tricky because we probably should trim spaces!

        if (input.equalsIgnoreCase("zero")) return 0;

        if (input.equalsIgnoreCase("i")) throw new ValidationException("Rational numbers only, please.");

        // Get the default behavior.

        return null;
    }
View Full Code Here

TOP

Related Classes of au.csiro.ontology.snomed.refset.rf2.ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.