01: //** Copyright Statement ***************************************************
02: //The Salmon Open Framework for Internet Applications (SOFIA)
03: // Copyright (C) 1999 - 2002, Salmon LLC
04: //
05: // This program is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU General Public License version 2
07: // as published by the Free Software Foundation;
08: //
09: // 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, write to the Free Software
16: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: //
18: // For more information please visit http://www.salmonllc.com
19: //** End Copyright Statement ***************************************************
20: package com.salmonllc.sql;
21:
22: /**
23: * This interface should be implemented for DataStores that use non standard data sources to retrieve their data.
24: */
25: public interface DataSourceIn {
26: /**
27: * This method will be called after the data retrieve ends.
28: */
29: public void postRetrieve(DataStore ds) throws Exception;
30:
31: /**
32: * This method will be called before the data retrieve starts. It should do any preProcessing required to initiate the retrieve.
33: * @return boolean true if the DataStore should be retrieved and false if not
34: */
35: public boolean preRetrieve(DataStore ds, String selectionCriteria,
36: boolean countOnly, DBConnection conn) throws Exception;
37:
38: /**
39: * This method will be called for each row the DataStore is to retrieve. The method should retrieve the data from the data source and populate the DataStoreRow passed. Return false when the retrieve is finished and true to continue retrieving.
40: */
41: public boolean retrieveRow(DataStore ds, DataStoreRow row)
42: throws Exception;
43: }
|