001package io.ebean.typequery;
002
003/**
004 * Base scalar property.
005 *
006 * @param <R> The type of the owning root bean
007 */
008public class TQPropertyBase<R> extends TQProperty<R> {
009
010  /**
011   * Construct with a property name and root instance.
012   *
013   * @param name the name of the property
014   * @param root the root query bean instance
015   */
016  public TQPropertyBase(String name, R root) {
017    super(name, root);
018  }
019
020  /**
021   * Construct with additional path prefix.
022   */
023  public TQPropertyBase(String name, R root, String prefix) {
024    super(name, root, prefix);
025  }
026
027  /**
028   * Order by ascending on this property.
029   */
030  public R asc() {
031    expr().order().asc(_name);
032    return _root;
033  }
034
035  /**
036   * Order by descending on this property.
037   */
038  public R desc() {
039    expr().order().desc(_name);
040    return _root;
041  }
042
043}