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: //$Archive: /SOFIA/SourceCode/com/salmonllc/sql/DataStoreExpression.java $
24: //$Author: Srufle $
25: //$Revision: 8 $
26: //$Modtime: 4/15/03 2:24p $
27: /////////////////////////
28:
29: /**
30: * This interface is used to create hard coded expressions for a data store evaluator. Generally components evaluate a script expression, but sometimes an expression is to complex to go into a one line script or performance concerns dictate that compiled instead of interpreted code be executed to evaluate an expression. A class implementing this interface can be used in instead in every situation that a String expression can be used.
31: */
32: public interface DataStoreExpression {
33: /**
34: * Implement this method to evaluate a DataStore expression
35: * @return The result of the expression
36: * @param dsBuf The datastore to use to evaluate the expression
37: * @param row The row number to use in the DataStore to evaluate the expression
38: */
39: public Object evaluateExpression(DataStoreBuffer dsBuf, int row)
40: throws DataStoreException;
41: }
|