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

com.spun.util.database.automaticsetter.AddDateAware Maven / Gradle / Ivy

There is a newer version: 24.9.0
Show newest version
package com.spun.util.database.automaticsetter;

import com.spun.util.ObjectUtils;
import com.spun.util.filters.Filter;

import java.sql.Timestamp;
import java.util.Date;

public interface AddDateAware
{
  public boolean setAddDate(Timestamp time);
  public Timestamp getAddDate();
  public static class FilterBeforeAddDate implements Filter
  {
    private Date date = null;
    public FilterBeforeAddDate(Date date)
    {
      this.date = date;
    }
    public boolean isExtracted(AddDateAware object) throws IllegalArgumentException
    {
      ObjectUtils.assertInstance(AddDateAware.class, object);
      Timestamp addDate = ((AddDateAware) object).getAddDate();
      return (addDate == null) ? false : !addDate.after(date);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy