1 13 package info.magnolia.cms.gui.query; 14 15 import java.text.SimpleDateFormat ; 16 import java.util.Date ; 17 18 import org.apache.log4j.Logger; 19 20 21 24 public class DateSearchQueryParameter extends SearchQueryParameter { 25 26 29 private static Logger log = Logger.getLogger(DateSearchQueryParameter.class); 30 31 34 public static final String TODAY = "today"; 35 36 39 public static final String AFTER = "after"; 40 41 44 public static final String BEFORE = "before"; 45 46 49 public static final String IS = "is"; 50 51 54 private SimpleDateFormat format = new SimpleDateFormat ("yyyy-MM-dd"); 55 56 61 public DateSearchQueryParameter(String name, Date value, String constraint) { 62 super(name, value, constraint); 63 } 64 65 69 public Date getValue() { 70 return (Date ) this.value; 71 } 72 73 77 public void setValue(Date value) { 78 this.value = value; 79 } 80 81 85 public void setDateFormat(SimpleDateFormat format) { 86 this.format = format; 87 } 88 89 93 public SimpleDateFormat getDateFormat() { 94 return this.format; 95 } 96 } 97 | Popular Tags |