]> git.mxchange.org Git - jcore.git/blob - src/org/mxchange/jcore/criteria/searchable/SearchableCritera.java
Continued with jcore:
[jcore.git] / src / org / mxchange / jcore / criteria / searchable / SearchableCritera.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.jcore.criteria.searchable;
18
19 import java.lang.reflect.InvocationTargetException;
20 import org.mxchange.jcore.criteria.Criteria;
21 import org.mxchange.jcore.database.storage.Storeable;
22
23 /**
24  * A searchable criteria
25  *
26  * @author Roland Haeder
27  */
28 public interface SearchableCritera extends Criteria {
29         /**
30          * Checks if the given instance of a Storeable class matches
31          *
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?
38          */
39         public boolean matches (final Storeable storeable) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
40
41         /**
42          * Setter for limit of possible matches
43          *
44          * @param limit Limit of matches
45          */
46         public void setLimit (final int limit);
47
48         /**
49          * Getter for limit of possible matches
50          *
51          * @return Limit of matches
52          */
53         public int getLimit ();
54
55         /**
56          * Setter for skipping of possible matches
57          *
58          * @param skip Skipping of matches
59          */
60         public void setSkip (final int skip);
61
62         /**
63          * Getter for skipping of possible matches
64          *
65          * @return Skipping of matches
66          */
67         public int getSkip ();
68 }