@@ -0,0 +1,1666 @@
+/**%0A * Licensed to Apereo under one or more contributor license%0A * agreements. See the NOTICE file distributed with this work%0A * for additional information regarding copyright ownership.%0A * Apereo licenses this file to you under the Apache License,%0A * Version 2.0 (the %22License%22); you may not use this file%0A * except in compliance with the License.  You may obtain a%0A * copy of the License at the following location:%0A * %3Cp%3E%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %3Cp%3E%0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied.  See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0Apackage org.apereo.inspektr.audit.support;%0A%0Aimport java.time.Duration;%0Aimport java.util.Collections;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0A/**%0A * Produces a where clause to select audit records older than a given duration.%0A *%0A * @author Misagh Moayyed%0A * @since 2.0%0A */%0Apublic class DurationWhereClauseMatchCriteria extends AbstractWhereClauseMatchCriteria %7B%0A%0A    private static final String DATE_COLUMN = %22AUD_DATE%22;%0A%0A    protected String duration;%0A%0A    public DurationWhereClauseMatchCriteria(final String duration) %7B%0A        this.duration = duration;%0A        addCriteria(DATE_COLUMN, %22%3C%22);%0A    %7D%0A%0A%0A    @Override%0A    public List%3C?%3E getParameterValues() %7B%0A        final Date currentTime = new Date();%0A        final long newTime = currentTime.getTime() + Duration.parse(duration).toMillis();%0A        return Collections.singletonList(newTime);%0A    %7D%0A%7D%0A

support duration for cleanup criteria