From: Eric P. <th...@us...> - 2009-11-19 01:56:57
|
Update of /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/structs In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7304 Modified Files: SandQueryMessage.java Log Message: Added custom value and custom aggregate function integration decls.. Index: SandQueryMessage.java =================================================================== RCS file: /cvsroot/sandev/sand/apps/basics/src/org/sandev/basics/structs/SandQueryMessage.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SandQueryMessage.java 14 Aug 2009 21:41:22 -0000 1.8 --- SandQueryMessage.java 19 Nov 2009 01:56:45 -0000 1.9 *************** *** 181,185 **** /** ! * Specified that this query should return the total value of each * of the fields specified in the operationFields. If no fields are * specified, then the resulting collection will have be STATUS_APPERROR --- 181,185 ---- /** ! * Specifies that this query should return the total value of each * of the fields specified in the operationFields. If no fields are * specified, then the resulting collection will have be STATUS_APPERROR *************** *** 195,198 **** --- 195,230 ---- /** + * Indicates the start of the range of custom aggregate functions. + * Custom aggregate functions are analagous to the standard + * COUNT/AVG/MAX/MIN/SUM functions in how they are called. They + * are added to the system by + * 1. defining the function in the persistent store + * 2. declaring the mapping of the ID to the function name in the + * sandpersist declaration for the build. e.g. + * customAggregates="1001:CustomAggFunc,1002:AnotherAggFunc" + * The persistency generators read the mapping to make the call. + * + * At the time of this writing, custom aggregate functions are not + * supported since there hasn't been a need. This spec serves as + * a placeholder should a driving business case be found. + */ + public final static int FUNCTION_CUSTOMAGGREGATESTART = 1000; + public final static int FUNCTION_CUSTOMAGGREGATEEND = 5000; + + + /** + * Specifies this query is actually a call to a custom function + * returning a single value. Processing reads the first + * SandAttrVal from getMatchInfo where the attr is the name of the + * function (with the PERSISTFUNCTION prefix), and the val is a + * CSV of parameters for the call. + * + * NB: Use of custom value functions is a security risk if not + * properly authorized. See PERSISTFUNCTION notes. + */ + public final static int FUNCTION_CUSTOMVALUE = 9000; + + + /** * Special attribute signifying an extended expression operator. * Used as a flag to signal that the value part of a SandAttrVal *************** *** 392,396 **** /** ! * Set the field name or CSV of field names which the speicifed * function should be applied to. */ --- 424,428 ---- /** ! * Set the field name or CSV of field names which the specified * function should be applied to. */ |