static compile(managedType, validationCode) {
    var keys = [];
    for (let attr of managedType.attributes()) {
      keys.push(attr.name);
    }

    var fn = new Function(keys, validationCode);
    return function onValidate(argObj) {
      var args = keys.map(function(name) {
        return argObj[name];
      });

      return fn.apply({}, args);
    }
  }
/**
   * Compiles the given validation code for the managedType
   * @param {metamodel.ManagedType} managedType The managedType of the code
   * @param {string} validationCode The validation code
   */
Compiles the given validation code for the managedType
@param {metamodel.ManagedType} managedType The managedType of the code
@param {string} validationCode The validation code
Compiles the given validation code for the managedType @param { metamodel . ManagedType } managedType The managedType of the code @param { string } validationCode The validation code
static compile(managedType, validationCode) {
    var keys = [];
    for (let attr of managedType.attributes()) {
      keys.push(attr.name);
    }
    var fn = new Function(keys, validationCode);
    return function onValidate(argObj) {
      var args = keys.map(function(name) {
        return argObj[name];
      });
      return fn.apply({}, args);
    }
  }
static compile ( managedType , validationCode ) { var keys = [ ] ; for ( let attr of managedType . attributes ( ) ) { keys . push ( attr . name ) ; } var fn = new Function ( keys , validationCode ) ; return function onValidate ( argObj ) { var args = keys . map ( function ( name ) { return argObj [ name ] ; } ) ; return fn . apply ( { } , args ) ; } }
Compiles the given validation code for the managedType
 @param {metamodel.ManagedType} managedType The managedType of the code
 @param {string} validationCode The validation code
Compiles the given validation code for the managedType @param { metamodel . ManagedType } managedType The managedType of the code @param { string } validationCode The validation code