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

studio.raptor.sqlparser.fast.expression.ParameterInterface Maven / Gradle / Ivy

There is a newer version: 3.0.3
Show newest version
/*
 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
 * and the EPL 1.0 (http://h2database.com/html/license.html).
 * Initial Developer: H2 Group
 */
package studio.raptor.sqlparser.fast.expression;

import studio.raptor.sqlparser.fast.message.ParseException;
import studio.raptor.sqlparser.fast.value.Value;

/**
 * The interface for client side (remote) and server side parameters.
 */
public interface ParameterInterface {

  /**
   * Set the value of the parameter.
   *
   * @param value the new value
   * @param closeOld if the old value (if one is set) should be closed
   */
  void setValue(Value value, boolean closeOld);

  /**
   * Get the value of the parameter if set.
   *
   * @return the value or null
   */
  Value getParamValue();

  /**
   * Check if the value is set.
   *
   * @throws ParseException if not set.
   */
  void checkSet() throws ParseException;

  /**
   * Is the value of a parameter set.
   *
   * @return true if set
   */
  boolean isValueSet();

  /**
   * Get the expected data type of the parameter if no value is set, or the
   * data type of the value if one is set.
   *
   * @return the data type
   */
  int getType();

  /**
   * Check if this column is nullable.
   *
   * @return Column.NULLABLE_*
   */
  int getNullable();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy