001package org.avaje.ebean.typequery;
002
003/**
004 * Base property for types that primarily have equal to.
005 *
006 * @param <R> the root query bean type
007 * @param <T> the number type
008 */
009public abstract class PBaseValueEqual<R,T> extends TQProperty<R> {
010
011  /**
012   * Construct with a property name and root instance.
013   *
014   * @param name property name
015   * @param root the root query bean instance
016   */
017  public PBaseValueEqual(String name, R root) {
018    super(name , root);
019  }
020
021  /**
022   * Construct with additional path prefix.
023   */
024  public PBaseValueEqual(String name, R root, String prefix) {
025    super(name, root, prefix);
026  }
027
028  /**
029   * Is equal to.
030   *
031   * @param value the equal to bind value
032   * @return the root query bean instance
033   */
034  public R equalTo(T value) {
035    expr().eq(name, value);
036    return root;
037  }
038
039  /**
040   * Is equal to.
041   *
042   * @param value the equal to bind value
043   * @return the root query bean instance
044   */
045  public R eq(T value) {
046    expr().eq(name, value);
047    return root;
048  }
049
050}