net.sf.farrago.syslib
Class FarragoSyslibUtil

java.lang.Object
  extended by net.sf.farrago.syslib.FarragoSyslibUtil

public abstract class FarragoSyslibUtil
extends Object

FarragoSyslibUtil provides utility methods useful when constructing UDR's.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/syslib/FarragoSyslibUtil.java#4 $
Author:
John Sichi

Constructor Summary
FarragoSyslibUtil()
           
 
Method Summary
static int compareKeysUsingGroupBySemantics(Object obj1, Object obj2)
          Compares two key objects retrieved from cursor columns having the exact same SQL datatype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FarragoSyslibUtil

public FarragoSyslibUtil()
Method Detail

compareKeysUsingGroupBySemantics

public static int compareKeysUsingGroupBySemantics(Object obj1,
                                                   Object obj2)
Compares two key objects retrieved from cursor columns having the exact same SQL datatype. Attempting to compare objects retrieved from columns with different datatypes may result in assertion violations or incorrect results; likewise for attempts to compare objects not retrieved from cursors. The comparison semantics used are the same as for GROUP BY: NOTE jvs 19-Apr-2008: once we support character set collations, this will not be good enough

Some unit tests are in farrago/unitsql/syslib/presort.sql

Parameters:
obj1 - first key to compare
obj2 - second key to compare
Returns:
negative for obj1 < obj2; positive for obj1 > obj2; zero for obj1 == obj2