001package io.ebean.typequery; 002 003/** 004 * Base property for date and date time types. 005 * 006 * @param <R> the root query bean type 007 * @param <D> the date time type 008 */ 009@SuppressWarnings("rawtypes") 010public abstract class PBaseDate<R, D extends Comparable> extends PBaseCompareable<R, D> { 011 012 /** 013 * Construct with a property name and root instance. 014 * 015 * @param name property name 016 * @param root the root query bean instance 017 */ 018 public PBaseDate(String name, R root) { 019 super(name , root); 020 } 021 022 /** 023 * Construct with additional path prefix. 024 */ 025 public PBaseDate(String name, R root, String prefix) { 026 super(name, root, prefix); 027 } 028 029 /** 030 * Same as greater than. 031 * 032 * @param value the equal to bind value 033 * @return the root query bean instance 034 */ 035 public R after(D value) { 036 expr().gt(_name, value); 037 return _root; 038 } 039 040 /** 041 * Same as less than. 042 * 043 * @param value the equal to bind value 044 * @return the root query bean instance 045 */ 046 public R before(D value) { 047 expr().lt(_name, value); 048 return _root; 049 } 050}