Package com.jengine.orm.exception

Examples of com.jengine.orm.exception.ValidateException


    }

    public void validate(Model obj) throws ValidateException, DBException {
        Object value = getPersistenceValue(obj);
        if (required && value == null) {
            throw new ValidateException("'%s' field validation error: required field is empty");
        }
    }
View Full Code Here


    public void validate(Model obj) throws ValidateException, DBException {
        super.validate(obj);
        String value = (String) getPersistenceValue(obj);
        if (maxLength != null && value != null && value.length() > maxLength) {
            throw new ValidateException(String.format("'%s' field validation error: max length < actual size (%s)", fieldName, value.length()));
        }
    }
View Full Code Here

TOP

Related Classes of com.jengine.orm.exception.ValidateException

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.