01: /**
02: * Copyright (C) 2007 NetMind Consulting Bt.
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 3 of the License, or (at your option) any later version.
08: *
09: * This library 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 GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */package hu.netmind.persistence;
18:
19: import java.util.*;
20: import hu.netmind.persistence.parser.*;
21:
22: /**
23: * Implement this interface to plug in hooks into the LazyList.
24: * @author Brautigam Robert
25: * @version CVS Revision: $Revision$
26: */
27: public interface LazyListHooks {
28: /**
29: * Called before selecting the result set. Note: if method
30: * modifies the statement, it should copy the statement first.
31: * @param stmt The statement that is about to be executed.
32: * @param previousList The previous page of the whole list, this
33: * may be null, which means the previous page is not known.
34: * @param limits The limits as determined by the automatic algorithm of
35: * the sub-page to be selected.
36: * @param pageLimits The limits of the page to be selected.
37: */
38: QueryStatement preSelect(Map session, QueryStatement stmt,
39: List previousList, Limits limits, Limits pageLimits);
40:
41: /**
42: * Called after selecting. Note: if the method should not modify
43: * the result list size!
44: */
45: boolean postSelect(Map session, List list, Limits limits);
46:
47: /**
48: * Called before selecting the statement index to use.
49: */
50: int preIndexing(Map session, int startIndex);
51: }
|