Package groovy.lang

Examples of groovy.lang.MissingPropertyException


        try {
            getResultSet().updateObject(columnName, newValue);
            updated = true;
        }
        catch (SQLException e) {
            throw new MissingPropertyException(columnName, GroovyResultSetProxy.class, e);
        }
    }
View Full Code Here


            if (value != null)
                return value;
            // if property exists and value is null, return null
            if (result.containsKey(propertyUpper))
                return null;
            throw new MissingPropertyException(property, GroovyRowResult.class);
        }
        catch (Exception e) {
            throw new MissingPropertyException(property, GroovyRowResult.class, e);
        }
    }
View Full Code Here

                i++;
            }
            return (obj);
        }
        catch (Exception e) {
            throw new MissingPropertyException(Integer.toString(index), GroovyRowResult.class, e);
        }
    }
View Full Code Here

            appliedConstraints.remove(MAX_CONSTRAINT);
            return;
        }

        if (!propertyType.equals(max.getClass())) {
            throw new MissingPropertyException(MAX_CONSTRAINT,propertyType);
        }

        Range r = getRange();
        if (r != null) {
            LOG.warn("Range constraint already set ignoring constraint [" + MAX_CONSTRAINT + "] for value [" + max + "]");
View Full Code Here

            appliedConstraints.remove(MIN_CONSTRAINT);
            return;
        }

        if (!propertyType.equals(min.getClass())) {
            throw new MissingPropertyException(MIN_CONSTRAINT,propertyType);
        }

        Range r = getRange();
        if (r != null) {
            LOG.warn("Range constraint already set ignoring constraint ["+MIN_CONSTRAINT+"] for value ["+min+"]");
View Full Code Here

    /**
     * @param blank The blank to set.
     */
    public void setBlank(boolean blank) {
        if (isNotValidStringType()) {
            throw new MissingPropertyException("Blank constraint can only be applied to a String property",
                    BLANK_CONSTRAINT, owningClass);
        }

        if (!blank) {
            Constraint c = appliedConstraints.get(BLANK_CONSTRAINT);
View Full Code Here

     * @return Returns the email.
     */
    @Override
    public boolean isEmail() {
        if (isNotValidStringType()) {
            throw new MissingPropertyException("Email constraint only applies to a String property",
                    EMAIL_CONSTRAINT, owningClass);
        }

        return appliedConstraints.containsKey(EMAIL_CONSTRAINT);
    }
View Full Code Here

    /**
     * @param email The email to set.
     */
    public void setEmail(boolean email) {
        if (isNotValidStringType()) {
            throw new MissingPropertyException("Email constraint can only be applied to a String property",
                    EMAIL_CONSTRAINT, owningClass);
        }

        Constraint c = appliedConstraints.get(EMAIL_CONSTRAINT);
        if (email) {
View Full Code Here

     * @return Returns the creditCard.
     */
    @Override
    public boolean isCreditCard() {
        if (isNotValidStringType()) {
            throw new MissingPropertyException("CreditCard constraint only applies to a String property",
                    CREDIT_CARD_CONSTRAINT,owningClass);
        }

        return appliedConstraints.containsKey(CREDIT_CARD_CONSTRAINT);
    }
View Full Code Here

    /**
     * @param creditCard The creditCard to set.
     */
    public void setCreditCard(boolean creditCard) {
        if (isNotValidStringType()) {
            throw new MissingPropertyException("CreditCard constraint only applies to a String property",
                    CREDIT_CARD_CONSTRAINT,owningClass);
        }

        Constraint c = appliedConstraints.get(CREDIT_CARD_CONSTRAINT);
        if (creditCard) {
View Full Code Here

TOP

Related Classes of groovy.lang.MissingPropertyException

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.