KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mckoi > database > FunctionInfo


1 /**
2  * com.mckoi.database.FunctionInfo 17 Aug 2001
3  *
4  * Mckoi SQL Database ( http://www.mckoi.com/database )
5  * Copyright (C) 2000, 2001, 2002 Diehl and Associates, Inc.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * Version 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License Version 2 for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * Version 2 along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  *
20  * Change Log:
21  *
22  *
23  */

24
25 package com.mckoi.database;
26
27 /**
28  * Meta information about a function. Used to compile information about a
29  * particular function.
30  *
31  * @author Tobias Downer
32  */

33
34 public interface FunctionInfo {
35
36   /**
37    * A type that represents a static function. A static function is not
38    * an aggregate therefore does not require a GroupResolver. The result of
39    * a static function is guarenteed the same given identical parameters over
40    * subsequent calls.
41    */

42   public static final int STATIC = 1;
43
44   /**
45    * A type that represents an aggregate function. An aggregate function
46    * requires the GroupResolver variable to be present in able to resolve the
47    * function over some set. The result of an aggregate function is
48    * guarenteed the same given the same set and identical parameters.
49    */

50   public static final int AGGREGATE = 2;
51
52   /**
53    * A function that is non-aggregate but whose return value is not guarenteed
54    * to be the same given the identical parameters over subsequent calls. This
55    * would include functions such as RANDOM and UNIQUEKEY. The result is
56    * dependant on some other state (a random seed and a sequence value).
57    */

58   public static final int STATE_BASED = 3;
59
60
61
62   /**
63    * The name of the function as used by the SQL grammar to reference it.
64    */

65   String JavaDoc getName();
66
67   /**
68    * The type of function, either STATIC, AGGREGATE or STATE_BASED (eg. result
69    * is not dependant entirely from input but from another state for example
70    * RANDOM and UNIQUEKEY functions).
71    */

72   int getType();
73
74   /**
75    * The name of the function factory class that this function is handled by.
76    * For example, "com.mckoi.database.InternalFunctionFactory".
77    */

78   String JavaDoc getFunctionFactoryName();
79
80 }
81
Popular Tags