public void validateConstraints ( Entity entity ) { for ( String propertyName : requiredProperties ) { Object value = entity . getProperty ( propertyName ) ; if ( value == null || ( value instanceof String && ( ( String ) value ) . length ( ) == 0 ) ) { throw new RequiredFieldException ( "Required property '" + this . persistentClass . getSimpleName ( ) + "." + propertyName + "' is not set" ) ; } } }
Validate the schema constraints on the provided Entity instance