All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avaje.ebeaninternal.api.SpiExpressionValidation Maven / Gradle / Ivy

There is a newer version: 8.1.1
Show newest version
package com.avaje.ebeaninternal.api;

import com.avaje.ebean.plugin.BeanType;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * Property expression validation request for a given root bean type.
 */
public class SpiExpressionValidation {

  private final BeanType desc;

  private final LinkedHashSet unknown = new LinkedHashSet();

  public SpiExpressionValidation(BeanType desc) {
    this.desc = desc;
  }

  /**
   * Validate that the property expression (path) is valid.
   */
  public void validate(String propertyName) {
    if (!desc.isValidExpression(propertyName)) {
      unknown.add(propertyName);
    }
  }

  /**
   * Return the set of properties considered as having unknown paths.
   */
  public Set getUnknownProperties() {
    return unknown;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy