2 * Copyright (C) 2015 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jcore.criteria.searchable;
19 import java.lang.reflect.InvocationTargetException;
20 import org.mxchange.jcore.criteria.Criteria;
21 import org.mxchange.jcore.database.storage.Storeable;
24 * A searchable criteria
26 * @author Roland Haeder
28 public interface SearchableCritera extends Criteria {
30 * Checks if the given instance of a Storeable class matches
32 * @param storeable A Storeable instance to check
33 * @return Whether the Storeable instance matches
34 * @throws IllegalArgumentException Some implementations may throw this
35 * @throws java.lang.NoSuchMethodException If the invoked method was not found
36 * @throws java.lang.IllegalAccessException If the method cannot be accessed
37 * @throws java.lang.reflect.InvocationTargetException Any other problems?
39 public boolean matches (final Storeable storeable) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
42 * Setter for limit of possible matches
44 * @param limit Limit of matches
46 public void setLimit (final int limit);
49 * Getter for limit of possible matches
51 * @return Limit of matches
53 public int getLimit ();
56 * Setter for skipping of possible matches
58 * @param skip Skipping of matches
60 public void setSkip (final int skip);
63 * Getter for skipping of possible matches
65 * @return Skipping of matches
67 public int getSkip ();